summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
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 040f00898..7cfb42a2a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -16865,6 +16865,9 @@ static int sip_devicestate(void *data)
}
unref_peer(p);
} else {
+ char *port = strchr(host, ':');
+ if (port)
+ *port = '\0';
hp = ast_gethostbyname(host, &ahp);
if (hp)
res = AST_DEVICE_UNKNOWN;