Asterisk Dialplan WaitExten() waits only for one digit
I'm trying to create sort of telephony gateway for home usage, in case I call to my number, I can dial list of numbers I've already defined. I've made an authentication for it, here is an example of my extentions.conf:
exten => s,n,Background(${sdir}/dial-exten-tone)
exten => s,n,WaitExten()
exten => *8,1,Authenticate(5)
exten => *8,2,Goto(private-gateway,s,1)
[private-gateway]
exten => s,1,Background(${sdir}/ent-target-attendant)
exten => s,2,WaitExten()
exten => s,n,NoOp(${EXT})
exten => 100XXX,n,Goto(local-users,${EXTEN},1)
The idea is to call my private number, press 8, then get authenticated with pass 5 and then go to private-gateway context, with ability to call to local users. Unfortunately,开发者_运维问答 as soon as I press any number in private-gateway context I've got following warning:
-- Executing [*8@netlife-ivr:1] Authenticate("Datacard/life6464-b4b9", "5") in new stack
-- <Datacard/life6464-b4b9> Playing 'agent-pass.gsm' (language 'en')
-- <Datacard/life6464-b4b9> Playing 'auth-incorrect.gsm' (language 'en')
-- <Datacard/life6464-b4b9> Playing 'auth-thankyou.gsm' (language 'en')
-- Executing [*8@netlife-ivr:2] Goto("Datacard/life6464-b4b9", "private-gateway,s,1") in new stack
-- Goto (private-gateway,s,1)
-- Executing [s@private-gateway:1] BackGround("Datacard/life6464-b4b9", ""/var/lib/asterisk/sounds/ru/"/ent-target-attendant") in new stack
-- <Datacard/life6464-b4b9> Playing '/var/lib/asterisk/sounds/ru//ent-target-attendant.slin' (language 'en')
-- Executing [s@private-gateway:2] WaitExten("Datacard/life6464-b4b9", "") in new stack
[Aug 14 12:37:55] WARNING[27531]: pbx.c:4902 __ast_pbx_run: Invalid extension '1', but no rule 'i' or 'e' in context 'private-gateway'
Which means - it doesn't wait for the whole number, but waits for the first one. What am I doing wrong?
Use Asterisk's app Disa() - that should do what you want
精彩评论