From: Matthew Jordan Date: Fri, 17 Oct 2014 13:09:20 +0000 (+0000) Subject: channels/chan_sip: Respect outboundproxy setting when sending qualify requests X-Git-Tag: 11.14.0-rc1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebb3d8db82f622b573e3a2f9ea15771d981dbc23;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@425819 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5a77d49f64..0a1af8c028 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -29561,6 +29561,9 @@ static int sip_poke_peer(struct sip_peer *peer, int force) ast_copy_flags(&p->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY); ast_copy_flags(&p->flags[2], &peer->flags[2], SIP_PAGE3_FLAGS_TO_COPY); + /* 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);