From 491641c28eaccb6da02ccdc92a12b76c84a81cb8 Mon Sep 17 00:00:00 2001 From: DanB Date: Sun, 21 Apr 2013 19:05:10 +0200 Subject: [PATCH] Fixup regexp of Rates, allowing decimal connectFee --- cmd/cgr-loader/cgr-loader.go | 2 +- docs/conf.py | 4 ++-- docs/freeswitch.rst | 6 +++++- docs/introduction.rst | 12 ++++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/cmd/cgr-loader/cgr-loader.go b/cmd/cgr-loader/cgr-loader.go index 8cf8f0d14..5d8c09658 100644 --- a/cmd/cgr-loader/cgr-loader.go +++ b/cmd/cgr-loader/cgr-loader.go @@ -76,7 +76,7 @@ func main() { regexp.MustCompile(`(?:\w+\s*,\s*){1}(?:\d+.?\d*){1}$`), "Tag[0-9A-Za-z_],Prefix[0-9]"}, &validator{ratesFn, - regexp.MustCompile(`(?:\w+\s*,\s*){2}(?:\d+.?\d*){4}$`), + regexp.MustCompile(`(?:\w+\s*,\s*){2}(?:\d+.?\d*,?){4}$`), "Tag[0-9A-Za-z_],DestinationsTag[0-9A-Za-z_],ConnectFee[0-9.],Price[0-9.],PricedUnits[0-9.],RateIncrement[0-9.]"}, &validator{timingsFn, regexp.MustCompile(`(?:\w+\s*,\s*){1}(?:\*all\s*,\s*|(?:\d{1,4};?)+\s*,\s*|\s*,\s*){4}(?:\d{2}:\d{2}:\d{2}|\*asap){1}$`), diff --git a/docs/conf.py b/docs/conf.py index d95839c90..95f1e6309 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,8 +40,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'CGRates' -copyright = u'2012, Radu Ioan Fericean' +project = u'CGRateS' +copyright = u'2013, ITsysCOM' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/docs/freeswitch.rst b/docs/freeswitch.rst index 9882fe5c3..1d70576a8 100644 --- a/docs/freeswitch.rst +++ b/docs/freeswitch.rst @@ -21,7 +21,9 @@ The process of rating is decoupled into two different components: - INSUFFICIENT_FUNDS: if MaximSessionTime is 0. - AUTH_OK: Call is authorized to proceed. - Un-Park the call via *uuid_transfer* to original dialed number. The FreeSWITCH_ administrator is expected to make use of *cgr_notify* variable value to either allow the call going further or reject it (eg: towards an IVR or returning authorization fail message to call originator). + - On *CHANNEL_ANSWER* event received: + - Index the call into CGRateS's cache. - Starts debit loop by calling at configured interval *MaxDebit* on the Rater. - If any of the debits fail: - Set *cgr_notify* channel variable to either SYSTEM_ERROR in case of errors or INSUFFICIENT_FUNDS of there would be not enough balance for the next debit to proceed. @@ -32,8 +34,10 @@ The process of rating is decoupled into two different components: - Save call costs into CGRateS LogDB. - In Postpaid mode: + - On *CHANNEL_ANSWER* event received: - - Index the call into CGRateS's cache + - Index the call into CGRateS's cache. + - On *CHANNEL_HANGUP_COMPLETE* event received: - Call *Debit* RPC method on the Rater. - Save call costs into CGRateS LogDB. diff --git a/docs/introduction.rst b/docs/introduction.rst index 660c5e7a0..4ced4046f 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -1,5 +1,6 @@ 1.Introduction ============== + CGRateS is a very fast and easy scalable rating engine targeted especially for ISPs and Telecom Operators. It is written in Go_ and accessible from any language via JSON RPC. The code is well documented (go doc compliant API docs) and heavily tested. @@ -28,21 +29,25 @@ Of course more SessionManagers can serve multiple Telecom Switches and all of th 1.1. CGRateS Features --------------------- + - Reliable and Fast ( very fast ;) ). To get an idea about speed, we have benchmarked 11000+ req/sec on a rather modest machine without requiring special tweaks in the kernel. - Using most modern programming concepts like multiprocessor support, asynchronous code execution within microthreads. - Built-in data caching system per call duration. - In-Memory database with persistence over restarts. - Use of Balancer assures High-Availability of Raters as well as increase of processing performance where that is required. - Use of Linux enterprise ready tools to assure High-Availability of the Balancer where that is required (*Supervise* for Application level availability and *LinuxHA* for Host level availability). + - Modular architecture - Easy to enhance functionality by rewriting custom session managers or mediators. - Flexible API accessible via both Gob (Golang specific, increased performance) or JSON (platform independent, universally accesible). + - Prepaid, Postpaid and Pseudo-Prepaid Controller. - Mutiple Primary Balances per Account (eg: MONETARY, SMS, INTERNET_MINUTES, INTERNET_TRAFFIC). - Multiple Auxiliary Balances per Account (eg: Free Minutes per Destination, Volume Rates, Volume Discounts). - Concurrent sessions per account sharing the same balance with configurable debit interval (starting with 1 second). - Built-in Task-Scheduler supporting both one-time as well as recurrent actions (eg: TOPUP_MINUTES_PER_DESTINATION, DEBIT_MONETARY, RESET_BALANCE). - ActionTriggers ( useful for commercial offerings like receive amounts of monetary units if a specified number of minutes was charged in a month). + - Highly configurable Rating. - Connect Fees. - Priced Units definition. @@ -53,12 +58,15 @@ Of course more SessionManagers can serve multiple Telecom Switches and all of th - Rating subject concatenations for combined records (eg: location based rating for same user). - Recurrent rates definition (per year, month, day, dayOfWeek, time). - Rating Profiles activation times (eg: rates becoming active at specific time in future). + - Multi-Tenant for both Prepaid as well as Rating. + - Flexible Mediator able to run multiple mediation processes on the same CDR. + - Verbose action logging in persistent databases (eg: Postgres) to cope with country specific law requirements. + - Good documentation ( that's me :). + - "Free as in Beer" with commercial support available on-demand. - -