在星号中寻求有关IVR菜单的帮助 [英] Seek Help concerning IVR Menu in Asterisk

查看:85
本文介绍了在星号中寻求有关IVR菜单的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个IVR菜单,并且需要允许我的用户在通信退出期间随时按0.以下是我的操作方法:

I am writing an IVR menu and I need to allow my users to press 0 anytime during the communication to exit. The following is how I do it:

exten => 0,1,Playback(good-bye)
exten => 0,2,Playback(beep)
exten => 0,3,Hangup

但是,这样做的话,当用户在回放某些文件或进行其他操作时按零时,他/她无法退出,就好像他/她没有按零时一样.我希望我足够清楚,您可以在此方面为我提供帮助. 欢呼

However, by doing so, when the user presses zero while some file is being played back or some other operation is taking place, he/she cannot exit, it is like if he/she didn't press zero. I hope I am clear enough and that you can help me out with this. cheers

推荐答案

对于IVR,您想使用Background()和/或WaitExten()代替Playback().这是一个示例IVR拨号计划:

For an IVR, you want to use Background() and/or WaitExten() instead of Playback(). Here's a sample IVR dialplan:

[ivr_main]
; answer and play announcement
exten => s,1,Set(TIMEOUT(response)=2)
exten => s,2,Set(TIMEOUT(digit)=2)
exten => s,3,BackGround(/your/audio/file/announcement)
exten => s,4,WaitExten(2)
exten => s,5,GoTo(s|3) ; careful of this loop here! should GoTo() somewhere else!
; handle key presses
exten => 0,1,Playback(good-bye)
exten => 0,2,Playback(beep)
exten => 0,3,Hangup()
exten => 1,1,NoOp(do this if user presses 1)
exten => 2,1,NoOp(do this if user presses 2)
exten => 3,1,NoOp(do this if user presses 3)
exten => 4,1,NoOp(do this if user presses 4)
exten => 5,1,NoOp(do this if user presses 5)
; handle invalid key presses
exten => i,1,Playback(pbx-invalid)
exten => i,2,GoTo(s|3)
; handle time out (user did not make a selection)
exten => t,1,GoTo(0|1)   ; go to Hangup :-)

希望这会有所帮助.

在Asterisk CLI中,对这些应用程序的手册执行显示应用程序背景"和显示应用程序WaitExten".

In the Asterisk CLI, do 'show application Background' and 'show application WaitExten' for the manual of these applications.

这篇关于在星号中寻求有关IVR菜单的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆