PDA

View Full Version : IVR and DID



asantos
08-27-2008, 12:30 PM
I have got a working IVR with timo condition.
Now i would like to had somo new funcionality.
When some one call he hears a welcom message and then the menu options.
What i would like to acheave is something like, if some one call number 555 i.e. it plays the welcome plus menu option message. If some calls to number 554 he listens to the welcome message, but then it starts to ring on a predefined extention. Is this possible? how?

Thanks,

André

davrays
08-27-2008, 03:38 PM
Sure, thats possible. You need to have two attendant extensions (555 and 554). I guess you have now the script for the attendant 555, right?
For the 554 you should do the same, but instead of playing the menu option message, you just use the "connect" object directly:
***********************************
<object name="callto556" classid="connect">
<param name="extension" expr="556"/>
</object>
***********************************

This will call to ext. 556.

If you need more details, you can paste here the script you are using for ext 555, and I'll modify that for 554.

asantos
08-28-2008, 03:28 AM
Well, i am not so sure if i have explained my self clearly. The company as a general number in the form of XXXXXX100. When some one call the company to this number it hears the welcome message as the options menu plays and the person chooses what department it wants to talk to.
What i would like to achieve now, is some one o call to the technical department to the number XXXXXX103, also hears the welcome message, and immediately an extensions in the technical department (99 i.e.) starts to ring.
How do i achieve this?

The script that is running is the one below.

Can you help me?

Thanks,
Andre


<?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="Horario.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_wday == '7'">
<prompt><audio src="Horario.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="Horario.wav" /></prompt>
<exit/>
</if>
</if>
<if cond="datetime_hour == '13'">
<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_hour == '14'">
<if cond="datetime_min &lt; '30'">
<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</if>
</if>

<prompt><audio src="Benvindo.wav"/></prompt>
<goto nextitem="field1"/>

</if>

</if>
<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</filled>
</object>

<field name="field1" type="digits?length=1" modal="false">
<prompt timeout="5s">
<audio src="opcoes.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>

davrays
08-28-2008, 06:31 AM
Hi Andre,

you need to add an attendant extension, with the following script, and route all calls to the XXXXXX103, to that attendant.

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<form id="mainform">
<object name="dtfield" classid="datetime">

<filled>
<!-- CONDICOES DE FIM DE SEMANA -->
<if cond="datetime_wday == '1'">

<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_wday == '7'">
<prompt><audio src="Horario.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="Horario.wav" /></prompt>
<exit/>
</if>
</if>
<if cond="datetime_hour == '13'">
<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</if>
<if cond="datetime_hour == '14'">
<if cond="datetime_min &lt; '30'">
<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</if>
</if>

<prompt><audio src="Benvindo.wav"/></prompt>
<goto nextitem="field1"/>

</if>

</if>
<prompt><audio src="Horario.wav" /></prompt>
<exit/>
</filled>
</object>

<object name="field1" classid="connect">
<param name="extension" expr="'99'"/>
<filled>
<exit/>
</filled>
<nomatch>
<exit/>
</nomatch>
</object>
</form>
</vxml>

This script calls to ext 99 after listening to the welcome message (Benvindo.wav). I just removed the "noinput" part from your script, and replaced the options with a direct call to extension 99.

Create an extension of type "AutoAttendant" (for example extension "10"), set that to use a custom script, upload this script there, and make sure the calls to XXXXXX103 are going to that extension. For that either put the XXXXXX103 as a username on extension 10, or use any other way (e.g. forwarding).