<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. :)<div><br></div><div>The dialplan isn't executed line by line. 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. So your set forward_all=xxxx hasn't happened yet. 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><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><br><br>--<span class="Apple-converted-space"> </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! <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>