Hi folks I've configured Kamailio as a simply multi-homed proxy offering NAT traversa, TCP connection management, etc to FreeSWICH behind it. FreeSWITCH acts as the registrar.
I'm trying to understand the default config and the following things don't make sense to me (I can't find documentation on these): 1. The nat=yes flag. What does it mean exactly and why is it on the RR and not on the Contact/R-URI? Also, when double RR is enabled, why does it get added to both headers? 2. The FLT_NATS and FLB_NATB flags. I'd like to know what this stands for, I guess "flag for transaction - NAT" and "flag for branch - NAT" but what do the S and the B stand for? More importantly what do these flags mean? Is it correct to say that the first indicates the UAC / A-leg / requester is behind NAT and the second that the UAS / B-leg / responder is behind NAT? 3. In the the NATMANAGE route of the default config we have: if (is_request()) { if(has_totag()) { if(check_route_param("nat=yes")) { setbflag(FLB_NATB); } } } Which to me means "if the message is a request inside an existing dialog ..." and I'm thinking, isn't this a bit late in the dialog to be setting NAT flags? I would expect to set the flag for the A-leg on the incoming request, and the flag for the B-leg on the incoming reply. I can't point in waiting for the ACK to try and work out whether this leg is behind NAT. And also it seem this set of if statements will also match incoming requests from the A-leg, so why are we setting a brach flag? Does that leg also also get the properties of a branch? 4. When I get a 200 OK coming from behind NAT it is not subjected to fix_nated_contact(), and this seems to be because it doesn't have the FLB_NATB flag set: if (is_reply()) { if(isbflagset(FLB_NATB)) { fix_nated_contact(); } } Any help clarifying would be much appreciated. Thanks, Richard -- Richard Brady
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users