CallerID name verification

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.

You have three types of quote. This may be a result of failing to mark as preformatted for forum, but could be a real error.

To be on the safe side, I would remove the space before the =.

Yes I forgot a } after (name). Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.