If no port is specified in the outboundproxy setting then use the standard SIP port...
[asterisk/asterisk.git] / channels / chan_sip.c
index e9e38d0..dc46c66 100644 (file)
@@ -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;
 }