aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-20 23:57:03 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-20 23:57:03 +0000
commitf343b0d9f04ac7c0e14258ad0d196d3e41214eb5 (patch)
tree7e5b2bf6006aa255c25fc4d65b61258150683086 /channels
parente13cb3c32db308be26a733ebc93aabd911fb0d65 (diff)
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/branches/1.4@55717 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 08a33d887..74871304b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1771,14 +1771,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;