Forums  

Go Back   Forums > Quadro Customization and Enhancement > VXML Scripting on Quadro
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 06-02-2009, 03:42 PM   #1
blackbirduk
Junior Member
 
Join Date: May 2009
Posts: 2
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>
blackbirduk is offline   Reply With Quote
Old 06-03-2009, 07:30 PM   #2
davrays
Quadro Architect
 
davrays's Avatar
 
Join Date: Jun 2006
Location: Around myself
Posts: 2,083
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
davrays is offline   Reply With Quote
Old 06-03-2009, 11:14 PM   #3
blackbirduk
Junior Member
 
Join Date: May 2009
Posts: 2
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!
blackbirduk is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 05:00 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
© Copyright 2013 Epygi Technologies LTD