[Asterisk-Users] fatal embrace control in menus ?

Klaus-Peter Junghanns kpj at junghanns.net
Sun Aug 24 02:20:27 MST 2003


Morning,

this is just too simple ;-)
Try this if you want to loop 3 times:

exten => s,1,Answer()
exten => s,2,SetVar(LOOPS=0)
exten => s,3,Background(MenuSound)
exten => s,4,SetVar(LOOPS=$[${LOOPS} + 1])
exten => s,5,GotoIf($[${LOOPS} < 3]?3:6)
exten => s,6,Hangup()

regards

kapejod

-- 
Klaus-Peter Junghanns

CEO,CTO
Junghanns.NET GmbH
Breite Strasse 13 - 12167 Berlin - Germany
fon:	+49 30 79705392
fax:	+49 30 79705391
iaxtel:	1-700-157-8753
email:	kpj at junghanns.net
http://www.junghanns.net/asterisk

Am Son, 2003-08-24 um 11.08 schrieb Todd Lieberman:
> I just repeat line 2, e.g.
> 
> exten => s,1,Play(Greeting)
> exten => s,2,Background(Menu Sound)
> exten => s,3,Background(Menu Sound)
> 
> 
> 
> 
> 
> John Brown wrote:
> 
> >Hi, 
> >
> >	So how does one keep this from happening.
> >
> >(note, the following is fake code)
> >
> >exten => s,1,Play(Greeting)
> >exten => s,2,Background(Menu Sound)
> >exten => s,3,goto(s,2)
> >
> >How does one control the number of times s,3 gets executed??
> >
> >The issue is this.
> >
> >1. Call comes in via PSTN, * answers the call, starts to play
> >   things, caller hangs up.  Menu loops for quite some time :)
> >
> >2. Call comes in via PSTN, * answers the call, start to play things
> >   caller does nothing on the first pass thru the menu.
> >
> >   I want the menu to repeat X times and then disconnect if no
> >   action from the claller.
> >
> >
> >samples of extensions.conf would be really appreciated
> >
> >
> >_______________________________________________
> >Asterisk-Users mailing list
> >Asterisk-Users at lists.digium.com
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> >  
> >
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list