Asterisk configuration for multihomed Kamailio
On systems where Kamailio listens on multiple IP addresses each one of those addresses must have an entry in sip.conf on the Asterisk servers.
It is recommended to make a copy of the [enswitch-local] stanza in as many stanzas as needed and add a suffix to each stanza's name.
For example, on a system where Kamailio is listening on IP addresses 1.2.3.4 and 5.6.7.8:
[enswitch-local] host = 1.2.3.4 fromdomain = 1.2.3.4 type = friend insecure = port,invite context = from-internal canreinvite = no nat = yes t38pt_udptl = no [enswitch-local-1] host = 5.6.7.8 fromdomain = 5.6.7.8 type = friend insecure = port,invite context = from-internal canreinvite = no nat = yes t38pt_udptl = no
and so forth. All stanzas must have enswitch-local as a prefix in their name.