Thanks Liviu,
The correct way is single or double quotation mark ? Because un documentation it’s written : =~ - regular expression matching (e.g. $rU =~ '^1800*' is "$rU begins with 1800" ) Regards De : Users <[email protected]> au nom de Liviu Chircu <[email protected]> Répondre à : OpenSIPS users mailling list <[email protected]> Date : mercredi 24 septembre 2025 à 16:04 À : <[email protected]> Objet : Re: [OpenSIPS-Users] Replace avp_check() for opensips 3.5 Hello Alain, I checked the avp_check (ha!) code, and it also seems to be using the "case-insensitive" regex flag. Which means, the following is the direct equivalent in modern opensips.cfg syntax: if ($avp(codecs) =~ "PCMA") { xlog("L_INFO", "$ci|Log codecs|PCMA exist in SDP and in DB - X-CODEC: PCMA"); } Case-insensitive regex matching, just as before. Best regards, On 24.09.2025 15:55, Alain Bieuzent via Users wrote: Hello everyone, With version 3.5, the avp_check() function no longer exists and must be replaced. What would be the "cleanest" way to perform the following check: if (avp_check("$avp(codecs)","re/PCMA/g")) { xlog("L_INFO", "$ci|Log codecs|PCMA exist in SDP and in DB - X-CODEC: PCMA"); } Thanks in advance Alain _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Liviu Chircu www.opensips-solutions.com | www.siphub.com _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
