diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-17 00:32:56 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-17 00:32:56 +0000 |
commit | 4abe962cd4473b1f950e0d13cbd41ea9f533965d (patch) | |
tree | 7b10b23ca4d36ffab8b2b72d8068c763d3b281cd | |
parent | 399b3844df9fcbb7d0e6dd9d09b7ceee05e02fd0 (diff) |
Merged revisions 169044 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r169044 | twilson | 2009-01-16 18:03:39 -0600 (Fri, 16 Jan 2009) | 8 lines
Fix port :0 added to SIP INVITE URI when outboundproxy used
(closes issue #14233)
Reported by: chris-mac
Patches:
asterisk-bug14233.diff.txt uploaded by jamesgolovich (license 176)
Tested by: jamesgolovich, chris-mac, otherwiseguy
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@169079 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index af1660c5a..ce882ee1f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4425,12 +4425,11 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer, struct sockadd /* Get the outbound proxy information */ ref_proxy(dialog, obproxy_get(dialog, NULL)); - /* If we have an outbound proxy, don't bother with DNS resolution at all */ - if (dialog->outboundproxy) - return 0; - - /* This address should be updated using dnsmgr */ - if (sin) { + if (dialog->outboundproxy) { + /* If we have an outbound proxy, don't bother with DNS resolution at all, but set the port */ + portno = port ? atoi(port) : (dialog->socket.type & SIP_TRANSPORT_TLS) ? STANDARD_TLS_PORT : STANDARD_SIP_PORT; + } else if (sin) { + /* This address should be updated using dnsmgr */ memcpy(&dialog->sa.sin_addr, &sin->sin_addr, sizeof(dialog->sa.sin_addr)); if (!sin->sin_port) { if (ast_strlen_zero(port) || sscanf(port, "%u", &portno) != 1) { |