[Asterisk-Users] fatal embrace control in menus ?
John Brown
jmbrown at chagresventures.com
Sun Aug 24 02:35:54 MST 2003
Ahh, much thanks. Learning more about the programming
bit of this system everyday.
now if we could only get away from these blasted line numbers,
or at least have line numbers like
10
20
30
which would make it easier to insert something quickly
On Sun, Aug 24, 2003 at 11:20:27AM +0200, Klaus-Peter Junghanns wrote:
> 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
>
> _______________________________________________
> 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