diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-21 00:00:11 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-21 00:00:11 +0000 |
commit | fff5f64a9874fad704435cedfce57e580f8d3d01 (patch) | |
tree | 7e3cc2b056b89a75626736a6c5fa415eed8f6d79 /channels | |
parent | 80dab82fca9f27783d826c98e1e904620c89502a (diff) |
Merged revisions 55717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r55717 | file | 2007-02-20 18:57:03 -0500 (Tue, 20 Feb 2007) | 2 lines
Return behavior I removed. I did not remember that you could just add a localnet entry to make it work.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@55718 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 1c4189cea..3fed33dbb 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1925,14 +1925,16 @@ static void build_via(struct sip_pvt *p) */ static enum sip_result ast_sip_ouraddrfor(struct in_addr *them, struct in_addr *us) { - struct sockaddr_in theirs; + struct sockaddr_in theirs, ours; /* Get our local information */ ast_ouraddrfor(them, us); theirs.sin_addr = *them; + ours.sin_addr = *us; if (localaddr && externip.sin_addr.s_addr && - ast_apply_ha(localaddr, &theirs)) { + (ast_apply_ha(localaddr, &theirs)) && + (!ast_apply_ha(localaddr, &ours))) { if (externexpire && time(NULL) >= externexpire) { struct ast_hostent ahp; struct hostent *hp; |