Ivr on extension_custom direct dial doesnt work


(Josef Vlcek) #1

My code is this:

[custom-tts-ivr]
include => from-did-direct-ivr
;verificacion del celular registrado
exten => s,1,Noop(Entering custom IVR setup in extensions_custom.conf)
exten => s,n,Verbose(Testando Google TTS ${CALLERID(num)});
exten => s,n,Answer(3);
exten => s,n,Agi(nroRegGb.php,${CALLERID(num)});
exten => s,n,GotoIf($[?${sucu}? = ?0?]?err);
;exten => s,n,GotoIf($[ ?${sucu}? = ?0?]?err2);
exten => s,n,GotoIf($[ ?${cantPaq}? != ?0? ]?oK:ok1);
;vericacion del CI
exten => s,n(err),Read(ci,custom/12,8,2);
;exten => s,n,Read(ci,?silence/2?,8,6); here is working, if i put my local ID i dont need to wait all the playback

exten => s,n,Agi(ciRegGb.php,${ci});
exten => s,n,Verbose(Testando var ${sucu});
exten => s,n,Verbose(Testando var ${nombre});
exten => s,n,Verbose(Testando var ${cantPaq});
exten => s,n,GotoIf($[ ?${nombre}? = ?nuevo? ]?err1);
exten => s,n,GotoIf($[ ?${nombre}? = ?nuevo? ]?err2);
exten => s,n,GotoIf($[ ?${cantPaq}? != ?0? ]?oK:ok1);
;nuevo cliente
exten => s,n(err1),Goto(nuevo-cliente,s,1);
;no se detecto el CI cliente
exten => s,n(err2),Playback(custom/15);
;Posee paquetes
exten => s,n(oK),Goto(cliente-paquete,s,1);
;No posee paquetes
exten => s,n(ok1),Goto(no-paquetes,s,1);
;no se detecto el CI cliente
exten => s,n(err2),Playback(custom/15);
same => s,n,Goto(representante,s,1)

;When the call go to this section, dosnt work, i need to wait all the playback option to do the input

[nuevo-cliente]
include => from-did-direct-ivr ;doesnt work, just trying
exten => s,1,NoOp();
same => 2(loop),Playback(custom/16);
same => n,Playback(custom/18);
same => n,Playback(custom/20);
same => n,Playback(custom/22);
same => n,Playback(custom/23);
same => n,WaitExten(5);
same => n,Goto(loop);
exten => 1,1,Goto(registro,s,1)
exten => 2,1,Goto(aereo,s,1)
exten => 3,1,Goto(maritimo,s,1)
exten => 4,1,Goto(representante,s,1)
exten => 5,1,Goto(representante,s,1)

[registro]
exten => s,1,NoOp();
same => n,Playback(custom/17);
same => n,WaitExten(5);
exten => 1,1,Playback(custom/11);
exten => 2,1,Goto(nuevo-cliente,s,1)

[aereo]
exten => s,1,NoOp();
same => n,Playback(custom/19);
same => n,WaitExten(5);
exten => 1,1,Playback(custom/11);
exten => 2,1,Goto(nuevo-cliente,s,1)

[maritimo]
exten => s,1,NoOp();
same => n,Playback(custom/21);
same => n,WaitExten(5);
exten => 1,1,Playback(custom/11);
exten => 2,1,Goto(nuevo-cliente,s,1)

[representante]
exten => s,1,NoOp();
same => n,Playback(custom/11);
same => n,Dial(SIP/out-voximplant/${OUTNUM})
same => n,WaitExten(5);

[cliente-paquete]
include => custom-tts-ivr
exten => s,1,NoOp();
same => n,Playback(custom/HOLA);
same => n,Agi(googletts.agi,"${nombre}",es);
same => n,Playback(custom/03);
same => n,Agi(googletts.agi,"${cantPaq}",es);
same => n,Playback(custom/04);
same => n,Agi(googletts.agi,"${peso}",es);
same => n,Playback(custom/05);
same => n,Goto(opcion-cliente,s,1);

[opcion-cliente]
include => custom-tts-ivr
exten => s,1,NoOp();
exten => s,2(loop),Playback(custom/06);
exten => s,n,Playback(custom/07);
exten => s,n,Playback(custom/08);
exten => s,n,WaitExten(5);
exten => s,n,Goto(loop);
exten => 1,1,Goto(delivery,s,1);
exten => 2,1,Goto(compra,s,1);
exten => 3,1,Goto(representante,s,1);
exten => 4,1,Goto(representante,s,1);
exten => 5,1,Goto(representante,s,1);

[delivery]
exten => s,1,NoOp();
same => n,Playback(custom/09);
same => n,WaitExten(5);
exten => 1,1,Goto(opcion-cliente,s,1)

[compra]
exten => s,1,NoOp();
same => n,Playback(custom/10);
same => n,WaitExten(5);
exten => 1,1,Goto(opcion-cliente,s,1)

[no-paquetes]
include => from-did-direct-ivr
exten => s,1,NoOp();
same => n,Playback(custom/HOLA);
same => n,Agi(googletts.agi,"${nombre}",es);
same => 4(loop),Playback(custom/14);
same => n,WaitExten(5);
same => n,Goto(loop);
exten => 1,1,Goto(representante,s,1);
exten => 2,1,Goto(compra,s,1);

Any ideas?

Thanks


#2

You are only giving the caller five seconds to enter something. Try Background instead of Playback.

That looks like an infinite loop.


(Josef Vlcek) #3

Work!! why? whats the difference?

yes, i need to set a parameter? or just wait to client hangup haha


(system) closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.