summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e9e38d08f..dc46c66c6 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1772,8 +1772,7 @@ static struct sip_proxy *proxy_allocate(char *name, char *port, int force)
return NULL;
proxy->force = force;
ast_copy_string(proxy->name, name, sizeof(proxy->name));
- if (!ast_strlen_zero(port))
- proxy->ip.sin_port = htons(atoi(port));
+ proxy->ip.sin_port = htons((!ast_strlen_zero(port) ? atoi(port) : STANDARD_SIP_PORT));
proxy_update(proxy);
return proxy;
}