[Kamailio-Users] Re move Body Part

karhu yoannks at gmail.com
Wed Jun 3 10:20:15 CEST 2009


Hello,

I'm still on removing SDP parameters from the SIP Invite method.
So here is the initial SDP from caller : 

v=0
o=- 5 2 IN IP4 10.10.10.3
s=CounterPath X-Lite 3.0
c=IN IP4 10.10.10.3
t=0 0
m=audio 38028 RTP/AVP 107 119 0 98 8 3 101
a=alt:1 2 : D/EiVcOe ZNbDTRu7 10.193.15.206 38028
a=alt:2 1 : 4oNCIzwV oJwrCrfw 10.10.10.3 38028
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
m=video 17166 RTP/AVP 115 34
a=alt:1 2 : UQl6viQz cTcTrMFc 10.193.15.206 17166
a=alt:2 1 : US97TDnv HVVaJHFF 10.10.10.3 17166
a=fmtp:115 QCIF=1 I=1 J=1 K=1 MAXBR=1960
a=fmtp:34 QCIF=1 MAXBR=1960
a=rtpmap:115 H263-1998/90000
a=rtpmap:34 H263/90000
a=sendrecv

I just want to force the use of payload 98 on the audio part, so in
kamailio.cfg i added that : 

##### INVITE ######
	if (is_method("INVITE")){
		route(4);	
		record_route();

#		route(10);
		route(20);
                route(21);
	}

######### Route Rtpproxy Bridge Mode for INVITE methods ########### 
route[4]
{
		if (lookup("location_internal")) {
			if (dst_ip == 10.10.10.2)
				if (force_rtp_proxy("FAII"))
					xlog("L_INFO","appel_rtpproxyFAII");
					t_on_reply("1");
			if (dst_ip == 192.168.0.2)
				if (force_rtp_proxy("FAEI"))
					xlog("L_INFO","appel_rtpproxyFAEI");
					t_on_reply("1");
		} else if (lookup("location_external")) {
			if (dst_ip == 10.10.10.2)
				if (force_rtp_proxy("FAIE"))
					xlog("L_INFO","appel_rtpproxyFAIE");
					t_on_reply("1");
			if (dst_ip == 192.168.0.2)
				if (force_rtp_proxy("FAEE"))
					xlog("L_INFO","appel_rtpproxyFAEE");
					t_on_reply("1");
		} else {
			sl_send_reply("403", "Call cannot be served here");
			exit;
			};
}

route[20]
{
	if(has_body("application/sdp") && search_body("m=audio"))
		xlog("L_INFO", "application/sdp_present_avec_audio");
		subst_body('/AVP (.*) /AVP 98 /');
}

route[21]
{
	if(has_body("application/sdp") && search_body("a=rtpmap:[0-9]+"))
		xlog("L_INFO", "application/sdp_present_avec_description_audio");
		subst_body('/a=rtpmap:107 BV32\/16000//');
		subst_body('/a=rtpmap:119 BV32-FEC\/16000//');
#		replace_body("a=rtpmap:107 BV32/16000","");
#		subst_body('/a=rtpmap:[0-9]+ (.*)//');
}

and i get from wireshark capture the following sdp : 

v=0
o=- 5 2 IN IP4 10.10.10.3
s=CounterPath X-Lite 3.0
c=IN IP4 192.168.0.2
t=0 0
m=audio 35044 RTP/AVP 98 101
a=alt:1 2 : D/EiVcOe ZNbDTRu7 10.193.15.206 38028
a=alt:2 1 : 4oNCIzwV oJwrCrfw 10.10.10.3 38028
a=fmtp:101 0-15


a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
m=video 35046 RTP/AVP 115 34
a=alt:1 2 : UQl6viQz cTcTrMFc 10.193.15.206 17166
a=alt:2 1 : US97TDnv HVVaJHFF 10.10.10.3 17166
a=fmtp:115 QCIF=1 I=1 J=1 K=1 MAXBR=1960
a=fmtp:34 QCIF=1 MAXBR=1960
a=rtpmap:115 H263-1998/90000
a=rtpmap:34 H263/90000
a=sendrecv
a=nortpproxy:yes

First, the 98 payload is well forced.  
The problem is i get "Call failed: Not acceptable Here" on the caller sip
phone. Obviously the callee phone doesn't ring.. It seems that the blanck
lines in the sdp message shouldn't prevent the callee phone to ring.
Do you have any ideas ? or configuration modifications ? i am stick on that
problem.

Cheers, 

Karhu
-- 
View this message in context: http://www.nabble.com/Remove-Body-Part-tp23739505p23847415.html
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.





More information about the sr-users mailing list