diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b366ea5493..975ad73d73 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13473,14 +13473,9 @@ static struct ast_channel *sip_request_call(const char *type, int format, void * ext = tmp; } else { ext = strchr(tmp, '/'); - if (ext) { + if (ext) *ext++ = '\0'; - host = tmp; - } - else { - host = tmp; - ext = NULL; - } + host = tmp; } if (create_addr(p, host)) {