PDA

View Full Version : Out of hours and bilingual IVR



Synertic
05-05-2007, 02:07 AM
Hi all i need insert the # key to acces the directory and permit dial directly the extention number in this script.

<?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="bienvenu.wav" /> </prompt>
<prompt> <audio src="fermer.wav" /> </prompt>
<exit/>
</if>
<if cond="datetime_wday == '7'">
<prompt> <audio src="bienvenu.wav" /> </prompt>
<prompt> <audio src="fermer.wav" /> </prompt>
<exit/>
</if>
<if cond="datetime_hour &amp;gt; '8'">
<if cond="datetime_hour &amp;lt; '17'">
<prompt> <audio src="bienvenu.wav" /> </prompt>
<goto nextitem="field1" />
<elseif cond="datetime_hour == '17'"/>
<if cond="datetime_min &amp;lt; '31'">
<prompt> <audio src="bienvenu.wav" /> </prompt>
<goto nextitem="field1" />
<elseif cond="datetime_min &amp;gt; '30'" />
<prompt> <audio src="bienvenu.wav" /> </prompt>
<prompt> <audio src="fermer.wav" /> </prompt>
<exit/>
<assign name="field1" expr="'37'"/>
<goto nextitem="field2" /> &amp; nbsp;
</if>
<elseif cond="datetime_hour gt; '17'"/>
<prompt> <audio src="bienvenu.wav" /> </prompt>
<prompt> <audio src="fermer.wav" /> </prompt>
<exit/>
<assign name="field1" expr="'37'"/>
<goto nextitem="field2" />
</if>
<else/>
<prompt> <audio src="bienvenu.wav" /> </prompt>
<prompt> <audio src="fermer.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="selection.wav" />
</prompt>
<option dtmf="1" value="2411" />
<option dtmf="2" value="2611" />
<option dtmf="3" value="2811" />& nbsp;
<filled>
<goto nextitem="field2"/>
</filled>
</field>

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

</form>

</vxml>

arsen
05-07-2007, 06:02 PM
Find below the script you are asking for.

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<noinput count="3">
<prompt> <audio src="timeover.wav" /> </prompt>
<exit/>
</noinput>
<form id="mainform">
<link dtmf="#" next="#dirspell"/>
<block>
<prompt bargein="true"> <audio src="attwelcome.wav" /> </prompt>
<goto nextitem="field1"/>
</block>
<field name="field1" type="digits?length=2" modal="false">
<prompt timeout="5s"> <audio src="attcntmenu.wav" /> </prompt>
<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>
<prompt> <audio src="attinvext.wav" /> </prompt>
<goto nextitem="field1"/>
</nomatch>
</object>
</form>

<!-- dir variables declaration -->
<var name="varExtension"/>
<var name="varFilename"/>
<var name="varRoll" expr="'true'"/>


<!-- spell form, contains main directory object inside -->
<form id="dirspell">
<link dtmf="*" next="#mainform"/>
<object name="field1" classid="directory">
<!-- roll param specifies whether directory object -->
<!-- should roll over the spelled entries or just wait for input to spell -->
<param name="roll" expr="varRoll"/>
<prompt> <audio src="pubdirspell.wav" /> </prompt>
<nomatch>
<!-- invalid input, cannot spell the name -->
<prompt> <audio src="nomatch.wav" /> </prompt>
<reprompt/>
</nomatch>
<filled>
<!-- spelling is complete -->
<!-- spelled extension and attached to it file should be stored -->
<assign name="varExtension" expr="_extension" />
<assign name="varFilename" expr="_filename" />
<assign name="varRoll" expr="'false'" />
<goto next="#diraccept"/>
</filled>
</object>
</form>

<!-- accept menu, plays file attached to spelled extension -->
<!-- and offers three choices to input -->
<menu id="diraccept">
<prompt> <audio expr="varFilename" /> </prompt>
<prompt> <audio src="pubdiraccept.wav" /> </prompt>
<choice dtmf="1" next="#dirroll"/>
<choice dtmf="*" next="#dirspell"/>
<choice dtmf="#" next="#dirmainform"/>
</menu>

<!-- roll form, sets varRoll to true to perform roll over the spelled entries -->
<form id="dirroll">
<block>
<assign name="varRoll" expr="'true'" />
<goto next="#dirspell"/>
</block>
</form>

<!-- main form, dials to already spelled and accepted extension -->
<form id="dirmainform">
<object name="field2" classid="connect">
<param name="extension" expr="varExtension"/>
<filled>
<prompt> <audio src="timeover.wav" /> </prompt>
<exit/>
</filled>
<nomatch>
<goto next="#dirspell"/>
</nomatch>
</object>
</form>

</vxml>

________
RHODE ISLAND MARIJUANA DISPENSARY (http://rhodeisland.dispensaries.org/)
________
Beverly4u (http://www.girlcamfriend.com/cam/Beverly4u/)