Hi all,
I have an existing Kamailio installation that is handling registrations and NAT traversal for clients.
There is one particular build of softphone that sends us a received=X.X.X.X param in its REGISTER message and it seems that the current Kamailio's config in place always uses that address to store the AOR.
It happens to be that the client appears to be misbehaving and sending an outdated IP address on that field.
My question is where in the NAT traversal functions do I have control over using this param or not.
TIA
any thought would be helpful.
On Wed, May 28, 2014 at 4:28 PM, Luis F Urrea lfurrea@gmail.com wrote:
On Thursday 29 May 2014 20:05:56 Luis F Urrea wrote:
any thought would be helpful.
Never trust anything a device sends to kamailio :)
If you are using a config close to default your problem is in route[NATDETECT] if (nat_uac_test("19")) { if (is_method("REGISTER")) { fix_nated_register(); } else { add_contact_alias(); }
http://www.kamailio.org/docs/modules/stable/modules/nathelper.html#idp180678... ========================= 5.4. fix_nated_register()
The function creates a URI consisting of the source IP, port, and protocol and stores the URI in an Attribute-Value-Pair. The URI will be appended as "received" parameter to Contact in 200 OK and registrar will store it in the received cloumn in the location table.
Note: You have to set the received_avp parameter of the nathelper module and the registrar module (both module parameters must have the same value) to use this function.
This function can be used from REQUEST_ROUTE. =========================
If that brings no relief take a look at the third argument for save http://www.kamailio.org/docs/modules/stable/modules/registrar.html#idp197507... If you can construct a correct URI supply it to save.