aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-09 19:29:30 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-09 19:29:30 +0000
commitd9f8bc811a298909989641e5bfa55a645120d35f (patch)
treeaa252ef08263b966c20084c5d27e971ad41ff99a /channels
parent9f5f8c4af1d44d370d28b7064787f611729dc037 (diff)
Fix an issue where the port for p->ourip was being set to 0.
This should fix all the CDR tests that were not passing. When they would originate a call, all fields in the INVITE that contained the source port would have the port set to 0. Most troubling of these was the Contact header. Tests are passing locally now and should also pass on the bamboo build agents. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275294 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2abec0b2b..435c8520c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3164,6 +3164,9 @@ static void ast_sip_ouraddrfor(const struct ast_sockaddr *them, struct ast_socka
if (!ast_sockaddr_is_any(&bindaddr)) {
ast_sockaddr_copy(us, &bindaddr);
}
+ if (!ast_sockaddr_port(us)) {
+ ast_sockaddr_set_port(us, ast_sockaddr_port(&bindaddr));
+ }
}
} else if (!ast_sockaddr_is_any(&bindaddr)) {
ast_sockaddr_copy(us, &bindaddr);