![]() |
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: May 2009
Posts: 2
|
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 > '1'"> <if cond="datetime_wday < '7'"> <assign name="working_days" expr="'1'"/> </if> </if> <if cond="working_days == '1'"> <if cond="datetime_hour < '9'"> <elseif cond="datetime_hour < '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 |
|
Quadro Architect
Join Date: Jun 2006
Location: Around myself
Posts: 2,083
|
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 > '1'"> <if cond="datetime_wday < '7'"> <assign name="working_days" expr="'1'"/> </if> </if> <if cond="working_days == '1'"> <if cond="datetime_hour < '9'"> <elseif cond="datetime_hour < '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 | |
|
Junior Member
Join Date: May 2009
Posts: 2
|
Quote:
![]() Thanks again! |
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |