[Asterisk-Users] Loops and Variables

Doug Lytle support at drdos.info
Sun Feb 19 18:30:58 MST 2006


I have the following in my dialplan, counts the number of loops and when 
it hits greater then 5, exit.  It works, but errors initially with,

"syntax error, unexpected TOK_PLUS, expecting TOK_MINUS or TOK_LP or 
tolken; Input: +1".

Could somebody tell me why?

Thanks:

; ****************************************
; Setup a varriable to count the number of
; times the message has been played, when
; $COUNT reaches > 5, play you've taken
; to long to dial and hangup.
; ****************************************

exten => t,1,Set(COUNT=$[${COUNT} + 1])
exten => t,2,NoOP(${COUNT})
exten => t,3,GotoIf($[ ${COUNT} > 5 ]?103)
exten => t,4,Goto(voice-mail-callback,s,4)
exten => t,103,Playback(local/tolong-todial)
exten => t,104,Playback(goodbye)
exten => t,105,Hangup()




More information about the asterisk-users mailing list