Hi,
I am trying to use t_on_branch to identify if each branch is behind the same NAT as the caller. A branch_route is defined and check dst_uri's address. If any one branch is behind different NAT, a flag is set. The flag is checked later to call rtp/mediaproxy functions. But there is a problem. It looks like the branch_route is NOT called until a t_relay is called. That's way after the flag is checked. If that's the case, I don't see how branch_route can help any NAT situation.
Thanks, Richard
Hello,
On 10/02/05 05:38, Richard Z wrote:
Hi,
I am trying to use t_on_branch to identify if each branch is behind the same NAT as the caller. A branch_route is defined and check dst_uri's address. If any one branch is behind different NAT, a flag is set. The flag is checked later to call rtp/mediaproxy functions. But there is a problem. It looks like the branch_route is NOT called until a t_relay is called. That's way after the flag is checked. If that's the case, I don't see how branch_route can help any NAT situation.
you have to call the mediaproxy functions in branch route (you need to add BRANCH_ROUTE flag to these functions in module's export structure). After the release more effort will be pushed in this direction.
Cheers, Daniel
Thanks, Richard
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Richard,
the branch route is executed exactly before relaying the branch, for each branch. Also see my previous email: http://www.openser.org/pipermail/users/2005-September/000917.html note that issue no 2 is done now - nathelper/mediaproxy functions are allowed to be called from branch route
So, what you have to do is: in branch route check with avpops if the src_ip is same as dst_uri/ruri IP part; if not, start the media rely and set a global flag to remember this - to avoid stating it again from another branch and to process the replies correctly. If the check fails in all branches, the media relay will not be started at all.
To enhance your setup, you may use per branch flags to recall which branch required media relay and which not. If you get a 200 OK for a branch which doesn't, stop the relay.
hope that helps you....
regards, bogdan
Richard Z wrote:
Hi,
I am trying to use t_on_branch to identify if each branch is behind the same NAT as the caller. A branch_route is defined and check dst_uri's address. If any one branch is behind different NAT, a flag is set. The flag is checked later to call rtp/mediaproxy functions. But there is a problem. It looks like the branch_route is NOT called until a t_relay is called. That's way after the flag is checked. If that's the case, I don't see how branch_route can help any NAT situation.
Thanks, Richard
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users