mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
AsteriskARI tutorial files
This commit is contained in:
18
docs/tut_asterisk.rst
Normal file
18
docs/tut_asterisk.rst
Normal file
@@ -0,0 +1,18 @@
|
||||
Asterisk_ Integration Tutorials
|
||||
===============================
|
||||
|
||||
In these tutorials we exemplify few cases of integration between Asterisk_ 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_asterisk_installs
|
||||
tut_cgrates_installs
|
||||
tut_jitsi_installs
|
||||
tut_asterisk_ari
|
||||
tut_cgrates_usage
|
||||
|
||||
.. _Asterisk: http://www.asterisk.org/
|
||||
.. _CGRateS: http://www.cgrates.org/
|
||||
|
||||
59
docs/tut_asterisk_ari.rst
Normal file
59
docs/tut_asterisk_ari.rst
Normal file
@@ -0,0 +1,59 @@
|
||||
Asterisk_ interaction via *ARI*
|
||||
===========================================
|
||||
|
||||
Scenario
|
||||
--------
|
||||
|
||||
- Asterisk out of *basic-pbx* configuration samples.
|
||||
|
||||
- Considering the following users: 1001-prepaid, 1002-postpaid, 1003-pseudoprepaid, 1004-rated, 1007-rated.
|
||||
|
||||
- **CGRateS** with following components:
|
||||
|
||||
- CGR-SM started as translator between Asterisk_ and **CGR-RALs** for both authorization events (prepaid/pseudoprepaid) as well as postpaid 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 Asterisk_ with custom configuration
|
||||
----------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
asterisk -r -s /tmp/cgr_asterisk_ari/asterisk/run/asterisk.ctl
|
||||
|
||||
To verify that Asterisk_ is running we run the console command:
|
||||
|
||||
::
|
||||
|
||||
ari show status
|
||||
|
||||
|
||||
Starting **CGRateS** with custom configuration
|
||||
----------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
/usr/share/cgrates/tutorials/asterisk_ari/cgrates/etc/init.d/cgrates start
|
||||
|
||||
Make sure that cgrates is running
|
||||
|
||||
::
|
||||
|
||||
cgr-console status
|
||||
|
||||
|
||||
CDR processing
|
||||
--------------
|
||||
|
||||
At the end of each call Asterisk_ will generate an CDR event and due to automatic handler registration built in **CGRateS-SM** component, 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>`_
|
||||
|
||||
|
||||
.. _Asterisk: http://www.asterisk.org/
|
||||
23
docs/tut_asterisk_installs.rst
Normal file
23
docs/tut_asterisk_installs.rst
Normal file
@@ -0,0 +1,23 @@
|
||||
Software installation
|
||||
=====================
|
||||
|
||||
As operating system we have choosen Debian stable.
|
||||
|
||||
Asterisk_
|
||||
---------
|
||||
|
||||
We got Asterisk14_ installed via following commands:
|
||||
::
|
||||
|
||||
apt-get install autoconf build-essential openssl libssl-dev libsrtp-dev libxml2-dev libncurses5-dev uuid-dev sqlite3 libsqlite3-dev pkg-config libjansson-dev
|
||||
cd /tmp/
|
||||
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz
|
||||
tar xzvf asterisk-14-current.tar.gz
|
||||
cd asterisk-14.0.2/
|
||||
./configure --with-pjproject-bundled
|
||||
make
|
||||
make install
|
||||
|
||||
Once installed we proceed with loading the configuration out of specific tutorial cases bellow.
|
||||
|
||||
.. _Asterisk14: http://www.asterisk.org/
|
||||
@@ -23,8 +23,3 @@ We got FreeSWITCH_ installed via following commands:
|
||||
Once installed we proceed with loading the configuration out of specific tutorial cases bellow.
|
||||
|
||||
.. _FreeSWITCH: http://www.freeswitch.org/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user