[SR-Users] Best approach for Kamailio behind nat
Evgeny Kuchkov
ky4k0b at gmail.com
Sun Mar 25 00:56:52 CET 2018
Hi all,
I have the current configuration located on google clod servers:
[Alice a.a.a.a]--->(GCN NAT x.x.x.x)--->(Instance with Kam
10.0.0.1)--->(next proxy 10.0.0.2)
Currently I have configured a fake alias with IP x.x.x.x in Debain and set
listeners this way:
listen=udp:10.0.0.1:5060 advertise x.x.x.x:5060
listen=udp:x.x.x.x:5060
200OK from Kam to Alice:
Via: a.a.a.a
Record-Route: <sip:alias1 at 10.0.0.2;lr> (used for further internal routing)
Record-Route: <sip:alias2 at 10.0.0.2;lr>
Record-Route: <sip:x.x.x.x;lr>
Contact: <sip:dnis at x.x.x.x>
ACK recived from Alice with reversed RR:
ACK sip:dnis at x.x.x.x
Via: a.a.a.a
Route: <sip:x.x.x.x;lr>, <sip:alias2 at 10.0.0.2;lr>,<sip:alias1 at 10.0.0.2;lr>
So what Kam does - it goes through loose_route() and dispatches two ACKs to
x.x.x.x (from which I'd like to get rid of) and 10.0.0.2
First one is:
ACK sip:alias1 at 10.240.0.67
Via: x.x.x.x
Via: a.a.a.a
Route: <sip:x.x.x.x;lr>, <sip:alias2 at 10.0.0.1;lr>
And the next one:
ACK sip:alias1 at 10.240.0.67
Via: x.x.x.x
Via: x.x.x.x (Doubles Via)
Via: a.a.a.a
Route: <sip:alias2 at 10.0.0.1;lr>
So my question is - how to make Kam think that x.x.x.x it's own address and
stop dispatching in-dialog messages to itself? Currently I'm thinking about
chooping off one Route/Record-Route in route[WITHINDLG] tight before
loose_route(). But maybe there's a better way to solve my problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180325/06e53497/attachment.html>
More information about the sr-users
mailing list