[SR-Users] Remove a Line from SDP

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 18 13:14:23 CEST 2020


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 <tel:+10553847>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: <script>: <sip:0553847
> <tel:+10553847>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/
>
> Regards
> Egemen U.
>
> Get Outlook for Android <https://aka.ms/ghei36>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200618/367976b3/attachment.html>


More information about the sr-users mailing list