[SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
Hi all, I have Kamailio set as an SBC with freeswitch behind - that all works fine. Freeswitch can send calls out VIA Kamailio to external IP address’, but if I try sending a call to another IP hosted by Kamailio the seems to go nowhere… Supplier -> Kamailio -> Customer1 -> Kamailio -> Customer

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
Hi, 1. Do you have a listener (listen=) for all necessary IPs and transports? 2. Outbound interface selection is done either via the 'mhomed' option, https://www.kamailio.org/wiki/cookbooks/5.0.x/core#mhomed or, if it's not doing what you want, by manually steering it via $fs: https://www.kam

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
I have listen commented out - which means it listens on all IPs (doesn’t it?) - do I need to set them explicitly? I did add mhomed=1 on this setup - but the calls went a bit crazy (I didn’t manage to capture quite what was happening). Thoughts? > On 3 Nov 2017, at 13:59, Alex Balashov wrote:

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
On Fri, Nov 03, 2017 at 02:04:37PM +, Oz Mortimer wrote: > I have listen commented out - which means it listens on all IPs > (doesn’t it?) - do I need to set them explicitly? Try setting them explicitly, so that you can route them explicitly. > I did add mhomed=1 on this setup - but the call

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
Ok - did that and got the same error, though this time I looked at what it was; Im /var/log/messages I see - Nov 3 14:13:28 IS-56434 kamailio: WARNING: [socket_info.c:1392]: fix_hostname(): could not rev. resolve xxx.xxx.xxx.xxx Nov 3 14:13:28 IS-56434 kamailio: WARNING: [socket_info.c:1392]:

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
Are you sure the IP is correct? On November 3, 2017 10:20:17 AM EDT, Oz Mortimer wrote: >Ok - did that and got the same error, though this time I looked at what >it was; >Im /var/log/messages I see - >Nov 3 14:13:28 IS-56434 kamailio: WARNING: >[socket_info.c:1392]: fix_hostname(): could not

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
Yeah 100% So, I figured it might be something with DNS so I set auto_aliases=no but then get the following. Nov 3 14:32:19 IS-56434 kamailio: INFO: [tcp_main.c:4745]: init_tcp(): using epoll_lt as the io watch method (auto detected) Nov 3 14:32:19 IS-56434 /usr/sbin/kamailio[13015]: WARNING:

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
nb. I only get >> fix_hostname(): could not rev. resolve >> xxx.xxx.xxx.xxx When mhomed=1 > On 3 Nov 2017, at 14:21, Alex Balashov wrote: > > Are you sure the IP is correct? > > On November 3, 2017 10:20:17 AM EDT, Oz Mortimer wrote: >> Ok - did that and got the same error, though this t

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
I would not be concerned about superficial errors. I am more concerned that the system is attempting to "resolve" an IP address. This would only happen if its format is not deemed to be that if an IP address. On November 3, 2017 10:38:41 AM EDT, Oz Mortimer wrote: >nb. I only get >>> fix_hos

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
Ok, So sort of progress.. With mhomed=0 the calls arrive at the media server from the IP the call was sent to, With mhomed=1 the calls arrive at the media server from the first registered IP address regardless of which IP the call was sent to. So mhomed is doing the reverse of what I would exp

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
That's probably because the mhomed test, as described in the docs, determines that this should be the outbound interface. On November 3, 2017 10:51:06 AM EDT, Oz Mortimer wrote: >Ok, > >So sort of progress.. > >With mhomed=0 the calls arrive at the media server from the IP the call >was sent to

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
Also, to correct a previous statement: it does seem that Kamailio attempts to resolve the reverse DNS entries of its listeners on boot. That can be disabled via DNS core configuration parameters. It can also be ignored as it's of no concern to this scenario. On November 3, 2017 11:06:57 AM EDT

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Oz Mortimer
Why would it choose a different IP from the one it received on? How do I make it use the correct ip? > On 3 Nov 2017, at 15:06, Alex Balashov wrote: > > That's probably because the mhomed test, as described in the docs, determines > that this should be the outbound interface. > > On Novemb

Re: [SR-Users] Multiple IPs

2017-11-03 Thread Alex Balashov
Because it determines the proper route based on the method described in the 'mhomed' section of the docs. Your choices are either to let Kamailio do that, or set mhomed=0 and choose the egress interface manually based on your own criteria. You can do this by setting $fs prior to t_relay(), e.g.