Correctly scripts from tutorial/osips/ to have the right path

This commit is contained in:
TeoV
2019-05-03 15:46:50 +03:00
committed by Dan Christian Bogos
parent 0e5e759b89
commit 7f4dd1600a
5 changed files with 15 additions and 7 deletions

View File

@@ -41,6 +41,9 @@
"stats_conns": [
{"address": "*internal"}
],
"chargers_conns": [
{"address": "*internal"}
],
"sessions_cost_retries": 5,
},
@@ -57,8 +60,8 @@
"enabled": true,
"listen_bijson": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests
"chargers_conns": [
{"address": "*internal"}
],
{"address": "*internal"}
],
"rals_conns": [
{"address": "*internal"}
],

View File

@@ -21,7 +21,7 @@ DAEMON=/usr/bin/cgr-engine
USER=cgrates
GROUP=cgrates
DAEMON_OPTS=""
TUTFOLDER=/usr/share/cgrates/tutorials/osips_native/$NAME
TUTFOLDER=/usr/share/cgrates/tutorials/osips/$NAME
TMP_DIR=/tmp/cgr_osipsnative/$NAME
SCRIPTNAME=$TUTFOLDER/etc/init.d/$NAME
RUNDIR=$TMP_DIR/run

View File

@@ -19,7 +19,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/opensips
NAME=opensips
DESC=opensips
TUTDIR=/usr/share/cgrates/tutorials/osips_native/$NAME
TUTDIR=/usr/share/cgrates/tutorials/osips/$NAME
SCRIPTNAME=$TUTDIR/etc/init.d/$NAME
TMP_DIR=/tmp/cgr_osipsnative/$NAME
CFGFILE=$TUTDIR/etc/$NAME/opensips.cfg

View File

@@ -23,7 +23,11 @@ udp_workers=4
auto_aliases=no
listen=udp:enp0s8:5060
listen=udp:enp0s3:5060
listen=udp:127.0.0.1:5080
listen=udp:127.0.0.1:5060
listen=udp:enp0s3:5080
####### Modules Section ########

View File

@@ -378,6 +378,7 @@ func (sS *SessionS) forceSTerminate(s *Session, extraDebit time.Duration, lastUs
}
cgrEv := utils.CGREvent{
Tenant: s.Tenant,
ID: utils.GenUUID(),
Event: s.EventStart.AsMapInterface(),
}
// post the CDRs
@@ -385,8 +386,8 @@ func (sS *SessionS) forceSTerminate(s *Session, extraDebit time.Duration, lastUs
if cgrEvs, err := s.asCGREvents(); err != nil {
utils.Logger.Warning(
fmt.Sprintf(
"<%s> could not post CDR for event %s, err: %s",
utils.SessionS, utils.ToJSON(cgrEv), err.Error()))
"<%s> failed convering session: %s in CGREvents with err: %s",
utils.SessionS, utils.ToJSON(s), err.Error()))
} else {
var reply string
for _, cgrEv := range cgrEvs {