Tuesday 29 November 2011

Configuring Engin business accounts using Elastix

Having found configuring an Elastix PBX with an Engin business account time consuming due to a lack of clear documentation, we thought others might find it useful.  The settings applied here would also be relevant to other Asterisk based PBX such as FreePBX or Trixbox.

To focus on the Engin configuration, we have to outline some pre-requisites here. We have assumed:
  • you are familiar with SSH and connecting to the Elastix server command line (again appropriately secured)
  • you have Elastix installed and can login to the administration.
  • you have configured at least one extension and applied appropriate security considerations (there is plenty of resources online

Let's begin by setting up a SIP Trunk with the following settings: Outbound CID: Anonymous CID Options: Allow any CID Trunk Name: our-trunk-name Peer Details: username=<primary_trunk_number> type=peer host=trunk.engin.com.au fromdomain=trunk.engin.com.au secret=<account_password> insecure=invite,port dtmfmode=rfc2833 canreinvite=no allow=ulaw&alaw User Context: <primary_trunk_number>
User Details: context=from-pstn fromdomain=trunk.engin.com.au host=trunk.engin.com.au secret=<account_password> username=<primary_trunk_number> Register String: <primary_trunk_number>:<account_password>@trunk.engin.com.au


Once you have the trunk configured and you have applied your new settings, you need to confirm the connection has been established. You can test this with the asterisk command line 'sip show registry'. This can be tested by executing the command from the 'Asterisk CLI' available from the Elastix web interface via the 'PBX > Tools' menu.

Having successfully connected the trunk, we now have to test incoming calls which requires the configuration of an incoming route.

Engin provide the DID number in the 'To:' header of the SIP communication which requires a configuration change to extract the DID and pass it to the inbound route.

Add the following to the bottom of /etc/asterisk/extensions_custom.conf [from-pstn-custom] exten => s,1,NoOp(${SIP_HEADER(To)}) exten => s,n,Set(DID=${SIP_HEADER(To)}) exten => s,n,Set(DID=${CUT(DID,:,2)}) exten => s,n,Set(DID=${CUT(DID,@,1)}) exten => s,n,Goto(from-pstn,${DID},1)
With the code in place, you should be able to configure a series of inbound routes to process the phone numbers attached to your account and terminate them at the queues, extensions or IVR that you desire.

There is certainly more you can do with outbound routes, custom contexts and other tools within Elastix but we won't cover them here as there are already considerable resources to assist with those. At least you should have a working Engin configuration at this point to base the rest of your configuration on.


3 comments:

  1. Hi
    my is is Moz
    thanks for the helpful information
    I am new to Elastix
    I agree with you about the fragmented information.

    ReplyDelete
  2. Could you tell me if this information is still current for engin as of now i.e. for august 2012? or has some of the information changed

    ReplyDelete
  3. Hi Matt,

    After the whole day fighting against the Elastix, you saved me. It´s working perfectly and you provide me a solution that support people from Engine couldn´t.

    Thanks so much!

    ReplyDelete