mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Kamailio tutorial doc files
This commit is contained in:
18
docs/tut_kamailio.rst
Normal file
18
docs/tut_kamailio.rst
Normal file
@@ -0,0 +1,18 @@
|
||||
Kamailio_ Integration Tutorials
|
||||
===============================
|
||||
|
||||
In these tutorials we exemplify few cases of integration between Kamailio_ and CGRateS_. We start with common steps, installation and postinstall processes then we dive into particular configurations, depending on the case we run.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
tut_kamailio_installs
|
||||
tut_cgrates_installs
|
||||
tut_jitsi_installs
|
||||
tut_kamailio_evapi
|
||||
tut_cgrates_usage
|
||||
|
||||
.. _Kamailio: http://www.kamailio.org/
|
||||
.. _CGRateS: http://www.cgrates.org/
|
||||
|
||||
59
docs/tut_kamailio_evapi.rst
Normal file
59
docs/tut_kamailio_evapi.rst
Normal file
@@ -0,0 +1,59 @@
|
||||
Kamailio_ interaction via *evapi* module
|
||||
=========================================
|
||||
|
||||
Scenario
|
||||
--------
|
||||
|
||||
- Kamailio default configuration modified for **CGRateS** interaction. For script maintainability and simplicity we have separated CGRateS specific routes in *kamailio-cgrates.cfg* file which is included in main *kamailio.cfg* via include directive.
|
||||
|
||||
- Considering the following users (with configs hardcoded in the *kamailio.cfg* configuration script and loaded in htable): 1001-prepaid, 1002-postpaid, 1003-pseudoprepaid, 1004-rated, 1005-rated, 1006-prepaid, 1007-prepaid.
|
||||
|
||||
- **CGRateS** with following components:
|
||||
|
||||
- CGR-SM started as translator between Kamailio_ and CGR-Rater for both authorization events as well as accounting ones.
|
||||
- CGR-CDRS component processing raw CDRs from CGR-SM component and storing them inside CGR StorDB.
|
||||
- CGR-CDRE exporting rated CDRs from CGR StorDB (export path: */tmp*).
|
||||
- CGR-History component keeping the archive of the rates modifications (path browsable with git client at */tmp/cgr_history*).
|
||||
|
||||
|
||||
Starting Kamailio_ with custom configuration
|
||||
----------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
/usr/share/cgrates/tutorials/kamevapi/kamailio/etc/init.d/kamailio start
|
||||
|
||||
To verify that Kamailio_ is running we run the console command:
|
||||
|
||||
::
|
||||
|
||||
kamctl moni
|
||||
|
||||
|
||||
Starting **CGRateS** with custom configuration
|
||||
----------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/init.d/cgrates start
|
||||
|
||||
Make sure that cgrates is running
|
||||
|
||||
::
|
||||
|
||||
cgr-console status
|
||||
|
||||
|
||||
CDR processing
|
||||
--------------
|
||||
|
||||
At the end of each call Kamailio_ will generate an CDR event via *evapi* and this will be directed towards the port configured inside *cgrates.json*. This event will reach inside **CGRateS** through the *SM* component (close to real-time). Once in-there it will be instantly rated and be ready for export.
|
||||
|
||||
|
||||
**CGRateS** Usage
|
||||
-----------------
|
||||
|
||||
Since it is common to most of the tutorials, the example for **CGRateS** usage is provided in a separate page `here <http://cgrates.readthedocs.org/en/latest/tut_cgrates_usage.html>`_
|
||||
|
||||
|
||||
.. _Kamailio: http://www.kamailio.org/
|
||||
20
docs/tut_kamailio_installs.rst
Normal file
20
docs/tut_kamailio_installs.rst
Normal file
@@ -0,0 +1,20 @@
|
||||
Software installation
|
||||
=====================
|
||||
|
||||
As operating system we have choosen Debian Wheezy, since all the software components we use provide packaging for it.
|
||||
|
||||
Kamailio_
|
||||
---------
|
||||
|
||||
We got Kamailio_ installed via following commands:
|
||||
::
|
||||
|
||||
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfb40d3e6508ea4c8
|
||||
cd /etc/apt/sources.list.d/
|
||||
wget http://apt.itsyscom.com/conf/kamailio.apt.list .
|
||||
apt-get update
|
||||
apt-get install kamailio kamailio-extra-modules kamailio-json-modules
|
||||
|
||||
Once installed we proceed with loading the configuration out of specific tutorial cases bellow.
|
||||
|
||||
.. _Kamailio: http://www.kamailio.org/
|
||||
Reference in New Issue
Block a user