Twilio<;聚集>;,numDigits=";3“;或按0
我觉得这是一个简单的问题。也许它是如此简单以至于以前从来没有人问过它?我似乎找不到答案,也弄不明白 调用者看到的第一个TwiML如下所示Twilio<;聚集>;,numDigits=";3“;或按0,twilio,twilio-twiml,Twilio,Twilio Twiml,我觉得这是一个简单的问题。也许它是如此简单以至于以前从来没有人问过它?我似乎找不到答案,也弄不明白 调用者看到的第一个TwiML如下所示 <Response> <Gather action="handle-extension.php" numDigits="3"> <Play>greatings/maingreating.mp3</Play> <!-- Hello, if you know your p
<Response>
<Gather action="handle-extension.php" numDigits="3">
<Play>greatings/maingreating.mp3</Play>
<!-- Hello, if you know your party's 3 digit extenstion, please dial it at any time or press 0 for the directory. Otherwise, pelase hold while we find someone to take your call. -->
</Gather>
<!-- If customer doesn't input anything, prompt and try again. -->
<Redirect>handle-queue-main.php</Redirect>
</Response>
greatings/maingrating.mp3
handle-queue-main.php
调用者应该能够拨打一个3位数的分机,并且该信息应该被传递到“handle extension.php”。这很好,但是。。。如果呼叫者拨“0”查找目录,则gather将继续等待额外的2位数字
在搜索时,我确实发现显然可以在numdigit中使用“”,如下所示:
<Gather action="handle-extension.php" numDigits="< 3">
但这给了我与原始代码相同的结果
我想到的另一个解决方案是:
<Gather action="handle-extension.php" numDigits="3" finishOnKey="0">
但是对于那些没有扩展的扩展来说,这是行不通的(101向下一个脚本发送“1”,110向下一个脚本发送“11”,等等)
也许简单的解决方案是将目录扩展名改为#,但坦率地说,这不是我想要的
有什么建议吗?我想做的是可能的吗
谢谢你抽出时间!:) 我不知道有什么方法可以确切地完成你想做的事情 话虽如此,您可以做两件简单的事情:
- 要求客户在进入后按#(使用finishOnKey属性)
- 设置超时而不是位数
希望这有帮助。很抱歉,答案令人失望。超时路线是我甚至没有考虑过的!这是一个很好的建议,我现在将实施它。谢谢