[Asterisk-Users] GotoIf problem

kurt x kurtwp at gmail.com
Tue Mar 8 11:29:08 MST 2005


 I am trying to test how the GotoIf and $LEN functions work but am not
succeeding is
this venture.  When I dial and access voicemail with an ani of 3000
the gotoif statement does not push the call to s|6.  Its goes through
each line( 1,2,3,4,5,6,7) .  In additon when I dial with a 10 digit
ani the s,3,Gotoif does not work.  It also goes through each line(
1,2,3,4,5,6,7)

Any help is greatly appreciated.

Thanks

Kurt 

Asterisk CVS-HEAD-07/14/04-16:28:29 built by
root at asterick.wlb2.n2p.com on a i686 running Linux


[globals]
${ext}=0
SetGlobalVar(DIGITS=10)


[vmail]
exten => s,1,Answer
exten => s,2,NoOp(${ext})
exten => s,3,GotoIf($[${LEN(${CALLERIDNUM}}) = ${DIGITS}]?s|5)
exten => s,4,GotoIf($[${CALLERIDNUM}  = "3000"]?s|6)
exten => s,5,Voicemail(u${ext})
exten => s,6,Background(pbx-invalid)
exten => s,7,Hangup



More information about the asterisk-users mailing list