[asterisk-users] Help with loop counting?

Doug Lytle support at drdos.info
Wed Oct 24 07:12:02 CDT 2007


Phil Knighton wrote:
> exten => i,1,Set(trips=$[${trips} + 1])
> exten => i,2,Goto(s,7)

i=invalid, t=timeout

exten => t,1,Set(trips=$[${trips} + 1])


You'll also want to initialize ${trips} with a Set(trips=0) at the beginning of your routine.

Doug


-- 

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little 
Temporary Safety, deserve neither Liberty nor Safety."




More information about the asterisk-users mailing list