简体   繁体   中英

Visual Dialplan + Asterisk Pbx

i have problem with my dial plan. I am using some php codes for looping and i am getting dynamic data in array. Ex: One username have maybe 2 or more accounts. I am getting account names and i am choosing a account.

i am using background option in loop for playing account names and context. When i press button 2,3 or 4 dial plan going to context and context pattern. So its working. But button 1 not working. I am getting extension error. I have no idea about why?

[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'

and this is my config file;

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)

Thank you.

Dialplan you shown not have any option for 1,2,3 or 4

Background app usually used like this:

; 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);

Also you have Read app, which play and collect digit.

So background app not collect anything. Issue is not background app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM