【发布时间】:2017-09-19 06:34:46
【问题描述】:
如何在语音文件播放过程中返回 DTMF 输入。 我正在从 Asterisk 拨号计划和要返回收集的 DTMF 的 vxml 文件执行 AGI。 这是我的 vxml
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="top">
<property name="inputmodes" value="dtmf"/>
<field name="mydigits" type="digits?maxlength=1">
<prompt>
<audio type="audio/basic" src="http://127.0.0.1/soundfiles/mysound.wav"/>
</prompt>
<grammar mode="dtmf" version="1.0">
<rule id="digit" scope="public">
<one-of>
<item> 1 </item>
<item> 2 </item>
<item> 3 </item>
</one-of>
</rule>
</grammar>
</field>
<filled mode="any">
<return namelist="mydigits"/>
</filled>
</form>
</vxml>
我从我的星号拨号计划中读到:-
;;this will call the local hosted vxml file above
exten => 1,n,Agi(agi://127.0.0.1/url=${vxmlurl})
;;try to read the data set at vxml file.
exten => 1,n,Verbose(0, "got mydigits ${mydigits} !")
但除了 Asterisk 拨号计划变量为空之外,它什么都没有。
知道我错过了什么吗?
【问题讨论】: