I want to verify CallerID
name in a GotoIf
but it not evaluates like a true 1.
I have the following code:
exten => 3251,1,Dial(IAX2/3251,10)
same => n, GotoIf($[“${CALLERID(name)” =“3251”]?mail_3251_3251:continua)
same => n(mail_3251_3251), VoiceMail(333@cont_voice)
same => n(continua), GotoIf($[“${CALLERID(name)” = “4251”]?mail_3251_4251:continua1)
same => n(mail_3251_4251), VoiceMail(333@cont_voice)
same => n(continua1), Hangup()
exten => 4251,1,Dial(IAX2/4251,10)
same => n, GotoIf($[“${CALLERID(name)” =“3251”]?mail_4251_3251:continua)
same => n(mail_4251_3251), VoiceMail(444@cont_voice)
same => n(continua), GotoIf($[“${CALLERID(name)” = “4251”]?mail_4251_4251:continua1)
same => n(mail_4251_4251), VoiceMail(444@cont_voice)
same => n(continua1), Hangup()
And I want to go to a VoiceMail operation only if the callerid name is 3251 or 4251, else I want to Hangup after dial.