[SR-Users] Remove a Line from SDP

egemen ulus ulus_egemen at hotmail.com
Thu Jun 18 15:02:58 CEST 2020

Thanks Daniel, that works great!


Get Outlook for Android<https://aka.ms/ghei36>

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


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.


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 =~ "0553847<tel:+10553847>aaaa"){
xlog("L_WARN", "$ct check_this \n");

/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:0553847<tel:+10553847>aaaa at x.x.x.x:5060<mailto:aaaa at 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

Egemen U.

Get Outlook for Android<https://aka.ms/ghei36>

Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Funding: https://www.paypal.me/dcmierla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200618/cecbf875/attachment.html>

More information about the sr-users mailing list