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