Merge branch 'master' into shared_balances

This commit is contained in:
Radu Ioan Fericean
2014-02-18 15:38:03 +02:00
4 changed files with 28 additions and 22 deletions

View File

@@ -22,6 +22,7 @@ import (
"errors"
"fmt"
"path"
"time"
"github.com/cgrates/cgrates/cache2go"
"github.com/cgrates/cgrates/config"
@@ -81,16 +82,16 @@ func (self *ApierV1) GetUserBalance(attr *AttrGetUserBalance, reply *engine.User
}
type AttrAddBalance struct {
Tenant string
Account string
BalanceId string
Direction string
Value float64
//ExpirationDate time.Time
//RateSubject string
DestinationId string
Weight float64
Overwrite bool // When true it will reset if the balance is already there
Tenant string
Account string
BalanceId string
Direction string
Value float64
ExpirationDate time.Time
RateSubject string
DestinationId string
Weight float64
Overwrite bool // When true it will reset if the balance is already there
}
func (self *ApierV1) AddBalance(attr *AttrAddBalance, reply *string) error {
@@ -122,11 +123,11 @@ func (self *ApierV1) AddBalance(attr *AttrAddBalance, reply *string) error {
BalanceId: attr.BalanceId,
Direction: attr.Direction,
Balance: &engine.Balance{
Value: attr.Value,
//ExpirationDate: attr.ExpirationDate,
//RateSubject: attr.RateSubject,
DestinationId: attr.DestinationId,
Weight: attr.Weight,
Value: attr.Value,
ExpirationDate: attr.ExpirationDate,
RateSubject: attr.RateSubject,
DestinationId: attr.DestinationId,
Weight: attr.Weight,
},
},
})
@@ -536,8 +537,6 @@ func (self *ApierV1) GetCachedItemAge(itemId string, reply *utils.CachedItemAge)
return nil
}
func (self *ApierV1) LoadTariffPlanFromFolder(attrs utils.AttrLoadTpFromFolder, reply *string) error {
loader := engine.NewFileCSVReader(self.RatingDb, self.AccountDb, utils.CSV_SEP,
path.Join(attrs.FolderPath, utils.DESTINATIONS_CSV),

View File

@@ -0,0 +1,7 @@
#! /usr/bin/env sh
for i in /sys/devices/system/cpu/cpu[0-9]
do
echo performance > $i/cpufreq/scaling_governor
done

View File

@@ -16,8 +16,8 @@ On the server you want to install CGRateS, simply execute the following commands
::
cd /etc/apt/sources.list.d/
wget -O - http://apt.itsyscom.com/repos/apt/conf/cgrates.gpg.key|apt-key add -
wget http://apt.itsyscom.com/repos/apt/conf/cgrates.apt.list
wget -O - http://apt.itsyscom.com/conf/cgrates.gpg.key|apt-key add -
wget http://apt.itsyscom.com/conf/cgrates.apt.list
apt-get update
apt-get install cgrates

View File

@@ -35,7 +35,7 @@ We got FreeSWITCH_ installed via following commands:
gpg --keyserver pool.sks-keyservers.net --recv-key D76EDC7725E010CF
gpg -a --export D76EDC7725E010CF | sudo apt-key add -
cd /etc/apt/sources.list.d/
wget http://apt.itsyscom.com/repos/apt/conf/freeswitch.apt.list
wget http://apt.itsyscom.com/conf/freeswitch.apt.list
apt-get update
apt-get install freeswitch-meta-vanilla freeswitch-mod-json-cdr
@@ -52,8 +52,8 @@ To get **CGRateS** installed execute the following commands over ssh console:
::
cd /etc/apt/sources.list.d/
wget -O - http://apt.itsyscom.com/repos/apt/conf/cgrates.gpg.key|apt-key add -
wget http://apt.itsyscom.com/repos/apt/conf/cgrates.apt.list
wget -O - http://apt.itsyscom.com/conf/cgrates.gpg.key|apt-key add -
wget http://apt.itsyscom.com/conf/cgrates.apt.list
apt-get update
apt-get install cgrates