[977/AmBasicSipDialog.cpp:319] ERROR: Could not find a local interface for resolved local IP (local_tag='1-7CE30A5E-69304517000B3FEE-F9C58700';local_ip='XXX.XXX.XXX.XXX')
I see this message for every incoming call.
SEMS is running on the same server as Kamailio. SEMS is configured to use its own IP address, which is different from Kamailio’s IP. However, in the error log the local_ip shown is Kamailio’s IP address, not SEMS’s.
Why is SEMS using Kamailio’s IP as local_ip, and how can I fix this so that it uses the correct SEMS IP and stops generating this error?
it’s the part of the outbound signalling interface lookup process:
determine next_hop for dialog (using ruri/routeset or forced outbound_proxy/next_hop dlg parameters)
resolve next_hop URI to destinations set
determine outbound signalling interface:
3.1 use outbound interface if set and send SIP request, otherwise do 3.2.x
3.2.1. get local source ip using routing (we use netlink and RTM_GETROUTE for that)
3.2.2 lookup for configured signalling interface by source ip address (ip2iface map can be checked using jsonrpc core.show.interfaces | sip_ip_map)
3.2.3 if signalling interface is not found, then print error (your case) and failover to the default one (first in the config)
seems, that on your system $ ip ro g <dst_ip> for the resolved next_hop IP address returns source IP that is not configured in sems.
possible options:
add configuration for the source ip returned by OS routing to the signaling-interfaces section in sems.cfg
specify outgoing interface explicitly using Sip Interface Name option for gateways.
adjust OS routing to use source ip configured for the sems
thanks a lot for the detailed explanation, it really helps.
Just to give you a bit more context about my setup:
On this server (where I get errors) I run Kamailio as a SIP proxy.
Kamailio uses dispatcher to send traffic to two SEMS instances:
one SEMS runs on the same server as Kamailio, but each is bound to a different IP;
the second SEMS runs on a separate, independent node.
On the box where Kamailio and the first SEMS run, ip a looks like this (anonymized):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp35s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
inet SEMSIP/26 brd X.X.X.X scope global enp35s0
valid_lft forever preferred_lft forever
inet KAMAILIOIP/32 scope global enp35s0
valid_lft forever preferred_lft forever
inet6 XXXX:XXXX:XXXX:XXXX::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::XXXX:XXXX:XXXX:XXXX/64 scope link
valid_lft forever preferred_lft forever
SEMS is listening on its dedicated IP: SEMSIP:5060.
Kamailio is listening on KAMAILIOIP:5060 (same interface, different address).
I’ve set on some termination the “term use outbound proxy” flag using Kamailio as outbound proxy.
Given this layout, and the fact that SEMS is logging the error with local_ip=KAMAILIOIP, what would you recommend as the simplest, least intrusive fix?
I’m looking for the easiest and least painful change.
in this case which interface name do I have to put on my gateway? I’ve set enp35s0 and all the traffic went down
[213724/yeti:SBCCallProfile.cpp:431] ERROR: selected outbound_interface 'enp35s0' does not exist as a signaling interface. Please check the 'additional_interfaces' parameter in the main configuration file.
Dec 04 13:08:31 Debian-bullseye-latest-amd64-base sems[213717]: [213724/yeti:SqlRouter.cpp:409] ERROR: SQL cant get profiles. Drop request
Dec 04 13:08:31 Debian-bullseye-latest-amd64-base sems[213717]: [213727/yeti:SBCCallProfile.cpp:431] ERROR: selected outbound_interface 'enp35s0' does not exist as a signaling interface. Please check the 'additional_interfaces' parameter in the main configuration file.
Dec 04 13:08:31 Debian-bullseye-latest-amd64-base sems[213717]: [213727/yeti:SqlRouter.cpp:409] ERROR: SQL cant get profiles. Drop request