PDA

View Full Version : IVR to extensions



vos
06-29-2009, 03:51 AM
Hi All

I am running a basic script and would like to add the facility where the caller can dial the extension if they know it. I have tried increasing the digit length to 2 and adding <option dtmf="31" value="31" /> but the script always picks the 1st digit. I guess this is fairly simple to someone who knows xml :o)

Is there anyone who can help please? Here is the original script.

Cheers

Andy

<?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">
<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="departments.wav" />
</prompt>
<option dtmf="1" value="31" />
<option dtmf="2" value="32" />
<option dtmf="3" value="33" />
<option dtmf="4" value="34" />
<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>

davrays
06-30-2009, 11:48 AM
As soon as caller presses "3", the "<option dtmf="3" value="33" />" works, so your call goes to 33. You can remove the option "3", and you will be able to call to extensions starting with 3. To be able to call to extensions starting with 2, you will have to remove the option "2".

You can do it different way - you can keep the 1-4 options, but have your callers dial one additional digit in front of extension number, for example have:

<field name="field1" type="digits?length=3" modal="false">
...
<option dtmf="1" value="31" />
<option dtmf="2" value="32" />
<option dtmf="3" value="33" />
<option dtmf="4" value="34" />
<option dtmf="031" value="31" />
<option dtmf="034" value="34" />

i.e. prefix extensions with "0".

I am not sure this is the best way, but as far as I am also not a specialist in vxml, this is what I can suggest to do.. :)

Best regards,
David

vos
07-07-2009, 12:31 PM
Hi David

Many thanks for your thoughts here.

I will give it a bash.

Regards
Andy