El Monday 08 October 2007 13:34:22 Cseke Tamas escribió:
Hello,
We are switching from 1.1 to 1.2, and i have some problems.
Could you please tell me how should i handle natted contacts in regisers. i read modparam("registrar", "nat_flag", 6) is not exists any more i guess i should use nat_bfalg in usrloc module, but i don't know how to use this, could you tell me an example? how should i set the branch flag which should be used for this?
# Must be the same !!! modparam("nathelper", "received_avp", "$avp(i:42)") modparam("registrar", "received_avp", "$avp(i:42)")
# The branch/contact NAT flags are saved in USRLOC. modparam("usrloc", "nat_bflag", 6)
# The branch flag that mark the contacts that needs ping via SIP request modparam("nathelper", "sipping_bflag", 7)
The bflag 6 (nat_bflag) is stored during the REGISTER process if you detect NAT and do "setbflag(6)". Then, in the "location" table there is stored this NAT bflag.
The most important: when you do "location()" the bflag(6) is up if it exists in the "location" table for the called user. Note that this depend on each branch so in order to apply nat-fix orRtpProxy you should do:
branch_route[8] { if (isbflagset(6) { # fix nat and apply RtpProxy and so... } }