Asterisk PBX on Debian Stable Part 1

What this guide is:

This is basically a step by step reference of an Asterisk PBX quick start setup for anybody who wants to try it out, or if you are going to work for a company which sets up Asterisk PBX telephone systems.

What this guide isn’t:

This is by no means a complete guide, although it is an ongoing reference which I will add to it as I see fit.

Asterisk Docs and Info:

Asterisk is a hugely versatile and complete Open Source telephony system which already has its own documentation, man pages (man asterisk), support forums and wiki.

Debian:

This guide supposes that you have Debian Stable (Currently Lenny) installed, either as your main OS or as a server on the network.

Install and test Asterisk: (Do all the following as root, not with sudo)

apt-get install asterisk asterisk-dev asterisk-dbg asterisk-h323 asterisk-mp3 libasterisk-agi-perl asterisk-doc

We use Perl scripts for automated dialers and other advanced options, so I have added the Perl modules, that’s up to you. You may also like to do an “apt-cache search asterisk” if you need any language-specific files. As I am in Spain, I also add “asterisk-prompt-es”.

Test Asterisk (still as root)

asterisk -vvvvc

As I already have Asterisk installed, it automatically loads at boot, so the message I get is that it is already running:

ricpru:~# asterisk –vvvvc
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use ‘asterisk -r’ to connect.

So I do as it says:

ricpru:~# asterisk -r
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 – 2008 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
==============================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
==============================================
Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on ricpru (pid = 1844)

And I am left with the Asterisk prompt:

ricpru*CLI>

Asterisk is installed and working!

So now what?

First you need to get used to the config files. Then you need to select a phone. Asterisk works with Softphones , Analogue phones, IP phones, Mobile phones, Fax machines, basically anything that can be connected to a network or has an IP address and can make a call or send data.

Where are the config files?

ls /etc/asterisk

Yup, they all end in .conf and there are loads of them! Don’t panic! We are only going to start with a IAX/SIP Software Phone, which is the most basic to configure.

adsi.conf cdr_odbc.conf  features.conf  logger.conf  phone.conf  skinny.conf adtranvofr.conf  cdr_pgsql.conf   festival.conf  manager.conf  privacy.conf  sla.conf agents.conf         cdr_tds.conf  followme.conf  manager.d  queues.conf  smdi.conf alarmreceiver.conf  codecs.conf  func_odbc.conf  meetme.conf  res_odbc.conf  telcordia-1.adsi alsa.conf           dnsmgr.conf  gtalk.conf  mgcp.conf  res_pgsql.conf   udptl.conf amd.conf  dundi.conf   h323.conf  misdn.conf  res_snmp.conf  users.conf asterisk.adsi enum.conf  http.conf       modules.conf  rpt.conf  voicemail.conf asterisk.conf  esel.conf  iax.conf musiconhold.conf  rtp.conf  vpb.conf cdr.conf  extconfig.conf   iaxprov.conf  muted.conf  say.conf  watchdog.conf cdr_custom.conf  extensions.ael   indications.conf  osp.conf  sip.conf  zapata.conf cdr_manager.conf  extensions.conf  jabber.conf  oss.conf        sip_notify.conf

Software SIP/IAX phones:

Skype, Ekiga, etc etc….. there are loads, Google them and choose what you want. Personally I prefer VoixPhone. It’s easy to install and has a lot of features including IAX and SIP, but it’s all a matter of personal choice. The reason I want a phone with IAX is that we also use those configs for Hard Phones such as the Thomson ST2030 IP phone.

Download VoixPhone from HERE, Unpack it, Chmod -x it, and ./ Install it.

*HINT* I installed VoixPhone to /usr/local/bin as opposed to /usr/local which is the default and created a launcher called voix. This way I can launch the VoixPhone executable as voix from the command line.

Create an empty launcher file:

vim /usr/local/bin/voix

Insert this text:

# cat >/usr/local/bin/voix <<EOF
#!/bin/sh
/usr/local/bin/voixphone/VoixPhone
EOF

Then make it executable:

chmod 755 /usr/local/bin/voix

*64bit Hint* VoixPhone is a 32bit app. If you are running a 64bit system, install the ia32 libs:

apt-get install ia32-libs ia32-libs-gtk

Part 2 – Configuring Asterisk and your new VoixPhone:

PART 2 Coming soon………………………

In the meantime, have a read of this PDF Handbook and My Asterisk Bible 🙂

Advertisements

4 thoughts on “Asterisk PBX on Debian Stable Part 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s