[Freeswitch-users] vars scope in dialplan

Brian West brian at freeswitch.org
Mon Jun 7 12:32:41 PDT 2010


This is because variables are not SET like you think.  See the dialplan is compiled before its executed... but you do have an option:


<action inline="true" application="set" data="prfx=00"/>

The inline option will set it right then on the spot.

/b


On Jun 7, 2010, at 2:24 PM, Madovsky wrote:

> example :
>  
> <extension name="blabla">
>  <condition>
>    <action application="set" data="test=cake"/>
>  </condition>
>  <condition field="${test}" expression="^(cake)$">
>    <action application="set" data="prfx=00"/>
>  </condition>
> <condition field="${sip_to_uri}" expression="^(1\d{10,15})@$${domain}$">
>  <action application="set" data="getPrfx=${prfx}"/>
> </condition>
> </extension>
>  
> but ${prfx} is empty.
> I'm almost sure I didn't understand FS vars scope yet....
>  
> Thanks
>  
> Franck




More information about the FreeSWITCH-users mailing list