I suggest you look at the
onsip.org mediaproxy file. It seems that you don't
use the registered NAT flag in your tests (4). In order to save and retrieve
NAT info on the callee, you need to test for the flag that is defined like
this:
modparam("registrar", "nat_flag", 6)
g-)
----- Original Message -----
From: "tcchan" <tikchoong.chan(a)redtone.com>
To: <serusers(a)lists.iptel.org>
Sent: Friday, October 28, 2005 8:58 AM
Subject: [Serusers] When to use MediaProxy
Hi All,
I have SER work together with MediaProxy and two UAs;
UA1 is NATED whereas UA2 has public IP.
I have something like this to process the INVITE
if (client_nat_test("3")) {
setflag(4);
};
if (isflagset(4)) {
force_rport(); fix_contact();
use_media_proxy();
};
t_on_reply("1");
and on the reply_route, I have
if (client_nat_test("1")) {
setflag(4);
};
if (isflagset(4) && status=~"(180) || (183) || 2[0-9][0-9]") {
if(search("^Content-Type: .*$")) {
fix_contact();
use_media_proxy();
}
};
Now, if UA1 (nated) calls UA2, it is OK ( mediaproxy is properly setup
and both side can hear each other. The client_nat_test() is met and
flag4 is set which caused both the invite and the on_reply to
use_media_proxy).
If UA2(public) calls UA1 (nated), problem arises, UA2 can hear UA1 but
not the reverse. The client_nat_test("3") is not met and thus flag4 not
set. On the reply_route, although client_nat_test("1") is met, flag4
set and use_media_proxy() is executed, it return
error: use_media_proxy(): empty response from mediaproxy
ERROR: on_reply processing failed
To temporary work around this problem, I forcefully set flag4 on and
thus all calls route through the mediaproxy ( which is expensive in
bandwidth usage).
Is there any better way to solve this?
Any suggestion?
Has anybody already looks into this and has a solution?
Thanks for any help available.
Regards,
TC Chan
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers