On Nov 25, 2004 at 19:13, radan radan@gda.pl wrote:
Hi all ! How can I use rtpproxy if i want redirect connection from my client behind NAT to another user registered on another sip server I can't use SRV records
# redirection to another sip server if (uri=~"sip:1([0-9])*@.*") { setflag(1); strip(1); if (nat_uac_test("3")) { fix_nated_sdp("1"); force_rport(); fix_nated_contact(); force_rtp_proxy(); }; record_route(); sethostport("another.sip.server.pl:5060"); if (!t_relay()) { sl_reply_error(); };
break;
t_relay();
};
The connection is estabilished fine but I don't hear
You should use force_rtp_proxy on the reply too. Also don't use both fix_nated_sdp and force_rtp_proxy.
Use something like: if (nat_uac_test("3")){ fix_nated_contact(); force_rtp_proxy(); t_on_reply("1"); } /* ... */
onreply_route[1]{ force_rtp_proxy(); if (nat_uac_test("1")){ fix_nated_contact(); } }
[this is a very stripped down example, you would want to check the method a.s.o for a "clean" config ]
Andrei