<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. </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. Once the session </div><div>leaves the routing state it enters execute state. This is when the compiled list of things to do gets ran. </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> <!-- Billing Open? --><br> <extension name="billing_open" continue="true"><br> <!-- man strftime - M-F, 9AM to 5PM --><br> <condition field="${strftime(%w)}" expression="^([1-5])$"/><br> <condition field="${strftime(%H%M)}" expression="^((09|1[0-6])[0-5][0-9]|1700)$"><br> <action application="set" data="billingopen=true"/><br> </condition><br> </extension><br><br><br> <!-- billing line --><br> <extension name="billing"><br> <condition field="destination_number" expression="^billing$|^2001$"/><br> <condition field="billingopen" expression="^true$"> <br> <...><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! <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>