Re: [OpenSIPS-Users] Too many Hops error

2016-05-27 Thread Johan De Clercq
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

[OpenSIPS-Users] Release] OpenSIPS 2.2.0 stable is here !

2016-05-27 Thread Bogdan-Andrei Iancu

Hi all,

OpenSIPS 2.2.0-RC2 got promoted to fully stable 2.2.0 release - the 
first LTS release on the 2.x branch, incorporating the new async design.


More than 70 bug fixes, 150+ commits, tens of people involved in 
testing, troubleshooting and fixing. The result ? A rock solid 2.2.0 
release, feature-rich:

http://www.opensips.org/About/Version-2-2-0

Where to get it from ?
http://www.opensips.org/Downloads/Downloads

Please enjoy !

--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] compiling opensips on a raspberry pi

2016-05-27 Thread Steve Woolley
Am trying to run opensips on a raspberry pi OS:Raspbian (based on Debian 
Jessie).

Compiled successfully but take a long time to start up opensips. (35-45 
minutes).
Shows the following in the log (during the long pause):
DBG:tm:lock_initialize: lock initialization started


Bogan-Andrei Iancu has suggested this is probably due to "System V locking 
support”.
He suggested trying to set USE_PTHREAD_MUTEX or USE_POSIX_SEMS compile options.
However, both of these options fail on:

Compiling net/net_tcp.c
net/net_tcp.c: In function ‘tcpconn_new’:
net/net_tcp.c:844:7: error: used union type value where scalar is required
   if (c->write_lock) lock_destroy(&c->write_lock);
   ^
Makefile.rules:25: recipe for target 'net/net_tcp.o' failed
make: *** [net/net_tcp.o] Error 1

Anyone had any luck on setting these compile options and/or getting opensips 
(efficiently) running on a Raspberry Pi?

--
Steve Woolley
steve.wool...@me.com



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users