Jump to content
Калькуляторы

Голосовое меню на Cisco 2811

Уважаемые знатоки!

 

Прошу помощи в настройке голосового меню, дано: Cisco 2811 с установленным на нее Call Manager Express, вот наш конфиг и vxml.

Нам нужно чтобы при входящем звонке (с любым телефонным номером и даже с неизвестным номером) с FXO был проигран голосовой файл и в тоновом наборе можно было сделать звонок на внутренние телефонные номера. Что мы делаем не так.

 

 

dial-peer voice 777 pots

service menu

incoming called-number T

direct-inward-dial

no sip-register

 

<xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1" >

 

<var name="DestNumber"/><!-- Variable used to store the destination number -->

 

<form id="Start">

<block>

<prompt bargein="false"><!-- You cannot interrupt this prompt -->

<audio src="tftp://10.0.0.11/skype.au"/>

</prompt>

<goto next="#Main"/><!-- Goto оно и в Африке Goto -->

</block>

</form>

 

<form id="Main">

<field name="getdigit" type="digits?length=1"><!-- Expect one digit to be entered -->

<grammar type="application/grammar+regex">[123]</grammar><!-- Expect 1, 2 or 3 as user input -->

<noinput><!-- Play the following files if user did not input any digits -->

<prompt>

<audio src="flash:beep.au"/>

<audio src="flash:skype.au" caching="fast"/>

</prompt>

</noinput>

 

<nomatch><!-- If you enter wrong digit first time, you will hear short beep -->

<prompt bargein="true">

<audio src="flash:beep.au" caching="fast"/>

<audio src="flash:skype.au" caching="fast"/>

</prompt>

</nomatch>

 

<prompt bargein="true"><!-- This prompt is interruptable -->

<audio src="flash:/skype.au" caching="fast"/>

</prompt>

 

<filled> <!-- Right digits were caught -->

<if cond="getdigit=='1'">

<assign name="DestNumber" expr="'phone://1001'"/>

<goto next="#TransferToDestNumber"/>

<elseif cond="getdigit=='2'"/>

<goto next="#Sub1"/>

<elseif cond="getdigit=='3'"/>

<prompt bargein="true">

<audio src="flash:beep.au" caching="fast"/>

</prompt>

<disconnect/>

<else/>

</if>

</filled>

</field>

</form>

 

<form id="Sub1">

<field name="GetDigits" type="digits?length=1"><!-- Видимо RegExp имеет приоритет, т.к. скрипт дожидался всех четырех цифр -->

<grammar type="application/grammar+regex">[1][0-9][0-9][0-9]</grammar><!-- Expect [1]... as user input -->

<noinput><!-- Play the following files if user did not input any digits -->

<prompt>

<audio src="flash:beep.au"/>

<audio src="flash:beep.au" caching="fast"/>

</prompt>

</noinput>

 

<nomatch>

<prompt bargein="true">

<audio src="flash:beep.au" caching="fast"/>

</prompt>

</nomatch>

 

<prompt bargein="true"><!-- This prompt is interruptable -->

<audio src="flash:/skype.au" caching="fast"/>

</prompt>

 

<filled> <!-- Right digits were caught -->

<assign name="DestNumber" expr="'phone://' + GetDigits"/>

<goto next="#TransferToDestNumber"/>

</filled>

</field>

</form>

 

<form id="TransferToDestNumber">

<transfer connecttimeout="20s" name="mycall" destexpr="DestNumber" bridge="false"> </transfer>

<block>

<prompt bargein="true">

<audio src="flash:beep.au" caching="fast"/>

<audio src="flash:beep.au" caching="fast"/>

</prompt>

<disconnect/>

</block>

</form>

 

</vxml>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this