参考:http://www.kamailio.org/dokuwiki/doku.php/asterisk:load-balancing-and-ha
4.1配置文件 kamailio.cfg
loadmodule("dispatcher.so")
modparam("dispatcher", "list_file", "/usr/local/etc/kamailio/dispatcher.list")
modparam("dispatcher", "force_dst", 1)
复制代码
4.2 ---dispatcher.list----文件
# group sip addresses of your * units
1 sip:221.5.152.171:5060
1 sip:221.5.152.170:5060
4.3 kamctl命令:kamctl dispatcher show
-- command 'dispatcher' - manage dispatcher
* Examples: dispatcher addgw 1 sip:1.2.3.1:5050 1 'outbound gateway'
* dispatcher addgw 2 sip:1.2.3.4:5050 3 ''
* dispatcher rmgw 4
dispatcher show ..................... show dispatcher gateways
dispatcher reload ................... reload dispatcher gateways
dispatcher dump ..................... show in memory dispatcher gateways
dispatcher addgw <setid> <destination> <flags> <description>
.......................... add gateway
dispatcher rmgw <id> ................ delete gateway
查看载入的配置:kamctl dispatcher dump
修改后重新载入配置:kamctl dispatcher reload
如需使用,需安装MySQL-client-community-5.1.32-0.rhel5.i386.rpm
否则报错:ERROR: This command requires a database engine - none was loaded