mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Fixups osips_event tutorial
This commit is contained in:
@@ -166,7 +166,7 @@ func startSessionManager(responder *engine.Responder, loggerDb engine.LogStorage
|
||||
} else if cfg.SMCdrS == utils.INTERNAL {
|
||||
<-cacheChan // Wait for the cache to init before start doing queries
|
||||
cdrsConn = responder
|
||||
} else {
|
||||
} else if len(cfg.SMCdrS) != 0 {
|
||||
for i := 0; i < cfg.SMReconnects; i++ {
|
||||
client, err = rpcclient.NewRpcClient("tcp", cfg.SMCdrS, 0, cfg.SMReconnects, utils.GOB)
|
||||
if err == nil { //Connected so no need to reiterate
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
# rated_subjects = # Filter on CDR RatedSubject fields
|
||||
# cost_intervals = # Filter on CDR Cost
|
||||
|
||||
|
||||
[session_manager]
|
||||
# enabled = false # Starts SessionManager service: <true|false>
|
||||
# switch_type = freeswitch # Defines the type of switch behind: <freeswitch>
|
||||
|
||||
@@ -119,6 +119,7 @@ time_window = 5m # Will only keep the CDRs who's call setup time is not older
|
||||
enabled = true # Starts SessionManager service: <true|false>
|
||||
switch_type = opensips # Defines the type of switch behind: <freeswitch>
|
||||
# rater = internal # Address where to reach the Rater
|
||||
cdrs = internal # Address where to reach the CDR server for CDR processing
|
||||
# reconnects = 3 # Number of reconnects to rater/cdrs before giving up.
|
||||
# debit_interval = 10 # Interval to perform debits on.
|
||||
# min_call_duration = 0s # Only authorize calls with allowed duration bigger than this
|
||||
@@ -136,8 +137,6 @@ switch_type = opensips # Defines the type of switch behind: <freeswitch>
|
||||
[opensips]
|
||||
# listen_udp = 127.0.0.1:2020 # Address where to listen for datagram events coming from OpenSIPS
|
||||
# mi_addr = 127.0.0.1:8020 # Adress where to reach OpenSIPS mi_datagram module
|
||||
# events_subscribe_interval = 60s # Automatic events subscription to OpenSIPS, 0 to disable it
|
||||
# cdrs = internal # Address where to reach CDR Server, empty to disable CDR processing <""|internal|127.0.0.1:2013>
|
||||
# reconnects = 3 # Number of attempts on connect failure.
|
||||
|
||||
[derived_charging]
|
||||
|
||||
@@ -19,7 +19,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/sbin/opensips
|
||||
NAME=opensips
|
||||
DESC=opensips
|
||||
TUTFOLDER = /usr/share/cgrates/tutorials/osips_event/opensips
|
||||
TUTFOLDER=/usr/share/cgrates/tutorials/osips_event/opensips
|
||||
CFGFILE=$TUTFOLDER/etc/opensips/opensips.cfg
|
||||
M4CFGFILE=$TUTFOLDER/etc/opensips/opensips.m4
|
||||
M4ARCHIVEDIR=$TUTFOLDER/etc/opensips/archive
|
||||
@@ -107,7 +107,7 @@ if test "$DUMP_CORE" = "yes" ; then
|
||||
# echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
|
||||
fi
|
||||
|
||||
OPTIONS="-P $PIDFILE -m $S_MEMORY -M $P_MEMORY -u $USER -g $GROUP"
|
||||
OPTIONS="-f $CFGFILE -P $PIDFILE -m $S_MEMORY -M $P_MEMORY -u $USER -g $GROUP"
|
||||
|
||||
case "$1" in
|
||||
start|debug)
|
||||
|
||||
@@ -4,25 +4,26 @@
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
export GOPATH=$(CURDIR)
|
||||
#export GOPATH=$(CURDIR)
|
||||
export GOPATH=/usr/local/goapps
|
||||
|
||||
PKGDIR=debian/cgrates
|
||||
SRCDIR=src/github.com/cgrates/cgrates
|
||||
SRCDIR=/usr/local/src/cgrates/cgrates.git/cgrates
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
clean:
|
||||
dh_clean
|
||||
rm -rf $(GOPATH)/bin/* $(GOPATH)/pkg/*
|
||||
#rm -rf $(GOPATH)/bin/* $(GOPATH)/pkg/*
|
||||
#cd $(GOPATH)/src && find * -name '*.go' -exec dirname {} \; | xargs -n1 go clean
|
||||
rm -f $(GOPATH)/goinstall.log
|
||||
|
||||
binary-arch: clean
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
exec $(SRCDIR)/update_external_libs.sh
|
||||
cd $(SRCDIR) && go install
|
||||
#exec $(SRCDIR)/update_external_libs.sh
|
||||
#cd $(SRCDIR) && go install
|
||||
mkdir -p $(PKGDIR)/usr/bin
|
||||
cp $(GOPATH)/bin/cgr-* $(PKGDIR)/usr/bin/
|
||||
mkdir -p $(PKGDIR)/etc/cgrates
|
||||
|
||||
@@ -5,10 +5,10 @@ rm -rf $WORK_DIR
|
||||
mkdir -p $WORK_DIR
|
||||
cp -r debian $WORK_DIR/debian
|
||||
cd $WORK_DIR
|
||||
git clone https://github.com/cgrates/cgrates.git src/github.com/cgrates/cgrates
|
||||
tar xvzf src/github.com/cgrates/cgrates/data/tutorials/fs_csv/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
rm src/github.com/cgrates/cgrates/data/tutorials/fs_csv/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
tar xvzf src/github.com/cgrates/cgrates/data/tutorials/fs_json/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
rm src/github.com/cgrates/cgrates/data/tutorials/fs_json/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
#git clone https://github.com/cgrates/cgrates.git src/github.com/cgrates/cgrates
|
||||
#tar xvzf src/github.com/cgrates/cgrates/data/tutorials/fs_csv/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
#rm src/github.com/cgrates/cgrates/data/tutorials/fs_csv/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
#tar xvzf src/github.com/cgrates/cgrates/data/tutorials/fs_json/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
#rm src/github.com/cgrates/cgrates/data/tutorials/fs_json/freeswitch/etc/freeswitch_conf.tar.gz
|
||||
dpkg-buildpackage -us -uc
|
||||
#rm -rf $WORK_DIR
|
||||
|
||||
Reference in New Issue
Block a user