[OpenSIPS-Users] RURI domain on NAT'd endpoints

Thomas Gelf thomas at gelf.net
Tue Sep 8 06:54:42 CEST 2009


Jeff Pyle wrote:
> I didn't have the usrloc portion configured before, and I was running
> fix_contact() on everything detected as NAT.  I've modified the top of
> route[0] to look like this:
> 
> if (client_nat_test("3")) {
>       force_rport();
>       $avp(s:received_uri) = $source_uri;
>       if (!is_method("REGISTER")) fix_contact();
>       setbflag(7);
> }        # nat_keepalive() further down after some pref checks
> 
> Is this wise?

Looks good. I usually prefer handling REGISTER requests in a dedicated
route. That will avoid running into trouble with future enhancements /
changes to your config (e.g. forgetting to prefix a new function call
with !is_method("REGISTER")).

Best regards,
Thomas Gelf

-- 
 mail: thomas at gelf.net
  web: http://thomas.gelf.net/




More information about the Users mailing list