[Asterisk-Dev] Re: [Asterisk-cvs] asterisk/channels chan_sip.c,1.248,1.249

Olle E. Johansson oej at edvina.net
Mon Nov 24 06:49:27 MST 2003


Do I understand correctly that we now are able to dial a SIP peer
like
    SIP/freeworlddialup/21343

Where [freeworlddialup] is defined in sip.conf

...and dial SIP URLs with
    SIP/oej at edvina.net

That would be much more simple to explain to newbies. The old syntax was a bit
confusing, at least to me before I read the manual...

/O

markster at lists.digium.com wrote:

> Update of /usr/cvsroot/asterisk/channels
> In directory mongoose.digium.com:/tmp/cvs-serv25810/channels
> 
> Modified Files:
> 	chan_sip.c 
> Log Message:
> Allow SIP/peer/exten like IAX
> 
> 
> Index: chan_sip.c
> ===================================================================
> RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
> retrieving revision 1.248
> retrieving revision 1.249
> diff -u -d -r1.248 -r1.249
> --- chan_sip.c	21 Nov 2003 05:20:43 -0000	1.248
> +++ chan_sip.c	24 Nov 2003 01:49:43 -0000	1.249
> @@ -5673,8 +5673,15 @@
>  		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 */
> 






More information about the asterisk-dev mailing list