aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-13 16:32:34 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-13 16:32:34 +0000
commit5a9c198ac05134d0e318454e55cc73f687ff9539 (patch)
treed0db7e28299472ce959a02136f2c67c91497dafd
parentff9ca8031e160bba27b70f47c2170039efa43d8f (diff)
Merged revisions 188067 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r188067 | file | 2009-04-13 13:28:06 -0300 (Mon, 13 Apr 2009) | 10 lines Fix a bug where using an outbound proxy would cause the local address to be 127.0.0.1. Copy the outbound proxy IP address into the SIP dialog structure as the IP address we will be sending to. This has to be done because the logic that determines what local IP address to use in the SIP messages is not aware of an outbound proxy being in place. It only knows what IP address we are sending to. (closes issue #12006) Reported by: mnicholson ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@188069 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1ed89df55..373841841 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4488,6 +4488,7 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer, struct sockadd
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;
+ memcpy(&dialog->sa.sin_addr, &dialog->outboundproxy->ip.sin_addr, sizeof(dialog->sa.sin_addr));
} else if (sin) {
/* This address should be updated using dnsmgr */
memcpy(&dialog->sa.sin_addr, &sin->sin_addr, sizeof(dialog->sa.sin_addr));