various corrections and additional desc

This commit is contained in:
Radu Ioan Fericean
2012-07-13 14:28:02 +03:00
parent 477803bd33
commit f54d8c029f
4 changed files with 83 additions and 70 deletions

View File

@@ -5,15 +5,17 @@ The general steps to get up and running with CGRateS are:
#. Create CSV files containing the initial data for CGRateS, see :ref:`data-importing`.
#. Load the data in the databases using the loader tool.
#. Start the balancer or rater and connect it to the call switch, see :ref:`running`.
#. Start the balancer or rater and connect it to the call switch, see Running_.
#. Start one ore more raters.
#. Make API calls to the balancer/rater or just let the session manager do the work.
Instalation
-----------
**Using packages**
Using packages
~~~~~~~~~~~~~~
**Using source**
Using source
~~~~~~~~~~~~
After the go environment is installed_ and setup_ just issue the following commands:
::
@@ -32,7 +34,8 @@ Running
There are only three main command to used with CGRateS:
cgr-balancer
The cgr-balancer will open a JSON RPC server and an HTTP server ready for taking external requests. It will also open a rater server on witch the raters will register themselves when they start.
~~~~~~~~~~~~
The cgr-balancer will open a JSON RPC server and an HTTP server ready for taking external requests. It will also open a rater server on witch the raters will register themselves when they start.
::
rif@grace:~$ cgr-balancer --help
@@ -46,7 +49,8 @@ cgr-balancer
cgr-rater
The cgr-rater can be provided with the balancer server address and can be configured to listen to a specific interface and port.
~~~~~~~~~
The cgr-rater can be provided with the balancer server address and can be configured to listen to a specific interface and port.
::
rif@grace:~$ cgr-rater --help
@@ -62,6 +66,7 @@ cgr-rater
-standalone=false: start standalone server (no balancer)
cgr-console
~~~~~~~~~~~
The cgr-console is a command line tool used to access the balancer (or the rater directly) to call all the API methods offered by CGRateS.
::
@@ -77,12 +82,8 @@ cgr-console
-ts="2012-02-09T00:00:00Z": Time start
cgr-loader
The loader is the most configurable tool because it has options for each of the three supported databases (kyoto, redis and mongodb).
Apart from that multi-database options it is quite easy to be used.
The apfile, destfile, tpfile and ubfile parameters are for specifying the input json files.
The storage parameter specifies the database to be used and then the databases access information (host:port or file) has to be provided.
~~~~~~~~~~
:Example: cgr-loader -storage=kyoto -kyotofile=storage.kch -apfile=activationperiods.json -destfile=destinations.json -tpfile=tariffplans.json -ubfile=userbudgets.json
::
rif@grace:~$ cgr-loader --help
@@ -105,32 +106,46 @@ cgr-loader
-timings="Timings.csv": Timings file
-weekdays="WeekDays.csv": Week days file
cgr-sessionmanager
~~~~~~~~~~~~~~~~~~
rif@grace:~$ cgr-balancer --help
Usage of cgr-balancer:
-freeswitchpass="ClueCon": freeswitch address host:port
-freeswitchsrv="localhost:8021": freeswitch address host:port
-httpapiaddr="127.0.0.1:8000": Http API server address (localhost:2002)
-json=false: use JSON for RPC encoding
-jsonrpcaddr="127.0.0.1:2001": Json RPC server address (localhost:2001)
-rateraddr="127.0.0.1:2000": Rater server address (localhost:2000)
::
rif@grace:~$ cgr-sessionmanager --help
Usage of cgr-sessionmanager:
-balancer="127.0.0.1:2000": balancer address host:port
-freeswitchpass="ClueCon": freeswitch address host:port
-freeswitchsrv="localhost:8021": freeswitch address host:port
-json=false: use JSON for RPC encoding
-redisdb=10: redis database number
-redissrv="127.0.0.1:6379": redis address host:port
-standalone=false: run standalone (run as a rater)
rif@grace:~$ cgr-sessionmanager --help
Usage of cgr-sessionmanager:
-balancer="127.0.0.1:2000": balancer address host:port
-freeswitchpass="ClueCon": freeswitch address host:port
-freeswitchsrv="localhost:8021": freeswitch address host:port
-json=false: use JSON for RPC encoding
-redisdb=10: redis database number
-redissrv="127.0.0.1:6379": redis address host:port
-standalone=false: run standalone (run as a rater)
rif@grace:~$ cgr-mediator --help
Usage of cgr-mediator:
-dbname="cgrates": The name of the database to connect to.
-freeswitchcdr="Master.csv": Freeswitch Master CSV CDR file.
-host="localhost": The host to connect to. Values that start with / are for unix domain sockets.
-password="": The user's password.
-port="5432": The port to bind to.
-resultfile="out.csv": Generated file containing CDR and price info.
-user="": The user to sign in as.
cgr-mediator
~~~~~~~~~~~~
::
rif@grace:~$ cgr-mediator --help
Usage of cgr-mediator:
-dbname="cgrates": The name of the database to connect to.
-freeswitchcdr="Master.csv": Freeswitch Master CSV CDR file.
-host="localhost": The host to connect to. Values that start with / are for unix domain sockets.
-password="": The user's password.
-port="5432": The port to bind to.
-resultfile="out.csv": Generated file containing CDR and price info.
-user="": The user to sign in as.
cgr-scheduler
~~~~~~~~~~~~~
::
rif@grace:~$ cgr-balancer --help
Usage of cgr-balancer:
-freeswitchpass="ClueCon": freeswitch address host:port
-freeswitchsrv="localhost:8021": freeswitch address host:port
-httpapiaddr="127.0.0.1:8000": Http API server address (localhost:2002)
-json=false: use JSON for RPC encoding
-jsonrpcaddr="127.0.0.1:2001": Json RPC server address (localhost:2001)
-rateraddr="127.0.0.1:2000": Rater server address (localhost:2000)