From 216ae2b76785df390aa8919b40d84f903f18c791 Mon Sep 17 00:00:00 2001 From: DanB Date: Tue, 18 Feb 2014 09:27:28 +0100 Subject: [PATCH 1/2] Fixup install documentation to reflect new repo path --- data/scripts/optimize_proc.sh | 7 +++++++ docs/installation.rst | 4 ++-- docs/tut_freeswitch_installs.rst | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 data/scripts/optimize_proc.sh diff --git a/data/scripts/optimize_proc.sh b/data/scripts/optimize_proc.sh new file mode 100644 index 000000000..571a79e03 --- /dev/null +++ b/data/scripts/optimize_proc.sh @@ -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 + diff --git a/docs/installation.rst b/docs/installation.rst index 76f9bfa94..c3f8fdaef 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -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 diff --git a/docs/tut_freeswitch_installs.rst b/docs/tut_freeswitch_installs.rst index a3f98facf..472b65dfb 100644 --- a/docs/tut_freeswitch_installs.rst +++ b/docs/tut_freeswitch_installs.rst @@ -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 From c52b161b731d6f76a4832bb4cf331b6b37fee735 Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Tue, 18 Feb 2014 15:37:03 +0200 Subject: [PATCH 2/2] allow seetting rate subject and expiration with AddBalance api --- apier/apier.go | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/apier/apier.go b/apier/apier.go index 9d73c2c28..34725c3a6 100644 --- a/apier/apier.go +++ b/apier/apier.go @@ -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, }, }, }) @@ -530,8 +531,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),