aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/asterisk/APKBUILD4
-rw-r--r--main/asterisk/ASTERISK-19106.patch40
2 files changed, 43 insertions, 1 deletions
diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD
index 82596abd65..e6419e228a 100644
--- a/main/asterisk/APKBUILD
+++ b/main/asterisk/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
pkgver=10.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Asterisk: A Module Open Source PBX System"
url="http://www.asterisk.org/"
arch="all"
@@ -24,6 +24,7 @@ source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$
ASTERISK-18977.patch
ASTERISK-18994.patch
ASTERISK-18995.patch
+ ASTERISK-19106.patch
asterisk.initd
asterisk.confd
asterisk.logrotate"
@@ -171,6 +172,7 @@ da5a3c500192dee4275aae5235d25f97 ASTERISK-18976.patch
1ddadef41aa7120e168738b6f3ed8917 ASTERISK-18977.patch
0af5e797f0a99d0f81f95e3710baf5b6 ASTERISK-18994.patch
bc6713f5434e07b79d3afdd155461d72 ASTERISK-18995.patch
+fee11ba2f6518462ea6dde4039f9d8fa ASTERISK-19106.patch
86c7589e906102869d67f7f8bc82ca4b asterisk.initd
ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd
3e65172275684373e1a25c8a11224411 asterisk.logrotate"
diff --git a/main/asterisk/ASTERISK-19106.patch b/main/asterisk/ASTERISK-19106.patch
new file mode 100644
index 0000000000..d2f44c1d93
--- /dev/null
+++ b/main/asterisk/ASTERISK-19106.patch
@@ -0,0 +1,40 @@
+diff --git a/channels/chan_sip.c b/channels/chan_sip.c
+index e7b678b..f1e5578 100644
+--- a/channels/chan_sip.c
++++ b/channels/chan_sip.c
+@@ -13062,17 +13062,8 @@ static int sip_reg_timeout(const void *data)
+ }
+
+ if (r->dnsmgr) {
+- struct sip_peer *peer;
+ /* If the registration has timed out, maybe the IP changed. Force a refresh. */
+ ast_dnsmgr_refresh(r->dnsmgr);
+- /* If we are resolving a peer, we have to make sure the refreshed address gets copied */
+- if ((peer = sip_find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE, 0))) {
+- ast_sockaddr_copy(&peer->addr, &r->us);
+- if (r->portno) {
+- ast_sockaddr_set_port(&peer->addr, r->portno);
+- }
+- peer = sip_unref_peer(peer, "unref after sip_find_peer");
+- }
+ }
+
+ /* If the initial tranmission failed, we may not have an existing dialog,
+@@ -13187,14 +13178,14 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char *
+ }
+
+ /* Use port number specified if no SRV record was found */
+- if (!ast_sockaddr_port(&r->us) && r->portno) {
+- ast_sockaddr_set_port(&r->us, r->portno);
++ if (!ast_sockaddr_port(&r->us)) {
++ ast_sockaddr_set_port(&r->us, r->portno ? r->portno : STANDARD_SIP_PORT);
+ }
+
+ /* It is possible that DNS is unavailable at the time the peer is created. Here, if
+ * we've updated the address in the registry, we copy it to the peer so that
+ * create_addr() can copy it to the dialog via create_addr_from_peer */
+- if ((peer = sip_find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE, 0))) {
++ if ((peer = sip_find_peer(S_OR(r->peername, r->hostname), NULL, TRUE, FINDPEERS, FALSE, 0))) {
+ if (ast_sockaddr_isnull(&peer->addr) && !(ast_sockaddr_isnull(&r->us))) {
+ ast_sockaddr_copy(&peer->addr, &r->us);
+ }