[asterisk-users] How to get values of local channels context

Yuan LIU yliu11 at hotmail.com
Thu Mar 1 01:40:03 MST 2007


>From: "Yuan LIU" <yliu11 at hotmail.com>
>Date: Wed, 28 Feb 2007 21:24:56 -0800
>
>>From: kjcsb <kjcsb at yahoo.com>
>>Date: Wed, 28 Feb 2007 18:23:46 -0800 (PST)
>>
>> >Check out /path/to/src/asterisk/doc/README.variables
>>
>>${DIALEDPEERNUMBER} would give it to me if I sliced it up.
>>exten => s,n,Set(Foo=${CUT(DIALEDPEERNUMBER,@,2)})
>>exten => s,n,Set(Foo=${CUT(Foo,/n,1)})
>>
>>Are there any better options?
>>
>>Cameron
>
>This is beautiful.  How much better can it get?  Syntax-wise, you can 
>combine the two lines into one because the value of CUT() can be used 
>inside another function including CUT().  Using inheritable

Take this back; CUT expects a variable name, not a value:-(

>variable could be an alternative.  But efficiency difference is neglegible.
>
>Yuan Liu




More information about the asterisk-users mailing list