aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 523ff8e81..3d5b8230a 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2421,7 +2421,7 @@ static int sip_register(char *value, int lineno)
reg->expire = -1;
reg->timeout = -1;
reg->refresh = default_expiry;
- reg->portno = htons(atoi(porta));
+ reg->portno = porta ? htons(atoi(porta)) : 0;
reg->callid_valid = 0;
reg->ocseq = 101;
ast_mutex_lock(&regl.lock);