On Wed, Jul 20, 2016 at 04:37:42PM -0400, Tickling Contest wrote:
..
but having trouble getting any further to load balance
a couple
of Asterisk servers. Here is a range of issues I have:
(a) The Kamailio server keeps sending UDP SIP messages to the Asterisk
server and it is not clear where to control what protocol to use to send
SIP messages Asterisk server(s).
route[TOASTERISK] creates $du in the following way:
$du = "sip:" + $sel(cfg_get.asterisk.bindip) + ":"
+ $sel(cfg_get.asterisk.bindport);
No mention of transport so it will use the default UDP.
Same for the other places where bindip/binport are used. If you want TCP
or TLS instead you'll have to add a transport to the URI or use
specific function to relay/send messages (like t_relay_to_tcp() instead
of t_relay()).
(b) I followed the instructions for the dispatcher
module in the wiki, but
it is not clear why I should use the #!define WITH_ASTERISK directive to
enumerate the bind IPs and ports (how does this reconcile with the list of
Asterisk servers in the dispatcher.list file?):
You shouldn't since it doesn't reconcile. The WITH_ASTERISK directive is
used to communicate with 1 specific SIP server.
http://www.kamailio.org/docs/modules/stable/modules/dispatcher.html
contains a full example of a config with dispatcher. But note that the
kamailio/asterisk realtime integration does some stuff (sending
registers to asterisk) that need to be handled differently (I suggest
useing kamailio as registar).