[OpenSIPS-Users] dispatcher module + load balancing + round robin
technocrat voip
techievoip at gmail.com
Wed Aug 13 16:10:28 CEST 2008
I am have openser installed and my expectation with the below configuration
is open ser will forward the request it gets to the other servers (
dispatch.cfg ) in round robin fashion .
I mean first will goto the first serer and second to the second server and
third again to first server like that..
My configs are like below
openser.cfg
children=4
/* uncomment the following lines to enable debugging */
debug=9
fork=no
log_stderror=yes
port=5060
/* uncomment and configure the following line if you want openser to
bind on a specific interface/port/proto (default bind on all available)
*/
listen=udp:xxx.xxx.xxx.204:5060
####### Modules Section ########
#set module path
mpath="/usr/local/lib/openser/modules/"
/* uncomment next line for MySQL DB support */
#loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri_db.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
loadmodule "dispatcher.so"
# ----------------- setting module-specific parameters ---------------
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
# ----- rr params -----
# add value to ;lr param to cope with most of the UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)
# ----- rr params -----
modparam("registrar", "method_filtering", 1)
# ----- uri_db params -----
/* by default we disable the DB support in the module as we do not need it
in this configuration */
modparam("uri_db", "use_uri_table", 0)
modparam("uri_db", "db_url", "")
# ----- usrloc params -----
modparam("usrloc", "db_mode", 0)
/* uncomment the following lines if you want to enable DB persistency
for location entries */
#modparam("usrloc", "db_mode", 2)
#modparam("usrloc", "db_url",
# "mysql://openser:openserrw@localhost/openser")
# ----- auth_db params -----
/* uncomment the following lines if you want to enable the DB based
authentication */
#------ dispatcher params -----
modparam("dispatcher","list_file","/usr/local/etc/openser/dispatcher.cfg")
####### Routing Logic ########
# main request routing logic
route{
log(1,"This is the another log message \n");
xlog("L_INFO", "SIP Request: method [$rm] from [$fu] to [$tu]\n");
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
ds_select_dst("2","4");
forward();
}
dispatcher.cfg
# $Id: dispatcher.list 3662 2008-02-07 13:06:00Z miconda $
# dispatcher destination sets
#
# line format
# setit(integer) destination(sip uri) flags (integer, optional)
# proxies
2 sip:xx.xx.xxx.137:5080
2 sip:xxx.xxx.xx.59:5080
continously it goes to 59 only it never goes to 137 ..
Any help in this would be appreciated.
Please
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080813/57f800ae/attachment-0001.htm
More information about the Users
mailing list