<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hello,</p>
    <p>if you need it before t_relay(), then you have to use
      msg_apply_changes() from textopsx module (check the docs for its
      constraints).</p>
    <p>Otherwise look at the network traffic to see what is sent out and
      probably the line is removed.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 18.06.20 10:43, egemen ulus wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:VI1PR07MB49899D70F07B27F4E7621EC58E9B0@VI1PR07MB4989.eurprd07.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div style="color: rgb(33, 33, 33); background-color: rgb(255,
        255, 255); text-align: left;" dir="auto">
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          Hi all,</div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          <br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          I am trying to remove a line from the SDP body of INVITE on
          kamailio 4.4 via SDPOPS module but it does not work even
          though there is no any error message. </div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          <br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          This is how I configure kamailio.cfg, it matches with if
          condition and executes "sdp_remove_line_by_prefix" function,
          but when I check sended INVITE, I still see the line that
          beginning with "a=rtpmap". I thought, in the RELAY function,
          the sdp body might not prepared yet? Is there any suggestion
          to remove a line from the SDP body?</div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          <br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          <div>route[RELAY] {</div>
          <div>...</div>
          <div>...<br>
            if(is_method("INVITE")) {<br>
            <span>if( $ct =~ "<a href="tel:+10553847" style="color:
                rgb(0, 120, 215)" moz-do-not-send="true">0553847</a>aaaa"){</span><br>
            xlog("L_WARN", "$ct check_this \n");<br>
            sdp_remove_line_by_prefix("a=rtpmap");<br>
            }<br>
            }<br>
          </div>
          <div>}</div>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          <br>
        </div>
        <div style="color: rgb(0, 0, 0); font-family: -apple-system,
          HelveticaNeue; text-align: start">
          <font style="line-height: 15px" size="1"><i>/path/kamailio[10332]:
              exec: *** cfgtrace:request_route=[RELAY]
              c=[/path/kamailio.cfg] l=614 a=16 n=if<br>
              /path/kamailio[10332]: exec: ***
              cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg]
              l=611 a=26 n=xlog<br>
              <span>/path/kamailio[10332]: WARNING: <script>:
                <sip:<a href="tel:+10553847" style="color: rgb(0,
                  120, 215)" moz-do-not-send="true">0553847</a><a class="moz-txt-link-abbreviated" href="mailto:aaaa@x.x.x.x:5060">aaaa@x.x.x.x:5060</a>>
                check_this</span><br>
              /path/kamailio[10332]: exec: ***
              cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg]
              l=612 a=25 n=<span style="background-color: rgb(224, 102,
                102)">sdp_remove_line_by_prefix</span><br>
              /path/kamailio[10332]: exec: ***
              cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg]
              l=622 a=16 n=if</i></font></div>
        <br>
      </div>
      <div id="ms-outlook-mobile-signature" dir="auto"
        style="text-align: left;">
        <div dir="auto" style="text-align: left;">Regards</div>
        <div dir="auto" style="text-align: left;">Egemen U.</div>
        <div dir="auto" style="text-align: left;"><br>
        </div>
        Get <a href="https://aka.ms/ghei36" moz-do-not-send="true">Outlook
          for Android</a></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>