Brien, if I have to write several conditions for the same vars, like <condition> <action inline="true" application="set" data="test=${cake}"> </condition> <condition field="${test}" expression="^(chocolate)$"> <action inline="true" application="set" data="prfx=yesyes"/> </condition> <condition field="${test}" expression="^(lemon)$"> <action inline="true" application="set" data="prfx=yes"/> </condition> ${prfx} is empty. is not allowed to do that ? Thanks Franck ----- Original Message ----- From: "Madovsky" <infos@madovsky.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Monday, June 07, 2010 3:55 PM Subject: Re: [Freeswitch-users] vars scope in dialplan
Thanks Brian, I forgot this option...
F
----- Original Message ----- From: "Brian West" <brian@freeswitch.org> To: <freeswitch-users@lists.freeswitch.org> Sent: Monday, June 07, 2010 3:32 PM Subject: Re: [Freeswitch-users] vars scope in dialplan
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
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org