Asterisk - the open source soft PBX (PPC)

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 00:00, 2 March 2009 by Ramuk (Talk | contribs) (New page: Under Construction ==Install Asterisk== ===Install various pre-requisite libraries=== apt-get install make apt-get install gcc apt-get install g++ apt-get install libc-dev apt-...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Under Construction

Install Asterisk

Install various pre-requisite libraries

 apt-get install make
 apt-get install gcc
 apt-get install g++
 apt-get install libc-dev
 apt-get install bison
 apt-get install ncurses-dev
 apt-get install libssl-dev
 apt-get install libnewt-dev
 apt-get install zlib1g-dev
 apt-get install initrd-tools
 apt-get install cvs
 apt-get install procps
 apt-get install doxygen

Get Asterisk package

 tar xvzf asterisk-
 cd asterisk-

Complete Asterisk Installation


If you see asterisk symbol in the end, configuration is successful. Else, grep for “no” in config.log and try to install those missing libraries/utilities.

 make install
 make samples 
 make progdocs 

Install Asterisk Addons and chan_mobile

tar zxvf asterisk-addons-1.6.0.tar.gz
 cd /usr/src/asterisk/asterisk-addons-1.6.0
make menuselect 

Choose chan_mobile press x to exit


As root user

make install

Configure chan_mobile

Bluetooth settings and pairing

edit /etc/bluetooth/hcid.conf and replace the contents with:

options {
autoinit yes;
security auto;
pairing multi;
passkey "1234";
}# Default settings for HCI devices
device {
name "Asterisk PBX";
class 0x000100;
iscan enable; pscan enable;
lm accept;
lp rswitch,hold,sniff,park;

Restart bluetooth

/etc/init.d/bluetooth restart

Makre sure bluetooth works and get MAC address for bluetooth adapter

hcitool dev

You should see something like this:

hci0 00:16:38:39:44:88

Copy the hardware address from the output of the following command for the next step. (eg. xx:xx:xx:xx:xx:xx). Now edit /etc/asterisk/mobile.conf

In the first [adapter] stanza where “id=blue” replace the mac address with the one you copied down.

Pair your phone with your "asterisk box"

dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable

Grab your cell phone, turn Bluetooth on and search for devices. You should find your PBX as Asterisk PBX. Pair with a pin of 1234.

Make your phone discoverable via Bluetooth.

Let’s make sure we can see your phone or headset. Use the command:

hcitool scan 

You should see something like this:

hcitool scan
Scanning ...
00:1B:XX:XX:XX:XX Someones iPhone

If you see your phone above all is well and we can now search for your bluetooth devices using the CLI command 'mobile search'. Be patient with this command as it will take 8 - 10 seconds to do the discovery.

First start the asterisk console

asterisk –r

In the console type in the command mobile search

asterisk*CLI> mobile search 

This will return something like the following:

Address Name Usable Type Port
00:1B:XX:XX:XX:XX Someones iPhone Yes Phone 8

This is a list of all bluetooth devices seen and whether or not they are usable with chan_mobile.

a. The Address field contains the 'bd address' of the device. This is like an ethernet mac address.

b. The Name field is whatever is configured into the device as its name.

c. The Usable field tells you whether or not the device supports the Bluetooth Handsfree Profile or Headset profile.

d. The Type field tells you whether the device is usable as a Phone line (FXO) or a headset (FXS).

e. The Port field is the number to put in the configuration file.

Choose which device(s) you want to use and edit /etc/asterisk/mobile.conf

For a phone create a stanza like the one below and paste in the MAC address on the address line and also make sure you use the port that was displayed during the mobile search. The 'id' of the device [bitinbrackets] can be anything you like, just make the unique.

address=xx:xx:xx:xx:xx:xx ; the address of the phone
port=x ; the port number (from mobile search)
context=from-mobile ; dialplan context for incoming calls
adapter=blue ; adapter to use


  1. Asterisk on Debian 4.0
  2. Setup Asterisk 1.6 with DAHDI on Debian Etch
  3. chan_mobile -
  4. chan-mobile for Asterisk®
  5. HOWTO build and configure chan_mobile on Trixbox