Small fix in outbound proxy support.
authorOlle Johansson <oej@edvina.net>
Sun, 11 Feb 2007 20:04:49 +0000 (20:04 +0000)
committerOlle Johansson <oej@edvina.net>
Sun, 11 Feb 2007 20:04:49 +0000 (20:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53933 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index dca3c37..c7447d4 100644 (file)
@@ -2939,6 +2939,8 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer)
                return res;
        }
 
+       ast_string_field_set(dialog, tohost, peername);
+
        /* Get the outbound proxy information */
        dialog->outboundproxy = obproxy_get(dialog, NULL);
 
@@ -2968,7 +2970,6 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer)
                ast_log(LOG_WARNING, "No such host: %s\n", peername);
                return -1;
        }
-       ast_string_field_set(dialog, tohost, peername);
        memcpy(&dialog->sa.sin_addr, hp->h_addr, sizeof(dialog->sa.sin_addr));
        dialog->sa.sin_port = htons(portno);
        dialog->recv = dialog->sa;