From: Mark Spencer Date: Mon, 24 Nov 2003 01:49:43 +0000 (+0000) Subject: Allow SIP/peer/exten like IAX X-Git-Tag: 0.7.0~225 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=171b29fd4c591322244b286cb2bfa700eb8283c9;p=thirdparty%2Fasterisk.git Allow SIP/peer/exten like IAX git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1787 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- 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 */