summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-10-17 13:10:42 +0000
committerMatthew Jordan <mjordan@digium.com>2014-10-17 13:10:42 +0000
commit97b5c22f07148b6f39457e43b744dbcc4ed156d9 (patch)
treec95ca6f59ba19f6eec3f80c79cee0778448c1f37
parentfa94bc815b5d4276e5803be3cdad6d7f1be8733f (diff)
channels/chan_sip: Respect outboundproxy setting when sending qualify requests
The outboundproxy setting is currently ignored when sending OPTIONS requests as a result of the qualify setting. This means that if an Asterisk server is unable to send the packet directly to a peer, it is unable to qualify any non-inbound registered peer (e.g. a peer SIP Trunk). This patch grabs the outboundproxy information for a peer when a qualify attempt is being constructed and, if it finds the information, uses it when sending the OPTIONS request. Review: https://reviewboard.asterisk.org/r/3948 ASTERISK-24063 #close Reported by: Damian Ivereigh patches: outboundproxy-dai.patch uploaded by Damian Ivereigh (License 6632) ........ Merged revisions 425818 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 425819 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425820 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@425821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3c0eb510d..a0440cd67 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29284,6 +29284,9 @@ static int sip_poke_peer(struct sip_peer *peer, int force)
__set_address_from_contact(sip_route_first_uri(&p->route), &p->sa, p->socket.type == AST_TRANSPORT_TLS ? 1 : 0);
}
+ /* Get the outbound proxy information */
+ ref_proxy(p, obproxy_get(p, peer));
+
/* Send OPTIONs to peer's fullcontact */
if (!ast_strlen_zero(peer->fullcontact)) {
ast_string_field_set(p, fullcontact, peer->fullcontact);