Visual Dialplan + Asterisk Pbx

时间:2015-09-15 15:00:25

标签: ip asterisk voip pbx

我的拨号方案有问题。我使用一些PHP代码进行循环,我在数组中获取动态数据。例如:一个用户名可能包含2个或更多帐户。我正在获取帐户名称,我正在选择一个帐户。

我在循环中使用后台选项来播放帐户名和上下文。当我按下按钮2,3或4拨打计划去上下文和上下文模式。所以它的工作。但是按钮1不起作用。我收到扩展错误。我不知道为什么?

[2015-09-15 17:30:31] WARNING[26175][C-0000077d]: pbx.c:6696 __ast_pbx_run: Invalid extension '1', but no rule 'i' or 'e' in context 'Net-IVR-EN-ID'

这是我的配置文件;

exten => multi_wdsl,n,AGI(n_get_adres_wdsl.php,ara=${acc_number})
exten => multi_wdsl,n(lbl_Net-IVR-EN-ID_16),Set(counterplus=${MATH(${counter}+1,i)})
exten => multi_wdsl,n(lbl_Net-IVR-EN-ID_17),Set(TIMEOUT(response)=10)
exten => multi_wdsl,n,Set(TIMEOUT(digit)=10)
exten => multi_wdsl,n,Background(${ses${counter}}&/var/lib/asterisk/sounds/e/i/${counterplus},,en,WDSL_MENU)
exten => multi_wdsl,n,Set(counter=${MATH(${counter}+1,i)})
exten => multi_wdsl,n,GotoIf($["${wdsl_total}" = "${counter}"]?:lbl_Net-IVR-EN-ID_16)
exten => multi_wdsl,n,Set(TIMEOUT(response)=10)
exten => multi_wdsl,n,Set(TIMEOUT(digit)=10)
exten => multi_wdsl,n,Background(5sec&custom/custom/se,,en,WDSL_MENU)
exten => multi_wdsl,n,Goto(Net-IVR-EN-ID,multi_wdsl,1)
exten => i,1,Goto(multi_wdsl,lbl_Net-IVR-EN-ID_17)
exten => multi_wdsl__,1,Read(ir,custom/custom/ir,1,,5,10)
exten => multi_wdsl__,n,GotoIf($["${ir}" = "*"]?:lbl_Net-IVR-EN-ID_18)
exten => multi_wdsl__,n,Goto(Net-IVR-EN-ID,multi_wdsl,1)
exten => multi_wdsl__,n(lbl_Net-IVR-EN-ID_18),GotoIf($["${ir}" = "0"]?:lbl_Net-IVR-EN-ID_19)
exten => multi_wdsl__,n,Goto(Net-IVR-EN,multi_wdsl,1)
exten => multi_wdsl__,n(lbl_Net-IVR-EN-ID_19),Playback(custom/se/wrong_button)
exten => multi_wdsl__,n,Goto(Net-IVR-EN,multi_wdsl,1)

谢谢。

1 个答案:

答案 0 :(得分:0)

您显示的拨号方案没有1,2,3或4的任何选项

后台应用通常像这样使用:

; this one just play file, not collect any input
exten => multi_wdsl,n,Background(5sec&custom/custom/se,,en,WDSL_MENU)
exten => multi_wdsl,n,WaitExten(5); on this stage it wait for input and go extension you entered
exten  => 1,1,Noop(do something for 1)
exten  => 2,1,Noop(do somethign for 2)
exten  => i,1,Noop(invalid input);

你也有阅读应用程序,可以播放和收集数字。

所以后台应用程序不收集任何东西。问题不是后台应用程序。