<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Thanks Daniel, that works great!<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
E.U<span id="ms-outlook-android-cursor"></span><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<span id="OutlookSignature">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Get <a href="https://aka.ms/ghei36">Outlook for Android</a></div>
</span><br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Sent:</b> Thursday, June 18, 2020 2:14:23 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; egemen ulus <ulus_egemen@hotmail.com><br>
<b>Subject:</b> Re: [SR-Users] Remove a Line from SDP</font>
<div> </div>
</div>
<div>
<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="x_moz-cite-prefix">On 18.06.20 10:43, egemen ulus wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
<div style="color:rgb(0,0,0); text-align:start">Hi all,</div>
<div style="color:rgb(0,0,0); text-align:start"><br>
</div>
<div style="color:rgb(0,0,0); 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); text-align:start"><br>
</div>
<div style="color:rgb(0,0,0); 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); text-align:start"><br>
</div>
<div style="color:rgb(0,0,0); 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)">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); text-align:start"><br>
</div>
<div style="color:rgb(0,0,0); text-align:start"><font size="1" style="line-height:15px"><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)">0553847</a><a class="x_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="x_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">Outlook for Android</a></div>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="x_moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="x_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="x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="x_moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="x_moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="x_moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="x_moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</div>
</body>
</html>