Gotoif in Asterisk 13

Hi team i see the GotoIF is not working as it was working in 1.8

This below check is not working but this used to be working.

GotoIf($["${mycount}" > ${saved_count}]?test)

Is the syntax chanegd or somethin?

I found you an working example.
I think you can work your way with it.

  exten => 206,1,GotoIf($["${CALLERID(num)}" = "303"]?dial1)
  exten => 206,n,GotoIf($["${CALLERID(num)}" != "304"]?moh:dial2)
  exten => 206,n(dial1),Dial(${SPHONE1},15,rt)
  exten => 206,n,Hangup()
  exten => 206,n(dial2),Dial(${PHONE2},15,rt)
  exten => 206,n,Hangup()
  exten => 206,n(moh),MusicOnHold(default)

I would expect problems from the quotation marks.

Ok thank you.
so it should be GotoIf($["${mycount}" > β€œ${saved_count}”]?test)

You are trying for a numeric comparison, so you don’t want any quotes at all!

1 Like

ok thanks let me try that