From 1ade35d0d0f76b057a311fb7c458047366f3e443 Mon Sep 17 00:00:00 2001 From: DanB Date: Fri, 10 Apr 2020 11:55:38 +0200 Subject: [PATCH] [Docs] Removing old indexing and some obsolete documentation --- docs/administration.rst | 9 ++++---- docs/advanced.rst | 9 ++------ docs/agents.rst | 2 +- docs/configuration.rst | 5 ++-- docs/freeswitch.rst | 51 +++++++---------------------------------- docs/miscellaneous.rst | 4 ++-- docs/tutorials.rst | 4 ++-- 7 files changed, 21 insertions(+), 63 deletions(-) diff --git a/docs/administration.rst b/docs/administration.rst index 8e07efb81..a239ce486 100644 --- a/docs/administration.rst +++ b/docs/administration.rst @@ -1,11 +1,10 @@ -5. Administration -================= +Administration +============== The general steps to get CGRateS operational are: #. Create CSV files containing the initial data for CGRateS. #. Load the data in the databases using the Loader application. -#. Start a Rater. -#. Start the SessionManager talking to your VoIP Switch or directly make API calls to the Rater. -#. Make API calls to the Rater or just let the SessionManager do the work. +#. Start the engine with the required components (depending on your setup). +#. Make API calls to the component you are interested or send events from your environment towards the :ref:`SessionS` via the :ref:`Agents`. diff --git a/docs/advanced.rst b/docs/advanced.rst index 519c419a4..f196de45d 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -1,15 +1,10 @@ -6. Advanced Topics -================== +Advanced Topics +=============== .. toctree:: :maxdepth: 2 apicalls - cdrserver - cdrclient - cdrexporter - cdrstats - derived_charging ratinglogic diff --git a/docs/agents.rst b/docs/agents.rst index 05f44f48b..e474abebb 100644 --- a/docs/agents.rst +++ b/docs/agents.rst @@ -1,4 +1,4 @@ - +.. _Agents: Agents ====== diff --git a/docs/configuration.rst b/docs/configuration.rst index 8852e350d..42992b555 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -1,8 +1,7 @@ .. _configuration: -************* Configuration -************* +============= Has a *JSON* format with commented lines starting with *//*. @@ -19,7 +18,7 @@ The configuration can be loaded at start and reloaded at run time using APIs des .. hint:: You can reload from remote HTTP server as well. -Below is the default configuration file which comes hardcoded into :ref:cgr-engine: +Below is the default configuration file which comes hardcoded into :ref:`cgr-engine`: .. literalinclude:: ../data/conf/cgrates/cgrates.json :language: javascript diff --git a/docs/freeswitch.rst b/docs/freeswitch.rst index 59d610265..8c025b274 100644 --- a/docs/freeswitch.rst +++ b/docs/freeswitch.rst @@ -1,5 +1,9 @@ -8.1. FreeSWITCH integration -================================ +.. _FreeSWITCH: http://www.freeswitch.org + + +FreeSWITCH integration +====================== + Being the original platform supported by CGRateS, FreeSWITCH_ has the advantage of support for complete set of CGRateS features. When used as Telecom Switch it fully supports all rating modes: **prepaid**/**postpaid**/**pseudoprepaid**/**rated**. A typical use case would be like the one in the diagram below: @@ -8,8 +12,8 @@ A typical use case would be like the one in the diagram below: The process of rating is decoupled into two different components: -8.1.1. SessionManager ---------------------- +SessionManager +-------------- **TODO** - update and add CDRs and CDRc. @@ -49,43 +53,4 @@ The process of rating is decoupled into two different components: - *hupall MANAGER_REQUEST cgr_reqtype postpaid* -8.1.2. Mediator ---------------- - -**TODO** - remove this section. Mediator functionality is handled by CDRs and CDRc. - - -Attaches costs to FreeSWITCH_ native written .csv files. Since writing channel variables during hangup is asynchronous and can be missed by the CDR recorder mechanism of FreeSWITCH_, we decided to keep this as separate process after the call is completed and do not write the costs via channel variables. - - -8.1.2.1. Modes of operation -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Mediator process for FreeSWITCH works in two different modes: - -- Costs from LogDB (activated by setting -1 as *subject_idx* in the *cgrates.cfg*: - - Queries LogDB for a previous saved price by SessionManager. - - This behavior is typical for prepaid/postpaid calls which were previously processed by SessionManager and important in the sense that we write in CDRs exactly what was billed real-time from user's account. -- Costs queried from Rater: - - This mode is specific for multiple process mediation and does not necessary reflect the price which was deducted from the user's account during real-time rating. - - Another application for this mode is pseudoprepaid when there is no SessionManager monitoring and charging calls in real-time (debit done directly from CDRs). - - This mode is triggered from configuration file by setting proper indexes (or leave them defaults if cgrates rating template is using whitin FreeSWITCH_ cdr_csv configuration file. - -A typical usage into our implementations is a combination between the two modes of operation (by setting at a minimum -1 as subject_idx to run from LogDB and succesive mediation processes with different indexes). - - -8.1.2.2. Implementation logic -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- The Mediator process is configured and started in the *cgrates.cfg* file and is alive as long as the *cgr-engine* application is on. -- To avoid concurrency issues, the Mediator does not process active maintained CDR csv files by FreeSWITCH_ but picks them up as soon as FreeSWITCH_ has done with them by rotating. The information about rotation comes in real-time on the Linux OS through the use of inotify. -- Based on configured indexes in the configuration file, the Mediator will start multiple processes for the same CDR. -- For each mediation process configured the Mediator will apped the original CDR with costs calculated. In case of errors of some kind, the value *-1* will be prepended. -- When mediation is completed on a file, the file will be moved to configured *cdr_out_dir* path. - - - - -.. _FreeSWITCH: http://www.freeswitch.org - diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index edc035252..4c895ae16 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -1,5 +1,5 @@ -8. Miscellaneous -================ +Miscellaneous +============= .. toctree:: :maxdepth: 2 diff --git a/docs/tutorials.rst b/docs/tutorials.rst index 101f27147..19417bd43 100644 --- a/docs/tutorials.rst +++ b/docs/tutorials.rst @@ -1,5 +1,5 @@ -7. Tutorials -============ +Tutorials +========= .. toctree:: :maxdepth: 2