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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.