Tuesday, February 02, 2010

HOWTO : Yet Another Elastix Without Tears

This dirty guide is for making the Elastix box just work and it is for you to understand how Elastix or IP PBX works. All the dial rules setting are applied to Hong Kong only. Advanced application or configuration of Elastix is not included. If you want to learn more, you can refer to Elastix Without Tears.

(1) Personal Computer (Mini-ITX)
- Intel ATOM D510 CPU on Intel desktop board D510MO
- 1 X 320GB Hard drive (or smaller)
- 2 X 2GB DDR2 800 RAM (total 4GB) (normally lesser RAM is okay)
- 1 X Gigabit NIC

(2) Additional Hardware
X100P - FXO card without echo cancellation (Cheap but works great for SOHO or home)
Linksys SPA941 IP Phone or Linksys SPA942 IP Phone (Optional)

*If you do not use telephone landline as dial in and out, the X100P is optional.

Elastix 1.6-12 (Asterisk distribution based on CentOS 5.3 Final)
Ekiga 3.2.6 (Ubuntu 9.10 or Windows) (Softphone)

Installation of Hardware
X100P may not be recognized by Elastix due to IRQ problem on some motherboard which includes D510MO. We can overcome this problem with a very crazy step, that is, plug the X100P to the PCI slot of the motherboard with the power cable already plugged in. Use this step when necessary.

The FXO port at the X100P is connected to PSTN (analog telephone line to wall socket). The Bypass port is for connecting to the telephone set.

Installation of Elastix 1.6-12
Install the Elastix is just following the steps on screen. Make sure you write down the root password that you type in during the installation. Login the box and you will prompt the IP address, e.g.

After the installation, you can access the web page of Elastix by entering the IP address ( to the browser. The username is "admin" while the password is "palosanto". You can change the admin password later. For username and password of other components or modules, please refer to "Elastix Without Tear".

Configuration of Elastix
Log in to the web page of Elastix. Make sure the X100P card is recognized by checking the "Hardware Detection" tab at "System" tab. If everything working fine, you will see the following inside a green coloured box :

Span #1: WCFXO/0 "Wildcard X100P Board 1" (MASTER)
1 FXO In Use

Otherwise, if you see a red coloured box, you should shutdown the box and re-insert the X100P when the power cable is plugged in. If you see "1 FXO not in use" and the colour is pink, the telephone line is not plugged into the FXO port of X100P.

Step 1 : ZAP Trunk setting
Now, go to "PBX" tab. Select "Trunks" on your left hand side. You will see "Trunk ZAP/g0" on the right hand side. Click it. At the "Outbound Caller ID" fill in your home or office landline telephone number in the following format :

"Home" <23456789>

The "Dial Rules" will be "XX."

Click "Submit Changes" button and click the pink coloured bar on the top that written "Apply Configuration Changes Here" to confirm your changes. Make sure you do this step after making any changes or add any item in the Elastix box.

Step 2 : Extensions setting
Go to the "Extensions" on your left hand side. Create "Generic SIP Device". "Extensions" to be "1001". The "Display Name" is "Samiux" and the "SIP Alias" is "samiux". "secret" is "1001" or any number. "nat" is "yes".

At the "Voicemail & Directory", enabled the "Status". "Voicemail Password" is "1001". Enter your email address. Select yes on "Email Attachment", "Play CID" and "Play Envelope". Then click "Submit".

Click "Edit Follow Me Settings" on the top. "Follow-Me List:" is set to "1001". The "Destination if no answer" is set to "Voicemail: <1001> Samiux (unavail)".

Step 3 : Ring Groups setting
Go to the "Ring Groups" on your left hand side. Create a ring group "600" and give it a name to be "General". "Ring Time (max 60 sec)" fill in "60". "Extension List" is "1001". Make sure the "Ring Strategy" is "ringall". The "Destination if no answer" is set to "Voicemail: <1001> Samiux (unavail)".

Step 4 : Inbound Routes setting
Go to the "Inbound Routes" on your left hand side. Create an empty "Incoming Route". Select "Ring Groups: General <600>" at "Set Destination".

Step 5 : Outbound Routes setting
Go to the "Outbound Routes" on your left hand side. Select "0 9_outside" on your right hand side.

At the "Dial Patterns", type "9|XX." and "Trunk Sequence" should select "ZAP/g0". Then click "Submit Changes".

How it works
When someone dail to your landline 23456789, your softphone and analog phone will ring. If you do not answer after 60 seconds, the Elastx will go to Samiux's voicemail box. Make sure your softphone is running. Otherwise, the call will be diverted to the voicemail at once.

If you want to dial out via the landline to "29876543", you just key in "929876543". "9" is to get the outside tone.

If you use Ekiga (softphone) to dail to "Samiux" no matter you are in Hong Kong or other countries as well as in the same network of the Elastix, just install Ekiga and dail "sip:1001@real_ip or" or "sip:samiux@real_ip or". Make sure you are online. For example, "sip:1001@samiux.com" or "sip:samiux@samiux.com".

Router & firewall configuration
If your Elastix box is behind a router or firewall, you should do port forwarding and open the essential ports.

Port forwarding : 5060
Ports may use : 5004, 7070, 16382, 1720, 3478-9, 10000-20000

Last word
You may need to buy a DID for your Elastix box. DID is a local telephone number which can dial via internet. You can buy one in Hong kong at Hong Kong broadband 2b. It has 2 outgoing channels. Your friends in overseas can dial your DID from softphone and your softphone or IP Phone will ring.

The setting of DID should refer to Elastix Without Tears as this part does not included in this HOWTO.


How to set up video support in Elastix

Elastix Wiki

ENUM registeration

Elastix Without Tears





That's all! See you.