[OpenSIPS-Users] rtp proxy issue

Jan D. j-doedel at zonnet.nl
Wed Sep 30 12:02:09 CEST 2009


Ghaith,

This is very basicly what I do:

loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 60)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_from", "sip:natping at sip3.sollie.nl")
modparam("nathelper", "received_avp", "$avp(i:801)")
modparam("nathelper", "sipping_bflag", 6)

force_rport();
if(msg:len > max_len)
{
	sl_send_reply("513", "Message Too Big");
	exit;
}
if (!mf_process_maxfwd_header("10"))
{
	sl_send_reply("483", "Too Many Hops");
	exit;
}

# nat test
if (nat_uac_test("5"))
{
	if (method == "REGISTER")
	{
		fix_nated_register();
	}

		fix_nated_contact();

	record_route(";nat=yes");

		setbflag(6); # set nat flag
}
else
{
	record_route();
}

# nat test fix_nated_sdp
if(has_body("application/sdp") && nat_uac_test("8"))
{
	fix_nated_sdp("11");
}


# rtp proxy for local to local
if(has_body("application/sdp"))
{
xlog("L_INFO"," INFO: force_rtp_proxy\n");
force_rtp_proxy();
t_on_reply("2");
}

t_relay("0x05"); 

Jan


Hi,
Maybe you have to try calling some functions before forcing the traffic
in order to change the parameter in SDP headers.
you can try something like that:

    force_rport();
    set_rtp_proxy_set("0");
    fix_nated_contact();
    force_rtp_proxy();

Because as far as I know that SER will change the "connection c=" field
in the SDP header.
It works fine with me.
Good luck
-- 
View this message in context: http://n2.nabble.com/rtp-proxy-issue-tp3741507p3741746.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list