PDA

View Full Version : Out of hours



sharkbyte
08-04-2006, 12:25 AM
I have created an Auto Attendant scenario based on the examples and it
works very well. However I would like it to play a different Auto
Attendant message when outside of office hours.

I have noticed the VXML supports the datetime variables, but I haven't managed to get this to work yet.

Any help would be great...

sharkbyte
08-04-2006, 12:30 AM
My current code is:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<noinput count="1">
<assign name="field1" expr="'11'"/>
<goto nextitem="field2" />
</noinput>
<form id="mainform">
<block>
<prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
<goto nextitem="field1" />
</block>
<field name="field1" type="digits?length=1" modal="false">
<prompt timeout="5s">
<audio src="select.wav" />
</prompt>
<option dtmf="1" value="11" />
<option dtmf="2" value="11" />
<option dtmf="3" value="11" />
<filled>
<goto nextitem="field2"/>
</filled>
</field>
<object name="field2" classid="connect">
<param name="extension" expr="field1"/>
<filled>
<prompt> <audio src="timeover.wav" /> </prompt>
<exit/>
</filled>
<nomatch>
<goto nextitem="field1"/>
</nomatch>
</object>
</form>
</vxml>

arsen
08-08-2006, 02:14 PM
Instead of <block> with simple prompt in your example
<block>
<prompt bargein="true"> <audio
src="welcome.wav" /> </prompt>

<goto
nextitem="field1" />
</block>


use datetime <object> to retrieve current date and time
<object name="field1" classid="datetime">
<filled>

<if cond="datetime_hour &amp;lt; '18'">
<prompt>
<audio src="welcome.wav" /> </prompt>

<else/>
<prompt> <audio src="outofoffice.wav"
/> </prompt>
</if>
<goto
nextitem="field1" />
</filled>
</object>


The following date and time variables also can be used.
"datetime_sec"
"datetime_min"
"datetime_hour"
"datetime_mday"
"datetime_month"
"datetime_year"
"datetime_wday"
"datetime_yday"



________
Drugtest (http://drugtestingkit.org)
________
Depakote Lawyer (http://www.classactionsettlements.org/lawsuit/depakote/)

guillermobmi
08-10-2006, 02:06 AM
Hello,


Maybe you can do it in the call routing table. You can make two AAs, one for office hours and one for outside office hours. Then you can make two entries in the routing table, filtering them for date/time period.


For example, if you have one AA in extension 60 and second one in 61, you can maketwo entries in the call routing table, say both 62, and filterthem for the office hours. If it is in office hours you send it to 60 and if it is not send it to 61. You can do it with less extensions and entries if you get the idea.





I hope you could understand my idea and my english too; it´s not my mother language. smileys/smiley5.gif

sharkbyte
09-05-2006, 12:11 AM
Here is my script, it plays out of office message after 17:30 and before 09:00 plus all day sat and sun:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<noinput count="1">
<assign name="field1" expr="'11'"/>
<goto nextitem="field2" />
</noinput>

<form id="mainform">

<object name="dtfield" classid="datetime">
<filled>
<if cond="datetime_wday == '1'">
<prompt> <audio src="welcome.wav" /> </prompt>
<prompt> <audio src="closed.wav" /> </prompt>
<exit/>
</if>
<if cond="datetime_wday == '7'">
<prompt> <audio src="welcome.wav" /> </prompt>
<prompt> <audio src="closed.wav" /> </prompt>
<exit/>
</if>
<if cond="datetime_hour &amp;gt; '8'">
<if cond="datetime_hour &amp;lt; '17'">
<prompt> <audio src="welcome.wav" /> </prompt>
<goto nextitem="field1" />
<elseif cond="datetime_hour == '17'"/>
<if cond="datetime_min &amp;lt; '31'">
<prompt> <audio src="welcome.wav" /> </prompt>
<goto nextitem="field1" />
<elseif cond="datetime_min &amp;gt; '30'" />
<prompt> <audio src="welcome.wav" /> </prompt>
<prompt> <audio src="closed.wav" /> </prompt>
<exit/>
<assign name="field1" expr="'37'"/>
<goto nextitem="field2" />& nbsp;
</if>
<elseif cond="datetime_hour gt; '17'"/>
<prompt> <audio src="welcome.wav" /> </prompt>
<prompt> <audio src="closed.wav" /> </prompt>
<exit/>
<assign name="field1" expr="'37'"/>
<goto nextitem="field2" />
</if>
<else/>
<prompt> <audio src="welcome.wav" /> </prompt>
<prompt> <audio src="closed.wav" /> </prompt>
<exit/>
<assign name="field1" expr="'37'"/>
<goto nextitem="field2" />
</if>
</filled>
</object>

<field name="field1" type="digits?length=1" modal="false">
<prompt timeout="5s">
<audio src="select.wav" />
</prompt>
<option dtmf="1" value="11" />
<option dtmf="2" value="11" />
<option dtmf="3" value="11" />
<filled>
<goto nextitem="field2"/>
</filled>
</field>

<object name="field2" classid="connect">
<param name="extension" expr="field1"/>
<filled>
<prompt> <audio src="timeover.wav" /> </prompt>
<exit/>
</filled>
<nomatch>
<goto nextitem="field1"/>
</nomatch>
</object>

</form>

</vxml>