From miconda@gmail.com Thu Jun 18 13:14:29 2020 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Remove a Line from SDP Date: Thu, 18 Jun 2020 13:14:23 +0200 Message-ID: <305a63a2-6372-5158-0a82-39d3ae339956@gmail.com> In-Reply-To: =?utf-8?q?=3CVI1PR07MB49899D70F07B27F4E7621EC58E9B0=40VI1PR07MB?= =?utf-8?q?4989=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2147474358==" --===============2147474358== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 =~ "0553847 aaaa"){ > 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: