[Kamailio-Users] Re move Body Part

karhu yoannks at gmail.com
Thu Jun 4 17:22:01 CEST 2009


Hello,

Well i bother you with that, i am pretty sure, but i have new problem with
sdp modification. 
When i try to add a new payload in "m=video ..." line, the video port from
the proxy is inserted at the end of "m=video.." line as follow :  

m=video 21840 RTP/AVP 99 115 34 35186
a=alt:1 2 : TsApLPhC /VstqkH6 10.193.15.206 21840
a=alt:2 1 : 3p37pqju 6bkvXakZ 10.10.10.3 21840
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

21840 is the original port (from caller), the good proxy port uses for this
session should be 35186. 
I called my function to modify the sdp body after force_rtp_proxy(). So
everything should be ok. 
I have seen that textops functions are applied to the original request..is
that why i can't solve my problem?

Below is my .conf file : 


if (is_method("INVITE")){
		if (route(4))
			xlog("L_INFO","Route4_Ok_à[$Tf]");
			setflag(10);
			record_route();
}

if (isflagset(10) && is_method("INVITE")){
		route(30);
	}

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");
					return;
			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[30]
{
	if(has_body("application/sdp") && search_body("m=video")){		
		subst_body('/m=video ([0-9]+) RTP\/AVP (.*)/m=video \1 RTP\/AVP 99 \2 /');
	}
}

Cheers,

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




More information about the Users mailing list