How to check specific pattern in variables

i’ve received sms in my dongle modem

same => n(Set(sms=${BASE64_DECODE(${SMS_BASE64})})

now i need a function to check if “This text string” is exists in $sms

which function should i used to check if “This text string” exists and return true or false

thanks

Pass the variable to an AGI script and use your preferred programming language to do it and return the boolean to the dialplan.

You can do this with either a function or an operator. Both should be obvious from looking at the available functions (core show functions) or the wiki https://wiki.asterisk.org/wiki/display/AST/Operators. You want the regular expression ones.

1 Like

thanks ,

ya , we can do it through AGI. actually i was looking for a straight forward function or any tricky way to use any installed functions