[SR-Users] Function sdp_remove_codecs_by_id seems to be not working

Dragos Oancea droancea at yahoo.com
Mon May 18 13:26:09 CEST 2015


Hi
Did you use msg_apply_changes() before relaying the INVITE ?http://kamailio.org/docs/modules/4.1.x/modules/textopsx.html#textopsx.f.msg_apply_changes

Regards,Dragos
      From: José Seabra <joseseabra4 at gmail.com>
 To: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org> 
 Sent: Monday, May 18, 2015 12:31 PM
 Subject: [SR-Users] Function sdp_remove_codecs_by_id seems to be not working
   
Hello,
I'm using the function sdp_remove_codecs_by_id from sdpops module in order to remove some codecs in INVITE request before send  it to freeswitch, but the function doesn't remove the codec, and it doesn't give any error message.
I'm using this function in request route.

Kamailio version is 4.2.2.

INVITE that kamailio receives from phone:
INVITE sip:401 at teste.demo.pt;user=phone SIP/2.0Record-Route: <sip:10.0.20.102:5062;r2=on;lr=on;ftag=oztyflbzbx;nat=yes;lb=yes>Record-Route: <sip:100.64.250.4;r2=on;lr=on;ftag=oztyflbzbx;nat=yes;lb=yes>Via: SIP/2.0/UDP 10.0.20.102:5062;branch=z9hG4bKecf3.3ff3f7e77d2abc0fd3f74c61eeb68a0b.0Via: SIP/2.0/UDP 192.168.10.147:5060;received=100.64.250.254;branch=z9hG4bK-f0jm82qox75w;rport=5060From: "301" <sip:301 at teste.demo.pt>;tag=oztyflbzbxTo: <sip:401 at teste.demo.pt;user=phone>Call-ID: 3c3a58a25d63-ghfc5xdg1sn0CSeq: 1 INVITEMax-Forwards: 69Contact: <sip:301 at 192.168.10.147:5060;alias=100.64.250.254~5060~1;line=c1r2c8u6>;reg-id=1X-Serialnumber: 000413262FA0P-Key-Flags: resolution="31x13", keys="4"User-Agent: snom370/8.4.35Accept: application/sdpAllow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATEAllow-Events: talk, hold, refer, call-infoSupported: timer, 100rel, replaces, from-changeCall-Info: <sip:teste.demo.pt>;appearance-index=1Session-Expires: 3600;refresher=uasMin-SE: 90Content-Type: application/sdpContent-Length: 391v=0o=root 24935823 24935823 IN IP4 192.168.10.147s=callc=IN IP4 192.168.10.147t=0 0m=audio 19410 RTP/AVP 0 8 9 99 3 18 4 101a=rtpmap:0 PCMU/8000.a=rtpmap:8 PCMA/8000a=rtpmap:9 G722/8000a=rtpmap:99 G726-32/8000a=rtpmap:3 GSM/8000a=rtpmap:18 G729/8000a=fmtp:18 annexb=noa=rtpmap:4 G723/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20a=sendrecv




INVITE that kamailio send to freeswitch after execute  sdp_remove_codecs_by_id("18"):

INVITE sip:401 at teste.demo.pt;user=phone SIP/2.0.Record-Route: <sip:10.0.20.100;lr=on;ftag=zvjgcz9zs9;proxy=yes;did=441.0eb2>.Record-Route: <sip:10.0.20.102:5062;r2=on;lr=on;ftag=zvjgcz9zs9;nat=yes;lb=yes>.Record-Route: <sip:100.64.250.4;r2=on;lr=on;ftag=zvjgcz9zs9;nat=yes;lb=yes>.Via: SIP/2.0/UDP 10.0.20.100;branch=z9hG4bK8711.bb31396197409170b2c1bd05b24e7f36.0.Via: SIP/2.0/UDP 10.0.20.102:5062;branch=z9hG4bK8711.07ffcc13fb96f90f6b4dbe4b2dfd0fa5.0.Via: SIP/2.0/UDP 192.168.10.147:5060;received=100.64.250.254;branch=z9hG4bK-aq7e0puz8p6o;rport=5060.From: "301" <sip:301 at teste.demo.pt>;tag=zvjgcz9zs9.To: <sip:401 at teste.demo.pt;user=phone>.Call-ID: 3c3a7c84e065-pr2hm0uk9yfz.CSeq: 2 INVITE.Max-Forwards: 68.Contact: <sip:301 at 192.168.10.147:5060;alias=100.64.250.254~5060~1;line=ttnfv9c7>;reg-id=1.X-Serialnumber: 000413262FA0.P-Key-Flags: resolution="31x13", keys="4".User-Agent: snom370/8.4.35.Accept: application/sdp.Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE.Allow-Events: talk, hold, refer, call-info.Supported: timer, 100rel, replaces, from-change.Call-Info: <sip:teste.itcenter.com.pt>;appearance-index=1.Session-Expires: 3600;refresher=uas.Min-SE: 90.Content-Type: application/sdp.Content-Length: 403..
v=0.o=root 228603317 228603317 IN IP4 100.64.250.4.s=call.c=IN IP4 100.64.250.4.t=0 0.m=audio 49404 RTP/AVP 0 8 9 99 3 18 4 101.a=rtpmap:0 PCMU/8000.a=rtpmap:8 PCMA/8000.a=rtpmap:9 G722/8000.a=rtpmap:99 G726-32/8000.a=rtpmap:3 GSM/8000.a=rtpmap:18 G729/8000.a=fmtp:18 annexb=no.a=rtpmap:4 G723/8000.a=rtpmap:101 telephone-event/8000.a=fmtp:101 0-16.a=ptime:20.a=sendrecv.a=rtcp:49405.

SDP body has no changes related with codecs.

Anyone call help please.
Thank youBRJosé Seabra
-- 
CumprimentosJosé Seabra
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150518/717bca87/attachment.html>


More information about the sr-users mailing list