[OpenSIPS-Users] OpenSIPS 1.7.0 Topology Hiding and NAT Traversal
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Sep 14 19:47:41 CEST 2011
Hi Jeremy,
Indeed, seems to be an incompatibility here...What I would suggest is a
bit of a trick, to manually handle the NATed contact in a dialog
variable...Haven;t tried it, just an idea.
On initial INVITE :
modparam("nathelper", "received_avp", "$avp(contact)")
...
topology_hiding();
if (nat_uac_test()) {
fix_nated_register(); # puts the fix contact into received avp
$dlg_val(caller_contact) = $avp(contact);
}
...
And for sequential requests:
...
loose_route();
...
if ( match_dialog() ) {
# sequential request from callee to caller?
if ($DLG_dir=="UPSTREAM") $ru = $dlg_val(caller_contact) ;
}
Again, not tested, not sure it will work, but just an idea :)
Regards,
Bogdan
On 09/13/2011 07:30 PM, Jeremy Childs wrote:
> I'm having a problem with the dialog module's topology hiding when a
> UA is behind a NAT.
>
> If I call
>
> if (nat_uac_test()) {
> fix_nated_contact();
> }
> topology_hiding();
>
> The Contact header is rewritten twice - once by fix_nated_contact()
> and again by topology_hiding(). This results in an invalid contact header.
>
> Is there an obvious way I'm missing that could make these two modules
> coexist, or is the best solution to add NAT knowledge to
> dlg_tophiding.c? This seems like a lot of code to duplicate.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110914/11a23e4f/attachment.htm>
More information about the Users
mailing list