mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
Merge branch 'master' of https://github.com/cgrates/cgrates
This commit is contained in:
@@ -24,7 +24,7 @@ func init() {
|
||||
c := &CmdGetMaxDuration{
|
||||
name: "maxduration",
|
||||
rpcMethod: "Responder.GetMaxSessionTime",
|
||||
clientArgs: []string{"Direction", "TOR", "Tenant", "Subject", "Account", "Destination", "TimeStart", "TimeEnd", "CallDuration", "FallbackSubject"},
|
||||
clientArgs: []string{"Direction", "Category", "TOR", "Tenant", "Subject", "Account", "Destination", "TimeStart", "TimeEnd", "CallDuration", "FallbackSubject"},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
|
||||
@@ -15,7 +15,7 @@ cd /usr/share/cgrates/storage/mysql && ./setup_cgr_db.sh root CGRateS.org
|
||||
cd /usr/share/cgrates/storage/postgres && ./setup_cgr_db.sh
|
||||
|
||||
#env vars
|
||||
export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
|
||||
export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
|
||||
|
||||
# build and install cgrates
|
||||
/root/cgr/update_external_libs.sh
|
||||
@@ -29,5 +29,5 @@ cd /usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/ && tar xzf freeswitch_
|
||||
|
||||
cd /root/cgr
|
||||
echo "for cgradmin run: cgr-engine -config_dir data/conf/samples/cgradmin"
|
||||
echo 'export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin'>>/root/.zshrc
|
||||
echo 'export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$GOROOT/bin:$GOPATH/bin:$PATH'>>/root/.zshrc
|
||||
zsh
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
ALWAYS,*any,*any,*any,*any,00:00:00
|
||||
ASAP,*any,*any,*any,*any,*asap
|
||||
PEAK,*any,*any,*any,1;2;3;4;5,08:00:00
|
||||
OFFPEAK_MORNING,*any,*any,*any,1,00:00:00
|
||||
OFFPEAK_MORNING,*any,*any,*any,1;2;3;4;5,00:00:00
|
||||
OFFPEAK_EVENING,*any,*any,*any,1;2;3;4;5,19:00:00
|
||||
OFFPEAK_WEEKEND,*any,*any,*any,6;7,00:00:00
|
||||
|
||||
|
@@ -324,6 +324,10 @@ func (b *Balance) DebitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
ts.createIncrementsSlice()
|
||||
}
|
||||
//log.Printf("TS: %+v", ts)
|
||||
if ts.RateInterval == nil {
|
||||
Logger.Err(fmt.Sprintf("Nil RateInterval ERROR on TS: %+v, CC: %+v, from CD: %+v", ts, cc, cd))
|
||||
continue
|
||||
}
|
||||
maxCost, strategy := ts.RateInterval.GetMaxCost()
|
||||
for incIndex, inc := range ts.Increments {
|
||||
// debit minutes and money
|
||||
@@ -420,10 +424,10 @@ func (b *Balance) DebitMoney(cd *CallDescriptor, ub *Account, count bool, dryRun
|
||||
ts.createIncrementsSlice()
|
||||
}
|
||||
//log.Printf("TS: %+v", ts)
|
||||
/*if ts.RateInterval == nil {
|
||||
if ts.RateInterval == nil {
|
||||
Logger.Err(fmt.Sprintf("Nil RateInterval ERROR on TS: %+v, CC: %+v, from CD: %+v", ts, cc, cd))
|
||||
continue
|
||||
}*/
|
||||
}
|
||||
maxCost, strategy := ts.RateInterval.GetMaxCost()
|
||||
//log.Printf("Timing: %+v", ts.RateInterval.Timing)
|
||||
//log.Printf("Rate: %+v", ts.RateInterval.Rating)
|
||||
|
||||
Reference in New Issue
Block a user