This again? ;) Lets see if this helps!

http://wiki.freeswitch.org/wiki/Dialplan_XML#Anatomy_of_the_XML_Dialplan

The dialplan is not processed and executed line by line... its compiled and installed into the session before it goes into execute state. 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 leaves the routing state it enters execute state. This is when the compiled list of things to do gets ran.

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.

/b


On Apr 22, 2009, at 2:19 PM, Chris Fowler wrote:

I have the following defined:

   <!-- Billing Open? -->
   <extension name="billing_open" continue="true">
     <!-- man strftime - M-F, 9AM to 5PM -->
     <condition field="${strftime(%w)}" expression="^([1-5])$"/>
<condition field="${strftime(%H%M)}" expression="^((09|1[0-6]) [0-5][0-9]|1700)$">
       <action application="set" data="billingopen=true"/>
     </condition>
   </extension>


   <!-- billing line -->
   <extension name="billing">
<condition field="destination_number" expression="^billing$| ^2001$"/>
     <condition field="billingopen" expression="^true$">
     <...>


But despite the "Billing Open" ext firing correctly:
        Action set(billingopen=true)

The Billing extenstion fails to get the data:
        Regex (FAIL) [billing] billingopen() =~ /^true$/ break=on-false

Brian West
br...@freeswitch.org

-- Meet us at ClueCon!  http://www.cluecon.com




_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to