Asterisk Dialplan WaitExten() 仅等待一位数字
我正在尝试创建一种供家庭使用的电话网关,如果我拨打我的号码,我可以拨打我已经定义的号码列表。我已经对其进行了身份验证,这是我的extendions.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)
这个想法是拨打我的私人号码,按8,然后使用pass 5进行身份验证,然后进入私人网关上下文,能够调用给本地用户。 不幸的是,一旦我在私人网关上下文中按下任何数字,我就会收到以下警告:
-- 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'
这意味着 - 它不会等待整个数字,而是等待第一个数字。我做错了什么?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Asterisk 的应用程序 Disa() - 它应该可以满足您的需求
Use Asterisk's app Disa() - that should do what you want