Daniel, thank you for your answer.

You did not understand me completely. This is my fault.

Let me put it this way. I want kamailio to handle NAT (fixing nat only from client's side) not being registrar itself. This also includes nat pinning. usrloc module is a dependency for nat pinning in nathelper module.

Request: UAC behind NAT ===> kamailio == fixed contact ==> freeswitch
Respnse: freeswitch == 200 OK ==> kamailio (store contact in usrloc, start pinning) == 200 OK ==> UAC behind NAT

Kamailio starts pinning UACs behind NAT only after successful authentication and registration on freeswitch box.

No nat fixes between kamailio and freeswitch (only from UAC).


2017-01-03 14:33 GMT+02:00 Daniel Tryba <d.tryba@pocos.nl>:
On Tue, Jan 03, 2017 at 12:58:20PM +0200, Vladyslav Zakhozhai wrote:
> The main question here is about nat pinning. Acctording to module doc (
> http://kamailio.org/docs/modules/4.4.x/modules/nathelper.html) I need
> nathelper module and usrloc module.
>
> So I can proxy REGISTER requests to freeswitch boxes and in onreply_route
> check for REGISTER statuses:
> 1. if no success we use pike to limit bruteforce attacks
> 2. if success I need to save contact to usrloc db table

I don't know the answer to your question, but why do you need to save
the contact in usrloc?  If it is not to store a fixed freeswitch backend
for a client (for INVITEs to that client), don't do it.

Just block (successive) failures to authenticate.


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
С уважением,
Владислав Захожай