[OpenSIPS-Users] Replace avp_check() for opensips 3.5

Liviu Chircu liviu at opensips.org
Wed Sep 24 14:01:59 UTC 2025


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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-- 
Liviu Chircu
www.opensips-solutions.com  |www.siphub.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20250924/b4376cfd/attachment.html>


More information about the Users mailing list