如何在 CentOS 5 中使用星号集成 IVR 系统?
我在CenOS 5中使用asterisk和postgresql构建了一个IPPABX系统。座席可以在他们之间进行通信,我可以拨打出站电话。
在这种情况下,如何为呼入呼叫集成 IVR?
我已经在互联网上搜索过,但我没有得到针对我的问题的具体/正确的程序。我已经知道我需要在asterisk的extension.conf和sip.conf中做一些事情。
我知道这个过程很长,但我感到沮丧的是我无法让它工作。
这是简单的 ivr 示例
[mainmenu]
exten => s,1,Answer
exten => s,2,SetMusicOnHold(default)
exten => s,3,DigitTimeout,5
exten => s,4,ResponseTimeout,10
;SAI menu - 1 for tech support, 2 for voicemail, 3 for echo test
exten => s,5,Background(sai-welcome)
exten => s,6,Background(sai-choose)
; Tech Support
exten => 1,1,AGI(dima-test.agi)
exten => 1,2,SetGlobalVar(ACCOUNTCODE=${callerid})
exten => 1,3,SetVar(testcallerid=${callerid})
exten => 1,4,Background(sai-reptech-welcome)
exten => 1,5,Queue(rep-tech)
; Leave Voicemail
exten => 2,1,VoicemailMain()
exten => 2,2,Hangup
; Echo Test
exten => 3,1,Playback(demo-echotest)
exten => 3,2,Echo
exten => 3,3,Playback(demo-echodone)
exten => 3,4,Goto(mainmenu,s,6)
; EAGI Test
exten => 4,1,Answer()
exten => 4,2,Wait(1)
exten => 4,3,AGI(sai-repid.agi)
exten => 4,4,Wait(1)
exten => 4,5,Hangup
; Play Music-on-Hold
exten => 5,1,MusicOnHold(default)
exten => 5,2,Goto(mainmenu,s,6)
; #=hangup
exten => #,1,Playback(sai-thanks)
exten => #,2,Hangup
exten => t,1,Goto(#,1) ; If they take too long, give up
exten => i,1,Playback(invalid) ; "That's not valid, try again"
对于数据库驱动的ivr,您可以使用AGI接口(例如,您可以读取 a2billing.org 项目的代码)或星号实时架构
http://www.voip-info.org/wiki/view/Asterisk+RealTime+Extensions
也可以混合使用拨号计划和func_odbc,像这样
[db_menu]
exten => s,1,Answer
exten => s,2,SetMusicOnHold(default)
exten => s,3,DigitTimeout,5
exten => s,4,ResponseTimeout,10
;SAI menu - 1 for tech support, 2 for voicemail, 3 for echo test
exten => s,n,Set(invalid_filename=silence/1)
exten => s,n,Set(filename=${ODBC_getfile(${menuid})})
exten => s,n(loop),Background(${invalid_filename}&${filename})
; return no if no choice or goto line like new_context,ext,prio
exten => _X,1,Set(have_choice=${ODBC_getivr_choice(${menuid},${EXTEN})})
exten => _X,2,GotoIF($[ "${have_choice}" == "no" ]?invalid,1)
exten => _X,n,Goto(${have_choice});
exten => invalid,1,Set(invalid_filename=${ODBC_getfile_invalid(${menuid})})
exten => invalid,n,Goto(s,loop)