What comes from the load balancer, should not be send back to the load
balancer. Add condition before you load balance.
Get Outlook for iOS
On Thu, May 26, 2016 at 10:08 PM -0700, "Francjos" <35...@heb.be> wrote:
I've configured two opensips to load balance incoming calls to freeswitch
servers.One of the two opensips works welle and routes calls to the
destination, but another causes the error "Too many hops".
I have the same configuration file for the two opsnisps.
Any help?
Here is the configuration file:
opensips.cfg
### Global Parameters #
#debug=3
debug=4
log_stderror=yes
log_facility=LOG_LOCAL0
fork=yes
children=4
/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes
/* uncomment the next line to enable the auto temporary blacklisting of
not available destinations (default disabled) */
#disable_dns_blacklist=no
/* uncomment the next line to enable IPv6 lookup after IPv4 dns
lookup failures (default disabled) */
#dns_try_ipv6=yes
/* comment the next line to enable the auto discovery of local aliases
based on revers DNS on IPs */
auto_aliases=no
mhomed=yes
#listen=udp:127.0.0.1:5060 # CUSTOMIZE ME
listen=udp:10.0.0.5:5060
### Modules Section
#set module path
mpath="/usr/lib/opensips/modules/"
# DB_MYSQL module
loadmodule "db_mysql.so"
modparam("db_mysql", "exec_query_threshold", 60)
modparam("db_mysql", "timeout_interval", 2)
# UAC_AUTH module: Authentication module
loadmodule "uac_auth.so"
modparam("uac_auth", "credential", "username:10.0.0.5:password")
## UAC_REGISTRANT module: module of registration on a remote server
loadmodule "uac_registrant.so"
modparam("uac_registrant", "hash_size", 2)
modparam("uac_registrant", "timer_interval", 100)
modparam("uac_registrant", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")
modparam("uac_registrant", "table_name", "registrant")
modparam("uac_registrant", "registrar_column", "registrar")
modparam("uac_registrant", "proxy_column", "proxy")
modparam("uac_registrant", "aor_column", "aor")
modparam("uac_registrant", "third_party_registrant_column",
"third_party_registrant")
modparam("uac_registrant", "username_column", "username")
modparam("uac_registrant", "password_column", "password")
modparam("uac_registrant", "binding_URI_column", "binding_URI")
modparam("uac_registrant", "binding_params_column", "binding_params")
modparam("uac_registrant", "expiry_column", "expiry")
modparam("uac_registrant", "forced_socket_column", "forced_socket")
SIGNALING module
loadmodule "signaling.so"
StateLess module
loadmodule "sl.so"
Transaction Module
loadmodule "tm.so"
modparam("tm", "fr_timeout", 5)
modparam("tm", "fr_inv_timeout", 30)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)
Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)
MAX ForWarD module
loadmodule "maxfwd.so"
SIP MSG OPerationS module
loadmodule "sipmsgops.so"
FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)
## Text Operations Module
loadmodule "textops.so"
URI module
loadmodule "uri.so"
modparam("uri", "use_uri_table", 0)
modparam("uri", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")
REGISTRAR module
loadmodule "registrar.so"
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam("registrar", "max_contacts", 10)
modparam("registrar", "tcp_persistent_flag", 7)
ACCounting module
loadmodule "acc.so"
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 0)
/* by default we do not adjust the direct of the sequential requests.
if you enable this parameter, be sure the enable "append_fromtag"
in "rr" module */
modparam("acc", "detect_direction", 0)
modparam("acc", "failed_transaction_flag", "ACC_FAILED")
/* account triggers (flags) */
modparam("acc", "log_flag", "ACC_DO")
modparam("acc", "log_missed_flag", "ACC_MISSED")
#AUTHentication modules
loadmodule "auth.so"
loadmodule "auth_db.so"
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db",
"db_url","mysql://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
modparam("auth_db", "load_credentials", "")
### Doamian module
loadmodule "domain.so"
modparam("domain",
"db_url","mysql://opensips:opensipsrw@localhost/opensips")
modparam("domain", "db_mode", 1) # Use caching
modparam("domain", "domain_table", "domain")
modparam("domain", "domain_col", "domain_name")
mod