asantos
08-21-2008, 05:19 AM
Hi, i have read this forum related to IVR, but still can not make my IVR menu to work.
If it is Saturday or Sunday i want it to play weekend.wav, if it is weekday in time betwenn 18h00 and 8h59 and 12h30 to 14h00 e should play closed.wav, else it should play welcome message and go to the IVR menu.
Can anyone tell what is wrong?
Thank a lot
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<noinput count="3">
<assign name="field1" expr="'10'"/>
<goto nextitem="field2"/>
</noinput>
<form id="mainform">
<object name="dtfield" classid="datetime">
<filled>
<!-- CONDICOES DE FIM DE SEMANA -->
<if cond="datetime_wday == '1'">
<prompt><audio src="weekend.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_wday == '7'">
<prompt><audio src="weekend.wav" /></prompt>
<exit/>
</if>
<!-- HORARIO -->
<if cond="datetime_hour &gt; '8'">
<if cond="datetime_hour &lt; '18'">
<if cond="datetime_hour == '12'">
<if cond="datetime_min &gt; '30'">
<prompt><audio src="closed.wav" /></prompt>
<exit/>
</if>
</if>
<if cond="datetime_hour == '13'">
<prompt><audio src="closed.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_hour == '14'">
<if cond="datetime_min &lt; '30'">
<prompt><audio src="closed.wav" /></prompt>
<exit/>
</if>
</if>
<assign name="field1" expr="'10'"/>
<goto nextitem="field2" />
</if>
<else/>
<prompt> <audio src="closed.wav" /></prompt>
<exit/>
</if>
</filled>
</object>
<field name="field1" type="digits?length=1" modal="false">
<block>
<prompt bargein="true"> <audio src="welcome.wav"/> </prompt>
<goto nextitem="field1"/>
</block>
<prompt timeout="5s">
<audio src="options.wav" />
</prompt>
<option dtmf="1" value="10" />
<option dtmf="2" value="14" />
<option dtmf="3" value="10" />
<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>
If it is Saturday or Sunday i want it to play weekend.wav, if it is weekday in time betwenn 18h00 and 8h59 and 12h30 to 14h00 e should play closed.wav, else it should play welcome message and go to the IVR menu.
Can anyone tell what is wrong?
Thank a lot
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<noinput count="3">
<assign name="field1" expr="'10'"/>
<goto nextitem="field2"/>
</noinput>
<form id="mainform">
<object name="dtfield" classid="datetime">
<filled>
<!-- CONDICOES DE FIM DE SEMANA -->
<if cond="datetime_wday == '1'">
<prompt><audio src="weekend.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_wday == '7'">
<prompt><audio src="weekend.wav" /></prompt>
<exit/>
</if>
<!-- HORARIO -->
<if cond="datetime_hour &gt; '8'">
<if cond="datetime_hour &lt; '18'">
<if cond="datetime_hour == '12'">
<if cond="datetime_min &gt; '30'">
<prompt><audio src="closed.wav" /></prompt>
<exit/>
</if>
</if>
<if cond="datetime_hour == '13'">
<prompt><audio src="closed.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_hour == '14'">
<if cond="datetime_min &lt; '30'">
<prompt><audio src="closed.wav" /></prompt>
<exit/>
</if>
</if>
<assign name="field1" expr="'10'"/>
<goto nextitem="field2" />
</if>
<else/>
<prompt> <audio src="closed.wav" /></prompt>
<exit/>
</if>
</filled>
</object>
<field name="field1" type="digits?length=1" modal="false">
<block>
<prompt bargein="true"> <audio src="welcome.wav"/> </prompt>
<goto nextitem="field1"/>
</block>
<prompt timeout="5s">
<audio src="options.wav" />
</prompt>
<option dtmf="1" value="10" />
<option dtmf="2" value="14" />
<option dtmf="3" value="10" />
<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>