<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">OK let me explain this for the 100th time. &nbsp;:)<div><br></div><div>The dialplan isn't executed line by line. &nbsp;The dialplan is just a compiled list of instructions to execute but its execution doesn't take place until the session enters the execute state. &nbsp;So your set forward_all=xxxx hasn't happened yet. &nbsp;BUT you can use execute_extension or transfer to send the session back into the dialplan to re-evaluate the the list of things to do based on certain conditions you previously set.</div><div><br></div><div><br></div><div>/b</div><div><br></div><div><br><div><div>On Apr 29, 2009, at 9:30 AM, Alex Gusak wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">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}" .../&gt; 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"&gt;<br>&lt;condition&gt;<br>&lt;action application="set" data="forward_all=123456789"/&gt;<br>&lt;/condition&gt;<br>&lt;/extension&gt;<br><br>&lt;extension name="call"&gt;<br>&lt;condition field="${forward_all}" expression="^(\d{8,9,10})$" break="on-true"&gt;<br>...<br>&lt;action application="bridge" data="sofia/gateway/uplink/${forward_all}"/&gt;<br>&lt;action application="hangup"/&gt;<br>&lt;/condition&gt;<br><br>&lt;condition field="destination_number" expression="^(.*)$"&gt;<br>...<br>&lt;action application="bridge" data="user/${dialed_extension}@${domain_name}"/&gt;<br>&lt;action application="hangup"/&gt;<br>&lt;/condition&gt;<br>&lt;/extension&gt;<br><br><br>--<span class="Apple-converted-space">&nbsp;</span><br>Alex Gusak</span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Brian West</div><div><a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a></div><div><br></div></div></span>-- Meet us at ClueCon! &nbsp;<a href="http://www.cluecon.com/">http://www.cluecon.com</a><br><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>