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

José Seabra joseseabra4 at gmail.com
Mon May 18 12:31:56 CEST 2015


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.d <sip%3A401 at teste.itcenter.com.pt>emo.pt;user=phone
SIP/2.0
Record-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.0
Via: SIP/2.0/UDP 192.168.10.147:5060
;received=100.64.250.254;branch=z9hG4bK-f0jm82qox75w;rport=5060
From: "301" <sip:301 at teste.demo.pt <sip%3A301 at teste.itcenter.com.pt>
>;tag=oztyflbzbx
To: <sip:401 at teste.demo.pt <sip%3A401 at teste.itcenter.com.pt>;user=phone>
Call-ID: 3c3a58a25d63-ghfc5xdg1sn0
CSeq: 1 INVITE
Max-Forwards: 69
Contact: <sip:301 at 192.168.10.147:5060
;alias=100.64.250.254~5060~1;line=c1r2c8u6>;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.demo.pt <http://teste.itcenter.com.pt>
>;appearance-index=1
Session-Expires: 3600;refresher=uas
Min-SE: 90
Content-Type: application/sdp
Content-Length: 391
v=0
o=root 24935823 24935823 IN IP4 192.168.10.147
s=call
c=IN IP4 192.168.10.147
t=0 0
m=audio 19410 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





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 you
BR
José Seabra
-- 
Cumprimentos
José Seabra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150518/207a1029/attachment.html>


More information about the sr-users mailing list