<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This again? ;) Lets see if this helps!<div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Anatomy_of_the_XML_Dialplan">http://wiki.freeswitch.org/wiki/Dialplan_XML#Anatomy_of_the_XML_Dialplan</a></div><div><br></div><div>The dialplan is not processed and executed line by line... its compiled and installed into the session before it goes into execute state. &nbsp;</div><div>So you can't use set on one line then use that var in a condition on the next line because the SET hasn't happened yet. &nbsp;Once the session&nbsp;</div><div>leaves the routing state it enters execute state. &nbsp;This is when the compiled list of things to do gets ran.&nbsp;</div><div><br></div><div>If you wish to re-enter the dialplan and re-eval some condition you use execute_extension or "transfer" the session back to the dialplan.</div><div><br></div><div>/b</div><div><br></div><div><br><div><div>On Apr 22, 2009, at 2:19 PM, Chris Fowler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">I have the following defined:<br><br>&nbsp;&nbsp;&nbsp;&lt;!-- Billing Open? --&gt;<br>&nbsp;&nbsp;&nbsp;&lt;extension name="billing_open" continue="true"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- man strftime - M-F, 9AM to 5PM --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition field="${strftime(%w)}" expression="^([1-5])$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action application="set" data="billingopen=true"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp;&lt;/extension&gt;<br><br><br>&nbsp;&nbsp;&nbsp;&lt;!-- billing line --&gt;<br>&nbsp;&nbsp;&nbsp;&lt;extension name="billing"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition field="destination_number" expression="^billing$|^2001$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition field="billingopen" expression="^true$"&gt; &nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;...&gt;<br><br><br>But despite the "Billing Open" ext firing correctly:<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>Action set(billingopen=true)<br><br>The Billing extenstion fails to get the data:<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>Regex (FAIL) [billing] billingopen() =~ /^true$/ break=on-false</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>