[Asterisk-Users] Parsing a variable, or rather Splitting a variable

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed Mar 10 10:13:29 MST 2004


On Tuesday 09 March 2004 18:14, Derek Bruce wrote:
> Well, after thinking about it some more... try this:
>
> exten => s,1,ChanIsAvail(SIP/2001&IAX2/abc at xyz)
> exten => s,2,cut,ToDial=${AVAILCHAN},1
> exten => s,3,Dial(${ToDial},20)

The correct syntax for Cut is:

exten => s,2,Cut(ToDial=AVAILCHAN,,1)

Note the extra comma.  You can also explicitly specify the - as the
delimiter:

exten => s,2,Cut(ToDial=AVAILCHAN,-,1)

-Tilghman




More information about the asterisk-users mailing list