summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorBrett Bryant <bbryant@digium.com>2008-06-19 18:57:04 +0000
committerBrett Bryant <bbryant@digium.com>2008-06-19 18:57:04 +0000
commit249ac33ab0cfcc0a0045d77faf90713dccf8b021 (patch)
tree470cd012abec7d2f4f9d6e895bd94408d90c0f02 /channels/chan_sip.c
parentfa4bce7c439b266ae77db869afe905e0b7d0e0cf (diff)
Fix bug in sip registration that sets the default port to 5060 for tls.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-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 d6a1ec961..2caaa0d76 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6397,6 +6397,9 @@ static int sip_register(const char *value, int lineno)
ast_log(LOG_WARNING, "%s is not a valid port number at line %d\n", porta, lineno);
return -1;
}
+ } else {
+ portnum = (transport == SIP_TRANSPORT_TLS) ?
+ STANDARD_TLS_PORT : STANDARD_SIP_PORT;
}
if (!(reg = ast_calloc(1, sizeof(*reg)))) {
ast_log(LOG_ERROR, "Out of memory. Can't allocate SIP registry entry\n");