dect
/
asterisk
Archived
13
0
Fork 0

Fix a bug with the change I made yesterday to outbound proxy support.

Per discussion with oej on IRC we need the actual IP address, not the
outbound proxy IP address, in the sa field. This change matches the already
existing code for all other uses of the outbound proxy setting.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@188247 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2009-04-14 13:14:21 +00:00
parent 6ba9bf6f7a
commit 88fc073714
1 changed files with 1 additions and 5 deletions

View File

@ -5002,11 +5002,7 @@ 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 (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) {
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) {