[OpenSIPS-Users] fix_nated_register replacement

Dan Pascu dan at ag-projects.com
Tue May 12 08:24:54 CEST 2009


On Tuesday 12 May 2009, Jinsong Hu wrote:
> Hi, 
>   I noticed that in nathelper module, there is a 
> fix_nated_register() method to fix the nat for register . however, in 
nat_traversal module, there is no such
> 
> method. so if I migrate from nathelper to nat_traversal, what do I do to 
fix the nat and save the registration
> 
> to usrloc ?

That function was not added to nat_traversal because it is not needed. You 
can simply write the received_avp (defined by the registrar module):

modparam("registrar", "received_avp", "$avp(s:received_uri)")

[...]

$avp(s:received_uri) = $source_uri;


If you didn't define the received_avp, the default is $avp(i:42):

$avp(i:42) = $source_uri;

$source_uri is a PV defined by the nat_traversal module, see the docs 
about it.

-- 
Dan



More information about the Users mailing list