diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bd29f099b..3c00699e0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -45,6 +45,7 @@ information, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file. | @rbarrabe | Régis Barrabé | | @J0hnSteel | John Koce Steel | | @ewsamuels | Errol Samuels | +| @razvancrainea | Răzvan Crainea | diff --git a/data/storage/mysql/setup_cgr_db.sh b/data/storage/mysql/setup_cgr_db.sh index e15d6696b..7f01227f6 100755 --- a/data/storage/mysql/setup_cgr_db.sh +++ b/data/storage/mysql/setup_cgr_db.sh @@ -1,6 +1,5 @@ #! /usr/bin/env sh - if test $# -lt 2; then echo "" echo "setup_cgr_db.sh []" @@ -10,20 +9,20 @@ fi host=$3 if [ -z "$3" ]; then - host="localhost" + host="localhost" fi -mysql -u $1 -p$2 -h $host < create_db_with_users.sql +DIR="$(dirname "$(readlink -f "$0")")" + +mysql -u $1 -p$2 -h $host < "$DIR"/create_db_with_users.sql cu=$? -mysql -u $1 -p$2 -h $host -D cgrates < create_cdrs_tables.sql +mysql -u $1 -p$2 -h $host -D cgrates < "$DIR"/create_cdrs_tables.sql cdrt=$? -mysql -u $1 -p$2 -h $host -D cgrates < create_tariffplan_tables.sql +mysql -u $1 -p$2 -h $host -D cgrates < "$DIR"/create_tariffplan_tables.sql tpt=$? if [ $cu = 0 ] && [ $cdrt = 0 ] && [ $tpt = 0 ]; then - echo "" - echo "\t+++ CGR-DB successfully set-up! +++" - echo "" + echo -e "\n\t+++ CGR-DB successfully set-up! +++\n" exit 0 fi diff --git a/data/storage/postgres/create_db_with_users.sh b/data/storage/postgres/create_db_with_users.sh index 199b84dcf..484290ec1 100755 --- a/data/storage/postgres/create_db_with_users.sh +++ b/data/storage/postgres/create_db_with_users.sh @@ -5,5 +5,5 @@ sudo -u postgres dropdb -e cgrates sudo -u postgres dropuser -e cgrates -sudo -u postgres psql -c "CREATE USER cgrates password 'CGRateS.org';" +sudo -u postgres psql -c "CREATE USER cgrates password 'CGRateS.org';" sudo -u postgres createdb -e -O cgrates cgrates diff --git a/data/storage/postgres/setup_cgr_db.sh b/data/storage/postgres/setup_cgr_db.sh index 79018cc25..2ae4d8830 100755 --- a/data/storage/postgres/setup_cgr_db.sh +++ b/data/storage/postgres/setup_cgr_db.sh @@ -3,27 +3,27 @@ user=$1 if [ -z "$1" ]; then - user="cgrates" + user="cgrates" fi host=$2 if [ -z "$2" ]; then - host="localhost" + host="localhost" fi -./create_db_with_users.sh +DIR="$(dirname "$(readlink -f "$0")")" + +"$DIR"/create_db_with_users.sh export PGPASSWORD="CGRateS.org" -psql -U $user -h $host -d cgrates -f create_cdrs_tables.sql +psql -U $user -h $host -d cgrates -f "$DIR"/create_cdrs_tables.sql cdrt=$? -psql -U $user -h $host -d cgrates -f create_tariffplan_tables.sql +psql -U $user -h $host -d cgrates -f "$DIR"/create_tariffplan_tables.sql tpt=$? if [ $cdrt = 0 ] && [ $tpt = 0 ]; then - echo "" - echo "\t+++ CGR-DB successfully set-up! +++" - echo "" + echo -e "\n\t+++ CGR-DB successfully set-up! +++\n" exit 0 fi diff --git a/data/tutorials/osips_async/opensips/etc/opensips/opensips.cfg b/data/tutorials/osips_async/opensips/etc/opensips/opensips.cfg index 3733d6c60..5bfac3ee6 100644 --- a/data/tutorials/osips_async/opensips/etc/opensips/opensips.cfg +++ b/data/tutorials/osips_async/opensips/etc/opensips/opensips.cfg @@ -6,11 +6,10 @@ ####### Global Parameters ######### -#debug=3 +log_level=3 log_stderror=no log_facility=LOG_LOCAL0 -#fork=yes children=4 listen=udp:lo:5060 listen=udp:eth0:5060 @@ -18,6 +17,9 @@ listen=udp:eth1:5060 auto_aliases=no +# do not open more than 4096 file descriptors +open_files_limit=4096 + ####### Modules Section ######## #set module path @@ -91,24 +93,12 @@ modparam("db_flatstore", "single_file", 1) #### ACCounting module loadmodule "acc.so" modparam("acc", "detect_direction", 1) -#modparam("acc", "cdr_flag", "CDR") -#modparam("acc", "evi_flag", "CDR") -#modparam("acc", "evi_missed_flag", "CDR") modparam("acc", "evi_extra", "cgr_reqtype=$avp(cgr_reqtype); cgr_account=$avp(cgr_account); cgr_destination=$avp(cgr_destination); cgr_supplier=$avp(cgr_supplier); - cgr_answertime=$dlg_val(atime); + cgr_answertime=$dlg_val(atime); dialog_id=$DLG_did") -#modparam("acc", "db_url", "flatstore:/tmp") -#modparam("acc", "db_flag", "CDR") -#modparam("acc", "db_missed_flag", "CDR") -#modparam("acc", "db_table_missed_calls", "cgr_missed") -#modparam("acc", "db_extra", "cgr_reqtype=$avp(cgr_reqtype); -# cgr_account=$avp(cgr_account); -# cgr_destination=$avp(cgr_destination); -# cgr_supplier=$avp(cgr_supplier); -# dialog_id=$DLG_did") #### CfgUtils module loadmodule "cfgutils.so" @@ -138,7 +128,7 @@ startup_route { local_route { if (is_method("BYE") ) { - #setflag(CDR); + # make sure a LOCAL_DISCONNECT event is triggered on local BYEs acc_evi_request("LOCAL_DISCONNECT"); #FixMe } } diff --git a/docs/tut_opensips_installs.rst b/docs/tut_opensips_installs.rst index 2c68ad126..8892ff2ca 100644 --- a/docs/tut_opensips_installs.rst +++ b/docs/tut_opensips_installs.rst @@ -9,8 +9,8 @@ OpenSIPS_ We got OpenSIPS_ installed via following commands: :: - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5F2FBB7C - echo "deb http://apt.opensips.org jessie 2.1-releases" >>/etc/apt/sources.list + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 049AD65B + echo "deb http://apt.opensips.org jessie 2.2-releases" >>/etc/apt/sources.list apt-get update apt-get install opensips opensips-json-module opensips-restclient-module