本帖最後由 ckleea 於 2011-10-5 21:10 編輯
I use this dialplan to solve the problem of unable to detect DTMF in WaitExten application.
Now I can use this to answer PSTN to Asterisk, then properly read the DTMF keystrokes and proceed- [ivr-0]
- exten => 1001,1,Answer
- exten => 1001,n,SIPDtmfMode(rfc2833)
- exten => 1001,n,Wait()
- exten => 1001,n,Background(thank-you-for-calling,m)
- exten => 1001,n,Background(vm-enter-num-to-call,m)
- exten => 1001,n,Read(Newext,,9)
- exten => 1001,n,GotoIf(${Newext:0:1} = 2,3,6?dlocal)
- exten => 1001,n,GotoIf(${Newext:0:1} = 9?dhk)
- exten => 1001,n,GotoIf(${Newext:0:1} = 0,4,5,7,8?derr)
- exten => 1001,n(dlocal),Dial(LOCAL/${Newext})
- exten => 1001,n(dhk),DIAL(SIP/**8133${Newext:1}@obitrunk)
- exten => 1001,n(derr),Goto(1001,1)
- ;exten => 1001,n,WaitExten()
- ;exten => 1001,n, Dial(LOCAL/${Newext})
- ;exten => 1001,n,Goto(1001,1)
- exten => 1001,n,Hangup
複製代碼 |