Allow SIP/peer/exten like IAX
authorMark Spencer <markster@digium.com>
Mon, 24 Nov 2003 01:49:43 +0000 (01:49 +0000)
committerMark Spencer <markster@digium.com>
Mon, 24 Nov 2003 01:49:43 +0000 (01:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1787 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index d173fa5..d160944 100755 (executable)
@@ -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 */