Asterisk Installation

Ben Langfeld edited this page Apr 11, 2012 · 20 revisions

DEPRECATION NOTICE: This is old documentation relevant to Adhearsion 1.x and will soon be removed. See the main documentation for up-to-date info.


Asterisk can be installed in several ways, depending on your needs:

There are further installation tips available from the Asterisk Wiki on this page.

##Install Adhearsion## See our Getting-Started page for information on installing Adhearsion.

##Configuring for Adhearsion##

After you have installed Adhearsion you now need to wire the two together.

####AGI - extensions.conf####

The configuration file, extensions.conf, is located in /etc/asterisk and is used to create the internal dialplan for Asterisk. There are many approaches and philosophies regarding how you can use the internal Asterisk dialplan. The approach of Adhearsion is to separate the voice switching domain from the application logic domain, therefore minimizing the amount of dialplan logic written within Asterisk while maximizing control within Adhearsion. In general the extensions.conf dialplan is handling inbound calls in Asterisk, or calls that have been placed and then handed over to the dialplan as if they were inbound calls.

Therefore the perfect Asterisk dialplan would be to simply make an AGI call to Adhearsion, which would look like this:

exten => _.,1,AGI(agi://adhearsion_host)
exten => _.,n,Hangup

The anatomy of the above dialplan code can be broken down as follows:


This context is where a call is sent within the dialplan by Asterisk when it comes in over a channel or via an internal dial.

exten =>
exten =>

As shown above, the 'exten' label is simply a keyword that defines an extension in the Asterisk dialplan.


Here, the '_.' is used to pattern match what is being dialed, may be alphanumeric, and determines when a particular application is invoked. In this particular case, we are stating that this should apply to all extensions in the context.


As shown above, this represents the priority of the dialplan actions. Think of this as the order in which the operations will be called.


Finally, this represents the application being invoked at that step of the dialplan.

####AMI - manager.conf####

Please refer to this page.

##TrixBox Installation Instructions##

For a step-by-step tutorial, see the Adhearsion & Trixbox CE Screencast

Here are the steps to call Adhearsion in the PBXConfig of trixbox:

  1. Create a custom destination named 'adhearsion'

     Custom Destination: custom-adhearsion,999,1
     Description: Adhearsion
     Notes: Transfer calls to ruby adhearsion
  2. Open /etc/asterisk/extension_custom.conf and create the following context:

     exten => 999,1,NoOp( Call sent to adhearsion )
     exten => 999,n,AGI(agi://localhost)
     exten => 999,n,Hangup
     exten => h,1,Hangup
  3. Create an Inbound Route to the custom application 'adhearsion'

  4. Create a context in dialplan.rb of Adhearsion to accept calls from the custom-adhearsion context (note that - has to be replaced by _ in the name of contexts)

     custom_adhearsion {'

Internally for testing purposes, you can create a Misc Application / feature code 999 to call the custom application 'adhearsion' instead of always testing using inbound route.

Source: Swapan Blog

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.