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@teste.d sip%3A401@teste.itcenter.com.ptemo.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@teste.demo.pt sip%3A301@teste.itcenter.com.pt
;tag=oztyflbzbx
To: <sip:401@teste.demo.pt sip%3A401@teste.itcenter.com.pt;user=phone> Call-ID: 3c3a58a25d63-ghfc5xdg1sn0 CSeq: 1 INVITE Max-Forwards: 69 Contact: sip:301@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@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@teste.demo.pt;tag=zvjgcz9zs9. To: sip:401@teste.demo.pt;user=phone. Call-ID: 3c3a7c84e065-pr2hm0uk9yfz. CSeq: 2 INVITE. Max-Forwards: 68. Contact: sip:301@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
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_...
Regards,Dragos From: José Seabra joseseabra4@gmail.com To: Kamailio (SER) - Users Mailing List sr-users@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@teste.demo.pt;user=phone SIP/2.0Record-Route: sip:10.0.20.102:5062;r2=on;lr=on;ftag=oztyflbzbx;nat=yes;lb=yesRecord-Route: sip:100.64.250.4;r2=on;lr=on;ftag=oztyflbzbx;nat=yes;lb=yesVia: 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@teste.demo.pt;tag=oztyflbzbxTo: sip:401@teste.demo.pt;user=phoneCall-ID: 3c3a58a25d63-ghfc5xdg1sn0CSeq: 1 INVITEMax-Forwards: 69Contact: sip:301@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@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@teste.demo.pt;tag=zvjgcz9zs9.To: sip:401@teste.demo.pt;user=phone.Call-ID: 3c3a7c84e065-pr2hm0uk9yfz.CSeq: 2 INVITE.Max-Forwards: 68.Contact: sip:301@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
can you run with debug=3 and see if the function is actually executed?
Cheers, Daniel
On 18/05/15 12:31, José Seabra wrote:
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@teste.d mailto:sip%3A401@teste.itcenter.com.ptemo.pt http://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@teste.demo.pt mailto:sip%3A301@teste.itcenter.com.pt>;tag=oztyflbzbx To: <sip:401@teste.demo.pt mailto:sip%3A401@teste.itcenter.com.pt;user=phone> Call-ID: 3c3a58a25d63-ghfc5xdg1sn0 CSeq: 1 INVITE Max-Forwards: 69 Contact: sip:301@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@teste.demo.pt mailto:sip%3A401@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@teste.demo.pt mailto:sip%3A301@teste.demo.pt>;tag=zvjgcz9zs9. To: <sip:401@teste.demo.pt mailto:sip%3A401@teste.demo.pt;user=phone>. Call-ID: 3c3a7c84e065-pr2hm0uk9yfz. CSeq: 2 INVITE. Max-Forwards: 68. Contact: sip:301@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. http://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 http://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 tel:228603317 228603317 tel: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
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello, Thank you for your reply
I ran kamailio with debug=3 and log_stderror=yes and the only thing that i see related with function sdp_remove_codecs_by_id is:
0(4707) DEBUG: <core> [route.c:907]: fix_actions(): fixing sdp_remove_codecs_by_id()
if i set debug=3 and log_stderror=no then i look for syslog file where kamailio is writting logs, and i don't see anything related with function sdp_remove_codecs_by_id.
I'm not using msg_apply_changes function.
Thank you for your support
BR José Seabra
2015-05-18 13:26 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
can you run with debug=3 and see if the function is actually executed?
Cheers, Daniel
On 18/05/15 12:31, José Seabra wrote:
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@teste.d sip%3A401@teste.itcenter.com.ptemo.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@teste.demo.pt sip%3A301@teste.itcenter.com.pt
;tag=oztyflbzbx
To: <sip:401@teste.demo.pt sip%3A401@teste.itcenter.com.pt;user=phone> Call-ID: 3c3a58a25d63-ghfc5xdg1sn0 CSeq: 1 INVITE Max-Forwards: 69 Contact: sip:301@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@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@teste.demo.pt;tag=zvjgcz9zs9. To: sip:401@teste.demo.pt;user=phone. Call-ID: 3c3a7c84e065-pr2hm0uk9yfz. CSeq: 2 INVITE. Max-Forwards: 68. Contact: sip:301@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
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
can you enable cfgtrace via debugger module or add an xlog just before calling the function in configuration file and see if related message appears in syslog?
Cheers, Daniel
On 19/05/15 11:05, José Seabra wrote:
Hello, Thank you for your reply
I ran kamailio with debug=3 and log_stderror=yes and the only thing that i see related with function sdp_remove_codecs_by_id is:
0(4707) DEBUG: <core> [route.c:907]: fix_actions(): fixing sdp_remove_codecs_by_id()
if i set debug=3 and log_stderror=no then i look for syslog file where kamailio is writting logs, and i don't see anything related with function sdp_remove_codecs_by_id.
I'm not using msg_apply_changes function.
Thank you for your support
BR José Seabra
2015-05-18 13:26 GMT+01:00 Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
Hello, can you run with debug=3 and see if the function is actually executed? Cheers, Daniel On 18/05/15 12:31, José Seabra wrote:
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@teste.d <mailto:sip%3A401@teste.itcenter.com.pt>emo.pt <http://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@teste.demo.pt <mailto:sip%3A301@teste.itcenter.com.pt>>;tag=oztyflbzbx To: <sip:401@teste.demo.pt <mailto:sip%3A401@teste.itcenter.com.pt>;user=phone> Call-ID: 3c3a58a25d63-ghfc5xdg1sn0 CSeq: 1 INVITE Max-Forwards: 69 Contact: <sip:301@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@teste.demo.pt <mailto:sip%3A401@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@teste.demo.pt <mailto:sip%3A301@teste.demo.pt>>;tag=zvjgcz9zs9. To: <sip:401@teste.demo.pt <mailto:sip%3A401@teste.demo.pt>;user=phone>. Call-ID: 3c3a7c84e065-pr2hm0uk9yfz. CSeq: 2 INVITE. Max-Forwards: 68. Contact: <sip:301@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. <http://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 <http://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 <tel:228603317> 228603317 <tel: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 _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra
Hello,
I added the following xlog before function
*xlog("L_INFO", "[SDPOPS] executing function sdp_remove_codecs_by_id($avp(s:codecs_to_remove)) ID=$ci\n");*
and if i have set debug=2 I can see the xlog message, if I change it to 3 I cannot see my message, even if I set xlog with L_DBG i cannot see the message in syslog, this is a weird behavior, can be something wrong with my rsyslog service?
I did a test that was edit the c function sdp_remove_codecs_by_id in sdpops_mod.c and i changed the log message from LM_DBG to LM_INFO, then i compiled and ran again the test and i can see the internal log messages from function sdp_remove_codecs_by_id.
syslog:
May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Call flow id '18' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Call flow name 'queue test' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Action Type 'CallQueue' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Has object left '0' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Call Queues - R=sip:400@test.centrex.coditel.be;user=phone ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Relaying request to freeSWITCH, M=INVITE, du='sip:10.0.20.26:5060',F= sip:201@test.centrex.coditel.be - R=sip:400@test.centrex.coditel.be;user=phone ID=3134333230343038333536373236-i0wa7mreng1w *May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: [SDPOPS] executing function sdp_remove_codecs_by_id(18) ID=3134333230343038333536373236-i0wa7mreng1w* *May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: sdpops [sdpops_mod.c:331]: sdp_remove_codecs_by_id(): attempting to remove codecs from sdp: [18]*
BR José Seabra
2015-05-19 12:25 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
can you enable cfgtrace via debugger module or add an xlog just before calling the function in configuration file and see if related message appears in syslog?
Cheers, Daniel
On 19/05/15 11:05, José Seabra wrote:
Hello, Thank you for your reply
I ran kamailio with debug=3 and log_stderror=yes and the only thing that i see related with function sdp_remove_codecs_by_id is:
0(4707) DEBUG: <core> [route.c:907]: fix_actions(): fixing sdp_remove_codecs_by_id()
if i set debug=3 and log_stderror=no then i look for syslog file where kamailio is writting logs, and i don't see anything related with function sdp_remove_codecs_by_id.
I'm not using msg_apply_changes function.
Thank you for your support
BR José Seabra
2015-05-18 13:26 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
can you run with debug=3 and see if the function is actually executed?
Cheers, Daniel
On 18/05/15 12:31, José Seabra wrote:
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@teste.d sip%3A401@teste.itcenter.com.ptemo.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@teste.demo.pt sip%3A301@teste.itcenter.com.pt
;tag=oztyflbzbx
To: <sip:401@teste.demo.pt sip%3A401@teste.itcenter.com.pt;user=phone> Call-ID: 3c3a58a25d63-ghfc5xdg1sn0 CSeq: 1 INVITE Max-Forwards: 69 Contact: sip:301@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@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@teste.demo.pt;tag=zvjgcz9zs9. To: sip:401@teste.demo.pt;user=phone. Call-ID: 3c3a7c84e065-pr2hm0uk9yfz. CSeq: 2 INVITE. Max-Forwards: 68. Contact: sip:301@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
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
Hello Daniel,
Returning to this issue(I didn't have enough time before, to continue with debug), I have configured the module debugger, in order to try see more information when kamailio executes the function "sdp remove codecs_by_id", and what i see is that the function is executed and the logs says that the function removes the codecs specified in SDP body, but in reality it doesn't happen, and there isn't any errors executing the function.
Please have a look at the logs below:
9(9082) DEBUG: <core> [db_res.c:92]: db_free_columns(): freeing result names at 0x7fe2174741f8 9(9082) DEBUG: <core> [db_res.c:97]: db_free_columns(): freeing result types at 0x7fe2174743c0 9(9082) DEBUG: <core> [db_res.c:52]: db_free_rows(): freeing 1 rows 9(9082) DEBUG: <core> [db_row.c:95]: db_free_row(): freeing row values at 0x7fe21765a298 9(9082) DEBUG: <core> [db_res.c:60]: db_free_rows(): freeing rows at 0x7fe21765a250 9(9082) DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7fe217480910 9(9082) DEBUG: registrar [lookup.c:196]: lookup_helper(): contact for [ 302@teste.demo.pt] found by address 9(9082) DEBUG: <core> [parser/parse_rr.c:452]: get_path_dst_uri(): path for branch: 'sip:lb@10.0.20.103:5062;lr;received=sip:100.64.250.254:46572' 9(9082) INFO: <script>: Internal call's for account teste.demo.pt - R=sip:302@192.168.10.197:5060;line=y8nryy19 ID=313433363433323332313432323132-2dqr4288p1lg 9(9082) DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=1 , global msg id=1 , T on entrance=(nil) 9(9082) DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=51835, isACK=0 9(9082) DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed 9(9082) DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found 9(9082) DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fe1fd3e5c68, callback type 1, id 0 entered 9(9082) DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fe1fd3e5c68, callback type 1, id 0 entered 9(9082) DEBUG: dialog [dlg_hash.c:614]: dlg_lookup(): ref dlg 0x7fe1fd3d6ed8 with 1 -> 2 9(9082) DEBUG: dialog [dlg_hash.c:616]: dlg_lookup(): dialog id=2457 found on entry 2631 9(9082) DEBUG: dialog [dlg_handlers.c:721]: dlg_onreq(): dialog added to tm callbacks 9(9082) DEBUG: dialog [dlg_hash.c:832]: dlg_unref(): unref dlg 0x7fe1fd3d6ed8 with 1 -> 1 9(9082) DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fe1fd3e5c68, callback type 1, id 0 entered 9(9082) DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: a95682a5a071560d00ceb5cf18f5bbb1 9(9082) DEBUG: <core> [forward.c:702]: update_sock_struct_from_via(): trying SRV lookup 9082(9082) DEBUG: debugger [debugger_api.c:266]: dbg_msgid_filter(): process_no:9082 indx:9 9082(9082) DEBUG: debugger [debugger_api.c:280]: dbg_msgid_filter(): msg->id:1 msgid_base:0 -> 1 9(9082) DEBUG: <script>: new branch [0] to sip:302@192.168.10.197:5060 ;line=y8nryy19 *9(9082) INFO: <script>: [Callflow] ------------------------------------------codec remove 3,0,9------------------------------------------- R=sip:302@192.168.10.197:5060;line=y8nryy19 ID=313433363433323332313432323132-2dqr4288p1lg* * 9(9082) DEBUG: textops [textops.c:2473]: has_body_f(): content type is 196611* * 9(9082) DEBUG: sdpops [sdpops_mod.c:339]: sdp_remove_codecs_by_id(): attempting to remove codecs from sdp: [3,0,9]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:354]: sdp_remove_codecs_by_id(): stream 0 of 0 - payloads [9 0 8 3 99 112 18 101]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:365]: sdp_remove_codecs_by_id(): codecs [9 0 8 3 99 112 18 101] - remove [3]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:289]: sdp_remove_str_codec_id(): found codec [3] inside [9 0 8 3 99 112 18 101]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 101/telephone-event* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 18/G729* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 112/AAL2-G726-32* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 99/G726-32* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 3/GSM* * 9(9082) DEBUG: sdpops [sdpops_mod.c:197]: sdp_remove_str_codec_id_attrs(): removing line: a=rtpmap:3 GSM/8000* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 8/PCMA* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 0/PCMU* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 9/G722* * 9(9082) DEBUG: sdpops [sdpops_mod.c:365]: sdp_remove_codecs_by_id(): codecs [9 0 8 3 99 112 18 101] - remove [0]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:289]: sdp_remove_str_codec_id(): found codec [0] inside [9 0 8 3 99 112 18 101]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 101/telephone-event* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 18/G729* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 112/AAL2-G726-32* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 99/G726-32* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 3/GSM* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 8/PCMA* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 0/PCMU* * 9(9082) DEBUG: sdpops [sdpops_mod.c:197]: sdp_remove_str_codec_id_attrs(): removing line: a=rtpmap:0 PCMU/8000* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 9/G722* * 9(9082) DEBUG: sdpops [sdpops_mod.c:365]: sdp_remove_codecs_by_id(): codecs [9 0 8 3 99 112 18 101] - remove [9]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:289]: sdp_remove_str_codec_id(): found codec [9] inside [9 0 8 3 99 112 18 101]* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 101/telephone-event* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 18/G729* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 112/AAL2-G726-32* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 99/G726-32* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 3/GSM* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 8/PCMA* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 0/PCMU* * 9(9082) DEBUG: sdpops [sdpops_mod.c:190]: sdp_remove_str_codec_id_attrs(): a= ... for codec 9/G722* * 9(9082) DEBUG: sdpops [sdpops_mod.c:197]: sdp_remove_str_codec_id_attrs(): removing line: a=rtpmap:9 G722/8000* 9(9082) DEBUG: <script>: start of route sip session- 1 INVITE sip:3022@teste.demo.pt;user=phone SIP/2.0 Record-Route: sip:10.0.20.103:5062 ;r2=on;lr=on;ftag=etq6ixm8l0;nat=yes;lb=yes Record-Route: sip:100.64.250.5;r2=on;lr=on;ftag=etq6ixm8l0;nat=yes;lb=yes Via: SIP/2.0/UDP 10.0.20.103:5062 ;branch=z9hG4bKb7ac.4d1b542c3b99d7410acbc985476e83d2.0 Via: SIP/2.0/UDP 192.168.30.107:5060 ;received=100.64.250.254;branch=z9hG4bK-k9wsyxdyb3sl;rport=5060 From: "301" sip:301@teste.demo.pt;tag=etq6ixm8l0 To: sip:3022@teste.demo.pt;user=phone Call-ID: 313433363433323332313432323132-2dqr4288p1lg CSeq: 2 INVITE Max-Forwards: 68 User-Agent: snom370/8.7.5.17 Contact: sip:301@192.168.30.107:5060 ;alias=100.64.250.254~5060~1;line=lb5k2cyy;reg-id=1 X-Serialnumber: 000413262FA1 P-Key-Flags: resolution="31x13", keys="4" 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 Session-Expires: 3600 Min-SE: 90 Proxy-Authorization: Digest username="301",realm="teste.demo.pt ",nonce="VZ45hFWeOFh4j60H/FTV12CfMIHUwH3/",uri="sip:3022@teste.demo.pt ;user=phone",response="c1d749e844a81cc68841c1d43be87885",algorithm=MD5 Content-Type: application/sdp Content-Length: 407 P-Voicis-LB: 10.0.20.103 P-Voicis-LBPort: 5062 P-VOICIS-Src-Ip: 100.64.250.254 P-VOICIS-Src-Port: 5060 P-VOICIS-Src-Proto: udp P-Auth-Info: 1 P-VOICIS-Src-Nat: 1
v=0 o=root 1097951374 1097951374 IN IP4 192.168.30.107 s=call c=IN IP4 192.168.30.107 t=0 0 m=audio 19818 RTP/AVP 9 0 8 3 99 112 18 101 a=rtpmap:9 G722/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:99 G726-32/8000 a=rtpmap:112 AAL2-G726-32/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:20 a=sendrecv
9(9082) DEBUG: pv [pv_core.c:376]: pv_get_xto_attr(): no Tag parameter 9(9082) DEBUG: dialog [dlg_hash.c:614]: dlg_lookup(): ref dlg 0x7fe1fd3d6ed8 with 1 -> 2 9(9082) DEBUG: dialog [dlg_hash.c:616]: dlg_lookup(): dialog id=2457 found on entry 2631 9(9082) DEBUG: dialog [dlg_hash.c:832]: dlg_unref(): unref dlg 0x7fe1fd3d6ed8 with 1 -> 1 9(9082) DEBUG: dialog [dlg_hash.c:614]: dlg_lookup(): ref dlg 0x7fe1fd3d6ed8 with 1 -> 2 9(9082) DEBUG: dialog [dlg_hash.c:616]: dlg_lookup(): dialog id=2457 found on entry 2631 9(9082) DEBUG: dialog [dlg_hash.c:832]: dlg_unref(): unref dlg 0x7fe1fd3d6ed8 with 1 -> 1 9(9082) DEBUG: <core> [select.c:412]: run_select(): Calling SELECT 0x7fe216f4e380 9(9082) DEBUG: dialog [dlg_hash.c:614]: dlg_lookup(): ref dlg 0x7fe1fd3d6ed8 with 1 -> 2 9(9082) DEBUG: dialog [dlg_hash.c:616]: dlg_lookup(): dialog id=2457 found on entry 2631 9(9082) DEBUG: dialog [dlg_hash.c:832]: dlg_unref(): unref dlg 0x7fe1fd3d6ed8 with 1 -> 1
9(9082) DEBUG: auth_db [auth_db_mod.c:263]: w_is_subscriber(): uri [ sip:301@teste.demo.pt] table [subscriber] flags [1] 9(9082) DEBUG: <core> [db_res.c:116]: db_new_result(): allocate 56 bytes for result set at 0x7fe2174742e0 9(9082) DEBUG: db_mysql [km_res.c:66]: db_mysql_get_columns(): 2 columns returned from the query 9(9082) DEBUG: <core> [db_res.c:154]: db_allocate_columns(): allocate 16 bytes for result names at 0x7fe217474678 9(9082) DEBUG: <core> [db_res.c:165]: db_allocate_columns(): allocate 8 bytes for result types at 0x7fe216d82c08 9(9082) DEBUG: db_mysql [km_res.c:84]: db_mysql_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7fe217474630 9(9082) DEBUG: db_mysql [km_res.c:91]: db_mysql_get_columns(): RES_NAMES(0x7fe217474630)[0]=[domain] 9(9082) DEBUG: db_mysql [km_res.c:135]: db_mysql_get_columns(): use DB1_STRING result type 9(9082) DEBUG: db_mysql [km_res.c:84]: db_mysql_get_columns(): allocate 16 bytes for RES_NAMES[1] at 0x7fe2174745e8 9(9082) DEBUG: db_mysql [km_res.c:91]: db_mysql_get_columns(): RES_NAMES(0x7fe2174745e8)[1]=[rpid] 9(9082) DEBUG: db_mysql [km_res.c:99]: db_mysql_get_columns(): use DB1_INT result type 9(9082) DEBUG: <core> [db_res.c:184]: db_allocate_rows(): allocate 16 bytes for rows at 0x7fe2174745a0 9(9082) DEBUG: <core> [db_row.c:117]: db_allocate_row(): allocate 64 bytes for row values at 0x7fe217469af0 9(9082) DEBUG: <core> [db_val.c:115]: db_str2val(): converting STRING [ teste.demo.pt] 9(9082) DEBUG: <core> [db_val.c:71]: db_str2val(): converting INT [10] 9(9082) DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 2 columns 9(9082) DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[0] at 0x7fe217474630 9(9082) DEBUG: <core> [db_res.c:83]: db_free_columns(): freeing RES_NAMES[1] at 0x7fe2174745e8 9(9082) DEBUG: <core> [db_res.c:92]: db_free_columns(): freeing result names at 0x7fe217474678 9(9082) DEBUG: <core> [db_res.c:97]: db_free_columns(): freeing result types at 0x7fe216d82c08 9(9082) DEBUG: <core> [db_res.c:52]: db_free_rows(): freeing 1 rows 9(9082) DEBUG: <core> [db_row.c:95]: db_free_row(): freeing row values at 0x7fe217469af0 9(9082) DEBUG: <core> [db_res.c:60]: db_free_rows(): freeing rows at 0x7fe2174745a0 9(9082) DEBUG: <core> [db_res.c:134]: db_free_result(): freeing result set at 0x7fe2174742e0 9(9082) DEBUG: uac [uac.c:441]: w_replace_from(): dsp=0x7fff3aad9690 (len=3) , uri=0x7fff3aad96a0 (len=29) 9(9082) DEBUG: uac [replace.c:291]: replace_uri(): removing display ["301"] 9(9082) DEBUG: uac [replace.c:331]: replace_uri(): uri to replace [ sip:301@teste.demo.pt] 9(9082) DEBUG: uac [replace.c:332]: replace_uri(): replacement uri is [ sip:301@teste.demo.pt] 9(9082) DEBUG: uac [replace.c:443]: replace_uri(): encode is=<VnRhajNkWUhoNHZhY2tNaHFnOWhWdGFqM2RZSGg-> len=40 9(9082) DEBUG: siputils [checks.c:97]: has_totag(): no totag 9(9082) INFO: <script>: NATMANAGE: AUTOMATIC : - S=<null> - <null> M=INVITE IP=100.64.250.254:5060 (10.0.20.103:5062) ID=313433363433323332313432323132-2dqr4288p1lg 9(9082) DEBUG: rtpengine [rtpengine_funcs.c:140]: check_content_type(): type <application/sdp> found valid 9(9082) DEBUG: rtpengine [rtpengine.c:1527]: rtpp_function_call(): proxy reply: d3:sdp417:v=0 o=root 1097951374 1097951374 IN IP4 100.64.250.4 s=call c=IN IP4 100.64.250.4 t=0 0 m=audio 41660 RTP/AVP 9 0 8 3 99 112 18 101 a=rtpmap:9 G722/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:99 G726-32/8000 a=rtpmap:112 AAL2-G726-32/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:20 a=sendrecv a=rtcp:41661 6:result2:oke 9(9082) DEBUG: <core> [msg_translator.c:422]: clen_builder(): content-length: 417 (417) 9(9082) DEBUG: <core> [msg_translator.c:158]: check_via_address(): (10.0.20.103, 10.0.20.103, 0) 9(9082) DEBUG: tm [t_hooks.c:266]: run_trans_callbacks_internal(): DBG: trans=0x7fe1fd3e5c68, callback type 4194304, id 0 entered 9(9082) DEBUG: siptrace [siptrace.c:1865]: pipport2su(): the port string is 5060 9(9082) DEBUG: siptrace [siptrace.c:1865]: pipport2su(): the port string is 5062 9(9082) DEBUG: <core> [proxy.c:265]: mk_proxy(): doing DNS lookup... 9(9082) DEBUG: siptrace [siptrace.c:1677]: trace_send_hep_duplicate(): setting up the socket_info 9(9082) DEBUG: tm [t_funcs.c:362]: t_relay_to(): SER: new transaction fwd'ed 9(9082) DEBUG: dialog [dlg_hash.c:614]: dlg_lookup(): ref dlg 0x7fe1fd3d6ed8 with 1 -> 2 9(9082) DEBUG: dialog [dlg_hash.c:616]: dlg_lookup(): dialog id=2457 found on entry 2631 9(9082) DEBUG: dialog [dlg_hash.c:832]: dlg_unref(): unref dlg 0x7fe1fd3d6ed8 with 1 -> 1
Thank you for your support Regards José Seabra
2015-05-19 14:13 GMT+01:00 José Seabra joseseabra4@gmail.com:
Hello,
I added the following xlog before function
*xlog("L_INFO", "[SDPOPS] executing function sdp_remove_codecs_by_id($avp(s:codecs_to_remove)) ID=$ci\n");*
and if i have set debug=2 I can see the xlog message, if I change it to 3 I cannot see my message, even if I set xlog with L_DBG i cannot see the message in syslog, this is a weird behavior, can be something wrong with my rsyslog service?
I did a test that was edit the c function sdp_remove_codecs_by_id in sdpops_mod.c and i changed the log message from LM_DBG to LM_INFO, then i compiled and ran again the test and i can see the internal log messages from function sdp_remove_codecs_by_id.
syslog:
May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Call flow id '18' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Call flow name 'queue test' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Action Type 'CallQueue' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Has object left '0' ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Call Queues - R=sip:400@test.centrex.coditel.be;user=phone ID=3134333230343038333536373236-i0wa7mreng1w May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: Relaying request to freeSWITCH, M=INVITE, du='sip:10.0.20.26:5060',F= sip:201@test.centrex.coditel.be - R=sip:400@test.centrex.coditel.be;user=phone ID=3134333230343038333536373236-i0wa7mreng1w *May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: <script>: [SDPOPS] executing function sdp_remove_codecs_by_id(18) ID=3134333230343038333536373236-i0wa7mreng1w* *May 19 15:07:17 ccp2 /usr/local/sbin/kamailio[9068]: INFO: sdpops [sdpops_mod.c:331]: sdp_remove_codecs_by_id(): attempting to remove codecs from sdp: [18]*
BR José Seabra
2015-05-19 12:25 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
can you enable cfgtrace via debugger module or add an xlog just before calling the function in configuration file and see if related message appears in syslog?
Cheers, Daniel
On 19/05/15 11:05, José Seabra wrote:
Hello, Thank you for your reply
I ran kamailio with debug=3 and log_stderror=yes and the only thing that i see related with function sdp_remove_codecs_by_id is:
0(4707) DEBUG: <core> [route.c:907]: fix_actions(): fixing sdp_remove_codecs_by_id()
if i set debug=3 and log_stderror=no then i look for syslog file where kamailio is writting logs, and i don't see anything related with function sdp_remove_codecs_by_id.
I'm not using msg_apply_changes function.
Thank you for your support
BR José Seabra
2015-05-18 13:26 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
can you run with debug=3 and see if the function is actually executed?
Cheers, Daniel
On 18/05/15 12:31, José Seabra wrote:
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@teste.d sip%3A401@teste.itcenter.com.ptemo.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@teste.demo.pt sip%3A301@teste.itcenter.com.pt
;tag=oztyflbzbx
To: <sip:401@teste.demo.pt sip%3A401@teste.itcenter.com.pt;user=phone> Call-ID: 3c3a58a25d63-ghfc5xdg1sn0 CSeq: 1 INVITE Max-Forwards: 69 Contact: sip:301@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@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@teste.demo.pt;tag=zvjgcz9zs9. To: sip:401@teste.demo.pt;user=phone. Call-ID: 3c3a7c84e065-pr2hm0uk9yfz. CSeq: 2 INVITE. Max-Forwards: 68. Contact: sip:301@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
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, May 27-29, 2015 Berlin, Germany - http://www.kamailioworld.com
-- Cumprimentos José Seabra