aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
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);