Asterisk Installation

Installing

Asterisk may be installed in one of several ways depending on your needs:

We have also made available a screencast on howto install Asterisk available here. There are further installation tips available from the Voip-Info.org Asterisk Wiki available here.

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 to how you may 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 and would look like this:

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

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

[my_context]

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 show 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.

            1
            n

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

              AGI(agi://adhearsion_host)
              Hangup

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

AMI - manager.conf

Please refer to this page.

TrixBox Installation Instructions

Here are the steps I followed in PBXConfig of trixbox to call adhearsion.

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:

[custom-adhearsion]
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 may create a Misc Application / feature code 999 to call the custom application 'adhearsion' instead of always testing using inbound route.

Source: Swapn Blog


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced
- Activity

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

or Sign Up  

Other Features

Add Content