Results 1 to 3 of 3

Thread: Time of Day queries

  1. #1

    Default Time of Day queries

    I am trying to set a ascript that during office hours transfers calls to a given extension and out of offie hours just plays a message saying the office is closed. I've worked from the example scripts but I have a problem... out of hours I get the closed message BUT during offie hours I just get 'unavaiable'

    The script I am using is as follows... I suspect the problem is to do with how the dialing code is used but I can't see any examples that don't use input ...

    Any help / suggestions gratefully received....

    <?xml version="1.0" encoding="UTF-8"?>
    <vxml version="2.0">
    <var name="working_hours" expr="'0'"/>
    <var name="working_days" expr="'0'"/>
    <form id="datetimeform">
    <object name="field1" classid="datetime">
    <filled>
    <if cond="datetime_wday &gt; '1'">
    <if cond="datetime_wday &lt; '7'">
    <assign name="working_days" expr="'1'"/>
    </if>
    </if>

    <if cond="working_days == '1'">
    <if cond="datetime_hour &lt; '9'">
    <elseif cond="datetime_hour &lt; '17'"/>
    <assign name="working_hours" expr="'1'"/>
    <else/>
    </if>
    </if>

    <if cond="working_hours == '1'">
    <object name="field2" classid="connect">
    <param name="extension" expr="'306'" />
    </object>
    <else/>
    <prompt> <audio src="closed.wav" /> </prompt>
    </if>
    <exit/>
    </filled>
    </object>
    </form>
    </vxml>

  2. #2
    Quadro Architect
    Join Date
    Jun 2006
    Location
    Around myself
    Posts
    2,075

    Default

    Your main mistake here is that you're trying to place one <object> into another <object>. I am not sure if this is allowed by general VXML rules, but it is not allowed in this parser.
    I am also not a big VXML pro, but looking into "att.log" can see some useful tips on whats going on.

    Your script should look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <vxml version="2.0">

    <var name="working_hours" expr="'0'"/>
    <var name="working_days" expr="'0'"/>

    <form id="datetimeform">

    <object name="field1" classid="datetime">
    <filled>
    <if cond="datetime_wday &gt; '1'">
    <if cond="datetime_wday &lt; '7'">
    <assign name="working_days" expr="'1'"/>
    </if>
    </if>
    <if cond="working_days == '1'">
    <if cond="datetime_hour &lt; '9'">
    <elseif cond="datetime_hour &lt; '17'"/>
    <assign name="working_hours" expr="'1'"/>
    <else/>
    </if>
    </if>
    <if cond="working_hours == '1'">
    <goto nextitem="call_to_extension"/>
    <else/>
    <prompt> <audio src="closed.wav" /> </prompt>
    </if>
    <exit/>
    </filled>
    </object>

    <object name="call_to_extension" classid="connect">
    <param name="extension" expr="'306'" />
    </object>
    <nomatch>
    <exit/>
    </nomatch>

    </form>

    </vxml>


    I tested this a bit - it seems to be working

    Best regards,
    David

  3. #3

    Default

    Quote Originally Posted by davrays View Post
    Your main mistake here is that you're trying to place one <object> into another <object>. I am not sure if this is allowed by general VXML rules, but it is not allowed in this parser.
    I am also not a big VXML pro, but looking into "att.log" can see some useful tips on whats going on.

    Your script should look like this:
    Ah brilliant will give that a try. Than you very much for the hints -- I will get there over time so sorry if these are really basic/silly errors

    Thanks again!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Time Problem
    By cornepiek in forum Problem Report
    Replies: 22
    Last Post: 03-19-2009, 05:09 PM
  2. FXO Incomming not working all the time
    By derekkmark in forum Troubleshooting and Problems
    Replies: 12
    Last Post: 01-21-2009, 10:27 AM
  3. Day Light Saving Time for Oz / NZ
    By KSComs in forum Troubleshooting and Problems
    Replies: 2
    Last Post: 10-13-2008, 01:02 PM
  4. To much time in the ringing between ext
    By mexel in forum Troubleshooting and Problems
    Replies: 4
    Last Post: 04-27-2007, 02:13 PM
  5. Time based branching.
    By threebit in forum VXML Scripting on Quadro
    Replies: 2
    Last Post: 06-21-2006, 02:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •