diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d173fa52a6..d160944930 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5673,8 +5673,15 @@ static struct ast_channel *sip_request(char *type, int format, void *data) host++; ext = tmp; } else { - host = tmp; - ext = NULL; + ext = strchr(tmp, '/'); + if (ext) { + *ext++ = '\0'; + host = tmp; + } + else { + host = tmp; + ext = NULL; + } } /* Assign a default capability */