[Kamailio-Users] [sr-dev] Inbound NAT detection and fix_nated_register() very poorly documented
miconda at gmail.com
Fri Nov 27 15:35:03 CET 2009
On 27.11.2009 15:28 Uhr, Alex Balashov wrote:
> Daniel-Constantin Mierla wrote:
>> But was a bit too long for me to read and reply at the time I got it
>> ... will do it soon.
> My fundamental question can be distilled to something very simple:
> If I have a REGISTER from a NAT'd endpoint, what can I do (in terms of
> existing module functionality, e.g. fix_nated_register(), save()) to
> "store" the fact that the endpoint is NAT'd in such a way that this
> can be detected again on a lookup() for an inbound call and special
> measures can be taken?
> I suppose there are many things that can be done - special AVPs stored
> in the DB, custom SQL queries, manually checking if the RURI domain is
> an RFC1918 address string etc., but I want to know what the canonical
> way to do this in terms of the existing modules is. After all, it is
> a common need to know that your call is going to a NAT'd endpoint
> prior to receiving a reply for that request.
set a branch flag for register. After lookup() it is restored so you can
test it. See default config file, it uses this mechanism.
> My secondary concern is that the way lookup() works when
> received_param is used is not documented at all.
This is the name of the parameter appended to contact uri, you will see
it in location and in the reply. If you want to use it, then you have to
do it in the config, I haven't used it so far.
More information about the Users