<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">There should be several archive threads on this including:<div><br></div><div><p style="margin: 0.0px 0.0px 1.0px 64.0px; text-indent: -64.0px; font: 12.0px Helvetica"><b><a href="http://n2.nabble.com/Using-Variables-in-Dialplans-tt2678222.html#a2678222">http://n2.nabble.com/Using-Variables-in-Dialplans-tt2678222.html#a2678222</a></b></p><p style="margin: 0.0px 0.0px 1.0px 64.0px; text-indent: -64.0px; font: 12.0px Helvetica"><b><br></b></p><p style="margin: 0.0px 0.0px 1.0px 64.0px; text-indent: -64.0px; font: 12.0px Helvetica"><b>Mike</b></p><p style="margin: 0.0px 0.0px 1.0px 64.0px; text-indent: -64.0px; font: 12.0px Helvetica"><b><br></b></p><div><div>On Apr 29, 2009, at 10:30 AM, Alex Gusak wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello.<br><br>Can I use custom variables in the condition field?<br>For example if i set my custom var ${forward_all} and continue search extensions<br>&lt;condition field="${forward_all}" .../> not work even if the condition is met<br>and call does not go in the uplink.<br><br>Or, in the condition I can use only variables freeswitch like ${sip_from_user}?<br>Is it possible to use custom variables?<br><br>&lt;extension name="set-vars" continue="true"><br>&lt;condition><br>&lt;action application="set" data="forward_all=123456789"/><br>&lt;/condition><br>&lt;/extension><br><br>&lt;extension name="call"><br>&lt;condition field="${forward_all}" expression="^(\d{8,9,10})$" break="on-true"><br>...<br>&lt;action application="bridge" data="sofia/gateway/uplink/${forward_all}"/><br>&lt;action application="hangup"/><br>&lt;/condition><br><br>&lt;condition field="destination_number" expression="^(.*)$"><br>...<br>&lt;action application="bridge" data="user/${dialed_extension}@${domain_name}"/><br>&lt;action application="hangup"/><br>&lt;/condition><br>&lt;/extension><br></div></blockquote></div><br></div></body></html>