<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><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><extension name="set-vars" continue="true"><br><condition><br><action application="set" data="forward_all=123456789"/><br></condition><br></extension><br><br><extension name="call"><br><condition field="${forward_all}" expression="^(\d{8,9,10})$" break="on-true"><br>...<br><action application="bridge" data="sofia/gateway/uplink/${forward_all}"/><br><action application="hangup"/><br></condition><br><br><condition field="destination_number" expression="^(.*)$"><br>...<br><action application="bridge" data="user/${dialed_extension}@${domain_name}"/><br><action application="hangup"/><br></condition><br></extension><br></div></blockquote></div><br></div></body></html>