Hi all,
I try a configuration with a SER server with mediaproxy that load
balance SIP/RTP two 2 asterisks server (REGISTRAR, ... )
SER: 192.168.1.81 and 10.10.10.1
Asterisk1: 10.10.10.12 with default route 10.10.10.1
Asterisk2: 10.10.10.13 with default route 10.10.10.1
Mediaproxy.ini:
[Dispatcher]
start = yes
socket = /var/run/proxydispatcher.sock
group = root
defaultProxy = /var/run/mediaproxy.sock
[MediaProxy]
start = yes
socket = /var/run/mediaproxy.sock
group = root
proxyIP = 192.168.1.81
portRange = 60000:65000
TOS = 0xb8
idleTimeout = 60
holdTimeout = 3600
forceClose = 0
openser.cfg
...
loadmodule "/usr/lib/openser/modules/sl.so"
loadmodule "/usr/lib/openser/modules/tm.so"
loadmodule "/usr/lib/openser/modules/rr.so"
loadmodule "/usr/lib/openser/modules/maxfwd.so"
loadmodule "/usr/lib/openser/modules/usrloc.so"
loadmodule "/usr/lib/openser/modules/registrar.so"
loadmodule "/usr/lib/openser/modules/textops.so"
loadmodule "/usr/lib/openser/modules/dispatcher.so"
loadmodule "/usr/lib/openser/modules/xlog.so"
loadmodule "/usr/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/lib/openser/modules/domain.so"
loadmodule "/usr/lib/openser/modules/mysql.so"
modparam("domain", "db_url",
"mysql://ser:ser@localhost/ser")
modparam("mediaproxy", "mediaproxy_socket",
"/var/run/proxydispatcher.sock")
modparam("mediaproxy", "natping_interval", 20)
modparam("dispatcher", "list_file",
"/etc/openser/dispatcher.list")
route{
...
if(method=="REGISTER"){
# For the moment I just do like this to register
# my phone on one server
forward("10.10.10.12");
}
else {
if (method==INVITE) {
use_media_proxy();
}
ds_select_dst("1", "4");
t_relay();
}
}
Dispatcher.list:
1 sip:10.10.10.12:5060
1 sip:10.10.10.13:5060
Thanks a lot for your help,
Thomas