[Asterisk-Users] fatal embrace control in menus ?

Mark Spencer markster at digium.com
Sun Aug 24 08:39:20 MST 2003


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

That's certainly quite elegant, although "too simple" is perhaps a bit
strong...  It would be handy if we had a simpler way...

Mark




More information about the asterisk-users mailing list