[SR-Users] Kamailio as loadbalancer + NAT pinning

Vladyslav Zakhozhai v.zakhozhai at gmail.com
Tue Jan 3 11:58:20 CET 2017


Hi,

I want to use Kamailio as SIP loadbalancer and NAT helper in front of
freeswitch boxes. Main tasks here are:
1. load balancing SIP requests to freeswitch boxes
2. fixing contact information during registrations and invites for nat'ed
clients (kamailio is not registrar)
3. fixing sdp (or proxying rtp via rtpproxy) for nat'ed clients
4. security (check SIP messages, pike, etc)
5. outbound proxy for freeswitch boxes

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

But there is one issue. Multiple registration are allowed on freeswitch
boxes and in replies (freeswitch -> kamailio) I see more than one Contact
header.

Is it an issue or kamailio will handle it without problems?
Or I need to save Contact header from request to hash table and retreive it
in onreply_route? But I do not know how to save it in usrloc db table then.
I thin this is more sophisticated approach.

I appreciate your advice.

Thank you in advance.

-- 
С уважением,
Владислав Захожай
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170103/575f72a7/attachment.html>


More information about the sr-users mailing list