Hello guys,

I have a setup like this:

FS(private)-->(private)Kamailio1(Public)-->Kamailio2(public)-->provider.

I have mhomed=0, enable_double_rr=1, I'm listening on 2 different ports, 1 private, 1 public (with advertise) and on Kamailio1 the DISPATCH ROUTE I force the socket

$fs = "LISTEN_PRIVATE_PROTO:LISTEN_PRIVATE_IF:5080";

To the private ip when the destination IP is a private IP.

This all works fine.

But When calling OUT (i.e. public) kamailio adds itself only for the private IP:

INVITE sip:12345678@mydmain.com SIP/2.0
Record-Route: <sip:172.31.25.124:5080;lr;did=9da.3a61;nat=yes>
Via: SIP/2.0/UDP 172.31.25.124:5080;branch=z9hG4bKf05e.979fd257ac7f288804ef146d12c1e0fb.0
Via: SIP/2.0/UDP 172.31.6.1:5080;received=172.31.6.1;rport=5080;branch=z9hG4bKQ3H8mgHaUjaBm


So when INFO messages come from the provider to kamailio2, kamailio 2 tries to send the INFO straight to "172.21.25.124".

Should i manually add a record-route when calling OUT with

record_route_advertised_address("1.2.3.4:5090");

Or is there a better way of gettingĀ this working?

Regards,

David Villasmil
phone: +34669448337