summaryrefslogtreecommitdiffstats
path: root/main/asterisk
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-10-08 10:27:41 +0300
committerTimo Teräs <timo.teras@iki.fi>2012-10-08 10:28:35 +0300
commit088b4cbc7dbb9248ad6662d7cba95c1e96526e7a (patch)
tree577614c61a83961a49c7c2514cd70ef89ed310cd /main/asterisk
parent623b0e3b0de0a9ed4e27609159c8ae646abb1f6c (diff)
downloadaports-088b4cbc7dbb9248ad6662d7cba95c1e96526e7a.tar.bz2
aports-088b4cbc7dbb9248ad6662d7cba95c1e96526e7a.tar.xz
main/asterisk: cherry pick sip registration fix from bug tracker
Diffstat (limited to 'main/asterisk')
-rw-r--r--main/asterisk/APKBUILD11
-rw-r--r--main/asterisk/ASTERISK-20527.patch26
2 files changed, 33 insertions, 4 deletions
diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD
index 0514124b7..0ade15ee4 100644
--- a/main/asterisk/APKBUILD
+++ b/main/asterisk/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
pkgver=10.8.0
-pkgrel=0
+pkgrel=1
pkgdesc="Asterisk: A Module Open Source PBX System"
pkgusers="asterisk"
pkggroups="asterisk"
@@ -30,6 +30,7 @@ source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$
ASTERISK-19610a.patch
ASTERISK-19610b.patch
ASTERISK-19610c.patch
+ ASTERISK-20527.patch
asterisk.initd
asterisk.confd
asterisk.logrotate"
@@ -38,9 +39,10 @@ _builddir="$srcdir/$pkgname-${pkgver/_/-}"
prepare() {
cd "$_builddir"
- for i in ../[1-9A]*.patch; do
- msg "Apply $i"
- patch -p1 < $i || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
done
sed -i -e 's:lua5.1/::' pbx/pbx_lua.c
@@ -196,6 +198,7 @@ a22bb1d513d026564cb40ec213b1ae7f ASTERISK-19109.patch
c62a5cfa216b4e26de01ee9ec3013705 ASTERISK-19610a.patch
59d2fb1f19918f3a1c85dd974f3518c2 ASTERISK-19610b.patch
69ee6594f9e2502f2118919947e1afae ASTERISK-19610c.patch
+e613a9f3b88a5f6fb297d896b7ec1399 callbackexten-authname.patch
74cd25a5638a94ef51e9f4ede2fd28f2 asterisk.initd
ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd
3e65172275684373e1a25c8a11224411 asterisk.logrotate"
diff --git a/main/asterisk/ASTERISK-20527.patch b/main/asterisk/ASTERISK-20527.patch
new file mode 100644
index 000000000..eba41d72c
--- /dev/null
+++ b/main/asterisk/ASTERISK-20527.patch
@@ -0,0 +1,26 @@
+diff --git a/channels/chan_sip.c b/channels/chan_sip.c
+index 7569bba..24a8cec 100644
+--- a/channels/chan_sip.c
++++ b/channels/chan_sip.c
+@@ -30189,7 +30189,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
+ olddirectmediaacl = ast_free_acl_list(olddirectmediaacl);
+ if (!ast_strlen_zero(peer->callback)) { /* build string from peer info */
+ char *reg_string;
+- if (asprintf(&reg_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, peer->callback) < 0) {
++ if (asprintf(&reg_string, "%s?%s:%s:%s@%s/%s", peer->name, S_OR(peer->fromuser, peer->username), S_OR(peer->remotesecret, peer->secret), peer->username, peer->tohost, peer->callback) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ } else if (reg_string) {
+ sip_register(reg_string, 0); /* XXX TODO: count in registry_count */
+diff --git a/configs/sip.conf.sample b/configs/sip.conf.sample
+index 81ca998..812be7b 100644
+--- a/configs/sip.conf.sample
++++ b/configs/sip.conf.sample
+@@ -711,7 +711,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
+ ; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
+ ; this is equivalent to having the following line in the general section:
+ ;
+-; register => username:secret@host/callbackextension
++; register => fromuser:secret:username@host/callbackextension
+ ;
+ ; and more readable because you don't have to write the parameters in two places
+ ; (note that the "port" is ignored - this is a bug that should be fixed).