[Freeswitch-users] Condition and custom variables
Alex Gusak
alex.gusak at gmail.com
Wed Apr 29 07:30:34 PDT 2009
Hello.
Can I use custom variables in the condition field?
For example if i set my custom var ${forward_all} and continue search extensions
<condition field="${forward_all}" .../> not work even if the condition is met
and call does not go in the uplink.
Or, in the condition I can use only variables freeswitch like ${sip_from_user}?
Is it possible to use custom variables?
<extension name="set-vars" continue="true">
<condition>
<action application="set" data="forward_all=123456789"/>
</condition>
</extension>
<extension name="call">
<condition field="${forward_all}" expression="^(\d{8,9,10})$" break="on-true">
...
<action application="bridge" data="sofia/gateway/uplink/${forward_all}"/>
<action application="hangup"/>
</condition>
<condition field="destination_number" expression="^(.*)$">
...
<action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
<action application="hangup"/>
</condition>
</extension>
--
Alex Gusak
More information about the FreeSWITCH-users
mailing list