Posts Tagged elastix

Elastix and Kamailio Part 2 – Integrating

This article moves on from Part 1. I have updated the kamailio installation file so you will need to download this and run through Part 1 again. Make sure it all installs correctly.

The first step is to go into the /etc/kamailio.cfg file. In this file is the configuration for kamailio. When calls are between Kamailio extensions the call stays within Kamailio. If the call is to the PSTN then Kamailio sends it to asterisk. In the kamailio.cfg file we need to set a couple of parameters for your system. I have been building my test machine on the IP address 192.168.1.150. You will find 2 places where I have set this IP in the kamailio.cfg. Change these entries to the IP address of your machine using nano.

 

nano /etc/kamailio.cfg

Then restart Kamailio

service kamailio restart

Make sure kamailio is running

service kamailio status

The next step you need to do is go into freePBX. Under http://yourelastixip/admin is the freePBX interface. Go into module admin and you will find a new module called Kamailio integration. The Kamailio integration basically allows you to register handsets to Kamailio on port 5060. It also sends all external calls through asterisk when you make PSTN calls or voicemail calls. Once you have activated it go into the extensions tab in freePBX.

When adding a Kamailio extension you need to add a custom extension. If you add a SIP extension under freePBX this will simply be an asterisk extension. First add your extension number and display name. The last field required is the Kamailio password. You can scroll down and you will find an extra section called Kamailio services. Make sure it is enabled for the extension and you put in a password, click submit in the freePBX interface and reload freePBX.

Read the rest of this entry »

,

No Comments

Elastix and Kamailio Part 1 – Installing

WARNING: DO NOT INSTALL THIS ON A PRODUCTION MACHINE! Some of you may want be wanting to increase the capacity of your Elastix machine. Asterisk generally has issues when you start to put a lot of SIP peers on it. One of the best ways to get around this is to install a proper SIP server and join it with asterisk. This allows you to register all your SIP handsets to the SIP server and make calls through to your asterisk machine.

The Kamailio module for Elastix allows you to easily integrate Elastix with a enterprise SIP server. All SIP handsets register to Kamailio. All internal SIP calls stay within Kamailio however if a call is external then Kamailio will push the call out to asterisk to deal with it.

To install the Kamalio module you first need to create the directory for it to go in. It installs itself from the directory /var/kamailio

mkdir /var/kamailio

Now change to the directory

cd /var/kamailio

Download the kamailio integration file from the MBIT website

wget http://www.mbit.com.au/kamailio-v2.tgz

Untar the file into the directory

tar zxvf kamailio-integration.tgz

In the directory now will be a heap of files you want to execute the script that installs all the modules for you. To run the script execute install_kamailio.sh

./install_kamailio.sh

Soon as it is installed we will move to the next part for configuring Kamailio. The installation can take a while so please be patient. The installation can only be used with Elastix 2.0.

No Comments

Elastix 2.0 has been released!

It has been over two years since we released Elastix 1.0. Almost from that same moment we began to plan and develop what would become Elastix 2.0. It was a long period of hard work, but the new distro is finally ready to see the light. Thanks to the whole community for the incredible support. Special thanks go to the beta testers mailing list, whose members tested the product for several months before its release.

No Comments

Installing FreePBXv3 in Elastix-2.0 RC3

Yes it’s surprisingly easy, and yes you too can have it today!

This is still very much a work-in-progress, as we’re merging two unfinished products and I’ve not had enough of a chance to test it thoroughly either so I’m hoping for some response from the community on this one. I think this is quite possibly the first time that FreePBXv3 has been tied into a major distro, and I reckon it’d be cool to see Elastix-2.0 support FreePBXv3 officially.

I have however tested Ext’s registering happily, calling each other, so I know that FreePBXv3 is tied in correctly.

Anyway, I’ve tar’d up a slightly older version of FreePBXv3, as they’re undergoing some design changes right at the moment which mean that the current version doesn’t install. So, we’ll be using this.

Total installation should only take about 5 minutes, so this How-To will be nice and short!

So what you’re going to do is start by installing the latest Elastix-2.0 RC3. In my case I used i386.

Once it’s installed, ssh into the server and run:

cd /var/www/html
wget http://c2s.co.nz/dumpfiles/freepbxv3.tar.bz2
tar xvjf freepbxv3.tar.bz2
cd freepbxv3
sh preinstall.sh

It’s 8.5MB, and this is the snapshot of FreePBXv3 that we’re going to be using.

I’ve already modified the preinstall.sh so it uses the user “asterisk” instead of “nobody”, keeping in line with how Elastix does things.

You’re going to then run the following commands to upgrade PHP:

yum install yum-priorities
cd /etc/yum.repos.d/
wget http://dev.centos.org/centos/5/CentOS-Testing.repo
yum --enablerepo=c5-testing install php
/etc/init.d/httpd restart

We need PHP-5.2 because of one of the FreePBX dependencies (Kohana) and Elastix only comes with PHP-5.1

Read the rest of this entry »

,

No Comments

Elastix in the Enterprise

Many Elastix installed out there will be using Elastix in a large enterprise organisation. Elastix can be a great solution for a large corporate however underneith asterisk can struggle when many extensions are loading it down. As soon as you have more than 200-300 extensions asterisk can struggle on many boxes to keep up with all the registration requests coming in. Asterisk does a fantastic job of being a great PBX however when scaling to large enterprise you need a more robust SIP Server. This is where Kamailio steps in. Kamailio is a large scale SIP server that can handle thousands of SIP extensions on one box. The problem is you need a good PBX gateway for it to connect everything together.

For this I wanted to be able to have Kamailio as my SIP server but have asterisk provide all the features it has such as voicemail. For this a FreePBX module was created that brings together Kamailio and asterisk. How it works is everything registers to Kamailio. All internal calls stay within Kamailio and if any calls created are not internal then it sends it to asterisk to manipulate. All the extensions are created in FreePBX which is handy because this means you dont have to keep a record of the extension in asterisk and Kamailio.

This allows you to take your Elastix machine from handling around 200 extensions to up around 1000 with no sweat.

No Comments

Installing ADA (Asterisk Desktop Assistant) on Elastix

Formerly SnapANumber, ADA is now offered by Digium. However, the first thing that you’ll notice is that it was written for their Asterisk Business Edition.

That’s great if you have ABE, but not so good if you’re one of the millions of installs out there that uses vanilla Asterisk.

This guide presumes you already have ADA downloaded and installed. If not, you can get the latest (At the time of writing) version 1.1 from here:

http://dl1.digium.com/ADA1.1/ADAInstall.exe

Now you’re going to ignore any instructions you’re previously read, and we’ll start from scratch. Don’t worry, you’ll be up and running in a matter of moments!

Once ADA is downloaded, installed and running, you should be greeted with a login window.

What you now need is the “manager” user to be setup.

The “manager” user is different from your regular extension, in that it allows you to control the actions of Asterisk. With this in mind, you need to be careful when setting up an Ext, not to have a weak password, and make sure you use the permit / deny lines, even for remote extensions. You can get a password generated for you here: http://www.thebitmill.com/tools/password.html

From the shell, we’re going to edit /etc/asterisk/manager_custom.conf like this:

nano -w /etc/asterisk/manager_custom.conf

You’re now going to create a new entry with the following details, in my case I’m Ext 199:

[199]
secret=mkHHa031kHMsGRu
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

Now you need to create a manager user for every Ext that will be using ADA. This is because ADA uses the username part as the Ext for it to ring to connect the call to.

Without it, it would be the same as you dialing the number, and the system just sitting there, holding it.

Ctrl + X to quit nano, and you can safely get your ADA desktop client to login with the username: Ext@asteriskIP

In my case it would be something like: 199@192.168.0.250

Use the password you specified above in the manager user, and not your regular SIP Secret.

If you find you’re unable to connect, confirm that you’ve got the right password, and adjust the “permit=” line as applicable. I would highly recommend leaving it in there and just adjusting it for your IP range. Same goes for external or remote clients, make sure that you have their IP Address.

Now that you’ve done that, you need to hook ADA into your dial-plan.

Again, the standard documentation is no good here, so, we’re going to edit another file:

nano -w /etc/asterisk/extensions_custom.conf

At the top of this file (Well under the first tow lines of comments) we’re going to add in the following:

[ada]
include => from-internal

Then hit Ctrl + X and follow the prompts to save and quit.

Again the standard documentation is no good for us there, as the “ADA” context is actually “ada” in lower case, and we’ll use the “from-internal” instead of “default”.

Now you need to refresh the dial-plan (Just this once) so run this:

asterisk -rx 'dialplan reload'

You’re now all good to go! On your ADA desktop client, you can create a test call! It’s easiest to test to another Ext in my opinion, so enter in the Ext # of another extension on the system and hit “enter”.

What should happen:

Your phone will ring immediately

You pick it up and will hear ringing, the destination phone should now also be ringing

Easy!

If this has helped you in any way, please leave a comment and say Hi.

Cheers

Chill.

, , , , ,

No Comments

Using the Patton SN4554 for ISDN with Elastix

For any business migrating to SIP, the Patton SN4554 is a brilliant way to bring two ISDN lines (4-channels) in to their new PBX system, especially considering you don’t have to break open your PBX Server to install a PCI card.

This basic How-To shows you how to set it up to work with your Elastix system:

First off, you’ll want the following config which is a bit of a mash-up from some other documentation on making it work with an Aastra 800 (Include the header):

#----------------------------------------------------------------#
#                                                                #
# Template for SN4554/2BIS/UI to use with Elastix                #
# Use with firmware R5.1 or higher                               #
#                                                                #
# This template uses dhcp to retrieve an IP address. Comments in #
# the file indicate what to change (Start with '#')              #
#                                                                #
# See the SmartWare Software Configuration guide for command     #
# details (http://www.patton.com/manuals/SCG-r52.pdf)            #
# Modified by Josiah Spackman                                    #
# http://chillingsilence.wordpress.com                           #
#----------------------------------------------------------------#

cli version 3.20
webserver port 80 language en

system

  ic voice 0
    low-bitrate-codec g711alaw64k

system
  clock-source 1 bri 0 0
  clock-source 2 bri 0 1

profile ppp default

profile tone-set default

profile voip default
  codec 1 g711alaw64k rx-length 20 tx-length 20
  codec 2 g711ulaw64k rx-length 20 tx-length 20
  fax transmission 1 relay t38-udp

profile pstn default

profile sip default

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface IF_IP_WAN
# replace 'dhcp' with your fix IP if needed, e.g. "ipaddress 172.16.1.20 255.255.0.0"
    ipaddress dhcp
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

context ip router
# uncomment the following line if you need to add routing table entries
  # route 0.0.0.0 0.0.0.0 172.16.1.1

context cs switch
  national-prefix 0
  international-prefix 00

  routing-table called-e164 RT_ISDN_TO_SIP
# 'T' in the following lines specifies "digit collection". The time for collection can be adjusted replacing 'T' wih 'T2' for 2 seconds.
    route T dest-interface IF_SIP

  routing-table calling-e164 RT_SIP_TO_ISDN
    route default dest-service SV_HUNT_PSTN MP_Unknown-Subscriber

# This mapping table sets the ISDN type of number for calls towards ISDN to 'subscriber'
  mapping-table calling-e164 to calling-type-of-number MP_Unknown-Subscriber
    map default to subscriber

  interface isdn IF_ISDN_0
    route call dest-table RT_ISDN_TO_SIP

  interface isdn IF_ISDN_1
    route call dest-table RT_ISDN_TO_SIP

  interface sip IF_SIP
    bind context sip-gateway GW_SIP
    route call dest-table RT_SIP_TO_ISDN
# This is the IP of your Asterisk. Replace with domain name if DNS server is available
    remote 192.168.0.250

  service hunt-group SV_HUNT_PSTN
    drop-cause normal-unspecified
    drop-cause no-circuit-channel-available
    drop-cause network-out-of-order
    drop-cause temporary-failure
    drop-cause switching-equipment-congestion
    drop-cause access-info-discarded
    drop-cause circuit-channel-not-available
    drop-cause resources-unavailable
    route call 1 dest-interface IF_ISDN_0
    route call 2 dest-interface IF_ISDN_1

context cs switch
  no shutdown

# The parameters realm, username and password have to match your Asterisk configuration
authentication-service AUTH_AASTRA800
  realm 1 smartnode-gw
  username patton password 6953789

# The parameters domain, username, identity (=username) below have to match your Aastra800 configuration
location-service LS_AASTRA800
  domain 1 smartnode-gw

  identity-group default

    authentication inbound
      authenticate 1 authentication-service AUTH_AASTRA800 patton 6953789

  identity 6953789

    authentication inbound
      authenticate 1 authentication-service AUTH_AASTRA800 patton 6953789

    registration inbound

context sip-gateway GW_SIP

  interface WAN
    bind interface IF_IP_WAN context router port 5060

context sip-gateway GW_SIP
  bind location-service LS_AASTRA800
  no shutdown

port ethernet 0 0
  medium auto
  encapsulation ip
  bind interface IF_IP_WAN router
  no shutdown

port bri 0 0
  clock auto
  encapsulation q921

  q921
    protocol pp
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_0 switch

port bri 0 0
  no shutdown

port bri 0 1
  clock auto
  encapsulation q921

  q921
    protocol pp
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_1 switch

port bri 0 1
  no shutdown

Copy this all into a notepad window and save it as “SN4554.cfg”

What you’re going to want to modify is the references to “192.168.0.250″ and point it to your Elastix / Asterisk system.

All the ISDN ports are set to “Point-to-Point”. You can adjust the “pp” settings to “pmp” if you require “Point-to-Multipoint”, though to be honest ISDN isn’t my strong point so I’m not entirely sure how relevant that is.

This will leave the WAN port using DHCP, hopefully you’ve got a semi-intelligent DHCP server that will give out the same IP each time.

Open the WebGUI of your SN4554 up, login with the default Username “administrator” and a blank password.

Click on “Import / Export” on the left-hand side, then hit the Import Configuration tab.

Select the file, import it, then reload the device.

Now, in asterisk you want to add a new SIP trunk. Name it “ISDN” and put the following in the SIP PEER Details:

username=patton
type=friend
secret=6953789
qualify=1200
insecure=very
host=192.168.0.141
dtmfmode=RFC2833
disallow=all
context=from-pstn
canreinvite=no
allow=alaw&g729

There’s no register string or USER details, though it may be worth specifying the max channels as “4″.

You’ll need to adjust the “host” setting to the WAN IP Address of your Patton box, as we’re semi-insecure with such a basic password.

You *could* adjust the password and username in the config etc as applicable, but specifying the host should be enough, especially considering (in my instance) the whole system is LAN-accessible only.

When you’re finished, you should be able to login to your Elastix system via SSH and run:

asterisk -rx ’sip show peers’

And see:

ISDN/patton                192.168.0.141        N      5060     OK (19 ms)

If you do, congratulations, you’re ready to go!

Now you just need to setup inbound and outbound routes as applicable.

If this was useful to you, please leave a comment and say hi.

I’d also like to thank Byron from SnapperNet in New Zealand, he’s been such a great help, and also provided me with the initial configuration samples.

This How-To has also been re-posted here: http://chillingsilence.wordpress.com/2010/05/06/using-the-patton-sn4554-for-isdn-with-elastix/

, , ,

No Comments

First Screenshots of Elastix 2.0

Elastix 2.0 Alpha 3 has been released and now you can downloaded it for testing in its’ 32 bits and 64 bits versions. Early next year our first beta version will be released. This new version will have better improvements such as better usability, a new image, software packages updated, and much more. Here we share with you some screen shots of what Elastix 2.0 will be like in the future.

No Comments

Elastix 1.6 ready

Elastix - The reliable PBX appliance software

Elastix - The reliable PBX appliance software

Dear Elastix community,
We are proud to announce the release of Elastix 1.6 stable. It can be downloaded in 32-bit or 64-bit ISOs. This release has several improvements from Elastix 1.5, that would fix bugs from Elastix and CentOS. Here are some of the more important changes:

  • Asterisk updated to 1.4.26.1-4
  • Dahdi updated to 2.2.0.2-6
  • Asterisk now supports Huawei modems as trunks. Thanks to Odicha , creator of chan_sebi
  • Kernel updated to 2.6.18.164.el5, the latest CentOS 5.3 kernel

Read the complete changelog

, ,

No Comments

A Preview of Elastix 2.0

Elastix - The reliable PBX appliance software

Elastix - The reliable PBX appliance software

It has been a while since the release of Elastix 1.0. There have been a lot of ideas since then that were scheduled for the next release. Meanwhile, we released the Call Center and Developer modules as GPL and a lot of other useful add-ons. These releases have brought satisfaction to all of us in Elastix. Our community has grown and our downloads are almost half a million in total.

Finally, the wait for Elastix 2.0 is over, and time for new ideas has come. We have started development of this new version and we will try to include as many ideas and suggestions from the community as possible.

For those of you that just can’t wait, here is a preview of some of the main features that have been scheduled for Elastix 2.0:

  • Asterisk 1.6
  • Elastix Operator Panel release
  • Meeting / Presentation sharing
  • Advanced reports
  • Improvements to the Call Center Module
  • Better integration between all components

Read the rest of this entry »

, , , , , ,

No Comments