<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Alain,<br>
      <br>
      Is is legal to have same codec ID more than once in the the `m`
      line ?? I see that 18 is mentioned like 3 times :-/.<br>
      <br>
      Anyhow, for what you need, what you should do is:<br>
      * iterate through the `a` lines using the {sdp.line}
      transformation<br>
      * use a a regexp to check if the current `a` line contains
      "annexb=yes"<br>
      * if such a line was found, go back (decrementing the index of `a`
      lines) and search (backwards) the first `rtpmap` line<br>
      * once the rtpmap line found, use the {re.subst,reg_exp}
      transformation to get the codec ID from the line<br>
      * after that, simply use the codec delete function<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2020Amsterdam/">https://www.opensips.org/events/Summit-2020Amsterdam/</a>
OpenSIPS Bootcamp, Miami, March 2020
  <a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_Bootcamp_2020/">https://opensips.org/training/OpenSIPS_Bootcamp_2020/</a>

</pre>
    <div class="moz-cite-prefix">On 2/11/20 3:35 PM, Alain Bieuzent
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6E807D42-2224-4C8B-9D10-2B505D0B6D99@free.fr">
      <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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Hi
            all,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">I
            received an SDP with several codec G729 (with annexb=yes and
            annexb=no)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">=0<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">o=HNET 600152000
            100017799 IN IP4 0.0.0.0<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">s=0_CALLMEDIA<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">i=HNET<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">c=IN IP4 0.0.0.0<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">t=0 0<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">m=audio 64976 RTP/AVP 18
            18 18 8 101<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=rtpmap:18 G729/8000<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=fmtp:18 annexb=yes<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=ptime:20<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=rtpmap:18 G729/8000<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=fmtp:18 annexb=no<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=rtpmap:18 G729/8000<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=fmtp:18 annexb=yes<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=rtpmap:8 PCMA/8000<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=rtpmap:101
            telephone-event/8000<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=fmtp:101 0-15<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Courier
            New";mso-fareast-language:FR">a=sendonly<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">How
            can I delete codec where annexb=yes ?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">Thanks
            for your help<o:p></o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>