Wednesday, September 28, 2011

Start Asterisk as service

After going through the Asterisk installation steps, we usually want to start it as a service.
Usual steps of Asterisk Installation
./configure   -- check if our system is suitable for Asterisk installation
make menuselect  -- it is an optional step, allowing you to select additional module, eg, mysql_cdr
make – the compilation process
make install – setup the paths, copy files to asterisk directory, etc.
make samples – an optional step to put a set of sample config in your installation (it will over-write existing config)
make progdocs – also an optional step to setup the documentation
At this stage, you should be able to run Asterisk as 'asterisk –cvvvvvv' in foreground.  But it is more desirable to setup a service and it can be achieved easily by:
Setup Asterisk Service
make config
There is a set of platform-specific templates in <asterisk-src-dir>/contrib/init.d, designed to be used for service startup script.  The 'make config' will base on one of these templates to create the Asterisk startup script in /etc/init.d.  To verify the result:
#chkconfig –list asterisk
#asterisk        0:off   1:off   2:on    3:on    4:on    5:on    6:off
Then, you can start asterisk by 'service asterisk start'.

Monday, September 26, 2011

Group Pickup in Elastix

The following steps apply to Elastix 2.0.0-36 on CentOS 5.5.
1.    edit /etc/asterisk/features_featuremap_custom.conf by adding "pickupexten = *8"
2.    restart Elastix by 'amportal restart'
3.    in PBX > Extensions > field 'callgroup', assign each extension to a call group (each extension can belong to only one group;  group range is 0-63)
4.    in PBX > Extensions > field 'pickupgroup', specify the call groups an extension is authorized to pick-up (you can enter a range and/or discrete group number, e.g., 1-3,5,9,etc)
5.    when you want to pick up a ringing call, off hook and then *8.
6.    however, if there is more than one ringing call, it is up to Asterisk to deliver which one to you.
You can verify the pickup key in asterisk as below.
*CLI> features show
Builtin Feature           Default Current
---------------           ------- -------
Pickup                    *8      *8

Wednesday, September 14, 2011

IP PBX vs Legacy PBX

A customer asked for the differences between IP PBX and legacy PBX.
IP PBX is usually a powerful linux/unix server with an Asterisk-based PBX software.  Examples are Elastix and Trixbox.  A PRI T1/E1 or FXO card is required to connect the telco side.
Vendors such as Digium, Snom and Grandstream also manufacture all-in-one appliances that simplifies the installation and configuration. 
Features and flexibility
Being a software, IP PBX  is more feature-rich and customizable than a traditional PBX.   For instance, we can customize IVR, call queues, ring groups, followme, voice recording and many other features in the IP PBX.
The IP PBX also provides a web-based utility for IT staff to conveniently perform daily tasks.  
Transmit audio over internet to save money
Voice is transmitted over a packet network (Internet, LAN) rather than phone lines.  Though it sounds trivial, it has important implications:  it can help to save money. 
The main office can communicate with remote branch offices over internet and enjoy free calling among the extensions.  No IDD charge is incurred. 
Note that we need to use IP phones with IP PBX.   These phones are connected to your company LAN, rather than telephone lines.  There are many brands of IP phones and they are inter-changeable.  There is basically no vendor lock-in.
The IP nature also enables remote extensions whereas we can have extensions outside office, such as home, trip or even our mobiles* as long as internet access is available.  It is an extra convenience that legacy PBX cannot offer. 
*a sip client app is required
Voice quality
You will find voice quality the same.   The company LAN is a 10/100M ethernet, which is a pretty sufficient bandwidth for voip conversation.  A typical two-way call merely consumes around 150kbps.
Nevertheless, IT administrator should pay more attention to conditions that could saturate the LAN, e.g packets sent from infected PC or lengthy download/upload.
Separating voice and data into two subnets is suggested.
Ongoing support
In the long run, customer will see savings in maintenance costs as the IP PBX configuration is self-serviced. 
When your business grow, you need to add more extensions.   It can be accomplished easily in IP PBX without adding ports as legacy PBX requires.  You will find IP PBX more scalable.
Buying considerations : Replacement or parallel run
Customer is generally more interested in IP PBX when starting a new office or the legacy PBX is almost fully depreciated.  Some customers also chooses to install the IP PBX in front of the legacy PBX such that they can start using the new features while keeping the old investment.  In this scenario, the IP PBX has a 2-port T1 card, one port connecting to telco and the other connecting to the legacy PBX via a cross cable.

Saturday, September 03, 2011

How to read mbox file in Thunderbird

In linux/unix based email systems, we usually archive mails in mbox format.  Although it is a common format, our Microsoft email clients such as Outlook just does not read mbox straightforwardly.
Now, we can use Thunderbird to recover emails out of the archives easily. The below steps apply to version 6.0.1.
1.    Download Thunderbird from
2.    After installation, we have to setup an email account.  This is just like how we configure an account in Outlook.
3.    Next, we need to find out the folder location in Thunderbird.
Edit>Folder Properties
4.    Close Thunderbird and place our mbox archive in the folder.
5.    Restart Thunderbird and you should see the contents.