<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-ligatures:none;
        mso-fareast-language:FR;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=FR link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Thanks Liviu,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>The correct way is single or double quotation mark ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Because un documentation it’s written :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>=~ - regular expression matching (e.g. $rU =~ '^1800*' is "$rU begins with 1800" )<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Regards</span><span lang=EN-US style='font-size:11.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:black'>De : </span></b><span style='color:black'>Users <users-bounces@lists.opensips.org> au nom de Liviu Chircu <liviu@opensips.org><br><b>Répondre à : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date : </b>mercredi 24 septembre 2025 à 16:04<br><b>À : </b><users@lists.opensips.org><br><b>Objet : </b>Re: [OpenSIPS-Users] Replace avp_check() for opensips 3.5</span><span style='color:black;mso-ligatures:none;mso-fareast-language:FR'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Aptos",sans-serif'><o:p> </o:p></span></p></div><p><span style='font-family:"Courier New"'>Hello Alain,</span><o:p></o:p></p><p><span style='font-family:"Courier New"'>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:</span><o:p></o:p></p><p><span style='font-family:"Courier New"'>if ($avp(codecs) =~ "PCMA")<br>{<br>     xlog("L_INFO", "$ci|Log codecs|PCMA exist in SDP and in DB - X-CODEC: PCMA");<br>}</span><o:p></o:p></p><p><span style='font-family:"Courier New"'>Case-<b>insensitive</b> regex matching, just as before.</span><o:p></o:p></p><p><span style='font-family:"Courier New"'>Best regards,</span><o:p></o:p></p><div><p class=MsoNormal>On 24.09.2025 15:55, Alain Bieuzent via Users wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Hello everyone,</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>With version 3.5, the avp_check() function no longer exists and must be replaced.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>What would be the "cleanest" way to perform the following check:</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>if (avp_check("$avp(codecs)","re/PCMA/g"))</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>{</span><o:p></o:p></p><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-US style='font-size:11.0pt'>xlog("L_INFO", "$ci|Log codecs|PCMA exist in SDP and in DB - X-CODEC: PCMA");</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>}</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Thanks in advance</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Alain</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Aptos",sans-serif;mso-ligatures:none;mso-fareast-language:FR'><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>Users mailing list<o:p></o:p></pre><pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre><pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>Liviu Chircu<o:p></o:p></pre><pre><a href="http://www.opensips-solutions.com">www.opensips-solutions.com</a> | <a href="http://www.siphub.com">www.siphub.com</a><o:p></o:p></pre><p class=MsoNormal><span style='font-family:"Aptos",sans-serif;mso-ligatures:none;mso-fareast-language:FR'>_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users <o:p></o:p></span></p></div></body></html>