Thanks Daniel, that works great!

E.U

Get Outlook for Android


From: Daniel-Constantin Mierla <miconda@gmail.com>
Sent: Thursday, June 18, 2020 2:14:23 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; egemen ulus <ulus_egemen@hotmail.com>
Subject: Re: [SR-Users] Remove a Line from SDP
 

Hello,

if you need it before t_relay(), then you have to use msg_apply_changes() from textopsx module (check the docs for its constraints).

Otherwise look at the network traffic to see what is sent out and probably the line is removed.

Cheers,
Daniel

On 18.06.20 10:43, egemen ulus wrote:
Hi all,

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. 

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?

route[RELAY] {
...
...
if(is_method("INVITE")) {
if( $ct =~ "0553847aaaa"){
xlog("L_WARN", "$ct check_this \n");
sdp_remove_line_by_prefix("a=rtpmap");
}
}
}

/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=614 a=16 n=if
/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=611 a=26 n=xlog
/path/kamailio[10332]: WARNING: <script>: <sip:0553847aaaa@x.x.x.x:5060> check_this
/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=612 a=25 n=sdp_remove_line_by_prefix
/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=622 a=16 n=if

Regards
Egemen U.

Get Outlook for Android

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla