Asterisk - the open source soft PBX (PPC)
THIS ARTICLE IS STILL UNDER CONSTRUCTION
Contents
Abstract
The idea for this concept came from a bluetooth cordless cellphone extender that I saw at someone's house like this one: Bluetooth to Cordless Phone . Sometime later, I read that Asterisk has a module called chan_mobile which lets you use a cellphone as if it was a trunk over a SIP phone. So if you had a service such as Vonage and an ATA that you could "open" you could get started. Well that was enough to get me started, so I implemented this solution first on an Ubuntu box. I'm still working on getting it fully implemented on a PPC linkstation. Bluetooth audio has been the sticking point, but I'm confident that kernel 2.6.29+ will be the answer.
What this would do is allow you to use a Linkstation running Asterisk to turn a cellphone into a trunk for 1 or more SIP Phones or ATAs. Asterisk is pretty powerful and would allow you to integrate POTS/PSTN lines (with a FXO/FXS adapter like the SPA3102), a VOIP service (such as Vonage), and now a Cell Phone too!
Prerequisites
This article assumes that you have installed FreeLink on PPC Box that has been U-booted. You also will need to upgrade to a 2.6.28+ Kernel, (the bluetooth SCO audio driver doesn't seem to work right otherwise.
In order to implement this on a ARM or MIPSel box you would need to cross compile asterisk, as it will not natively compile on either of those two architectures.
What you'll need
-
: A FreeLinked PowerPC Linkstation like a LS1, HG, or Kurobox
- It needs to have the U-boot bootloader to load a 2.6.28+ Kernel with modules
-
: One or more Unlocked Analog telephony adapters or IP Phones. Such as the Linksys PAP2
-
: A Bluetooth USB Dongle, preferably one with a Cambridge Silicon Radio Chipset (it works better with chan_mobile) The Dlink DBT-120 is mentioned most often
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 apt-get install adduser apt-get install libasound2 apt-get install libc-client2007b apt-get install libc6 apt-get install libcap2 apt-get install libcurl3 apt-get install libgcc1 apt-get install libgsm1 apt-get install libncurses5 apt-get install libnewt0.52 apt-get install libogg0 apt-get install libpopt0 apt-get install libpri1.0 apt-get install libradiusclient-ng2 apt-get install libsnmp15 apt-get install libspeex1 apt-get install libspeexdsp1 apt-get install libsqlite0 apt-get install libssl0.9.8 apt-get install libstdc++6 apt-get install libtonezone1 apt-get install libunwind7 apt-get install libvorbis0a apt-get install libvorbisenc2 apt-get install libvpb0 apt-get install unixodbc apt-get install zlib1g
Get Asterisk package
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.6.0.6.tar.gz tar xvzf asterisk-1.6.0.6.tar.gz cd asterisk-1.6.0.6
Complete Asterisk Installation
./configure
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 make install make samples make progdocs
Install Asterisk Addons and chan_mobile
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.6.0.tar.gz tar zxvf asterisk-addons-1.6.0.tar.gz cd /usr/src/asterisk/asterisk-addons-1.6.0 ./configure make menuselect
Choose chan_mobile press x to exit
make
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:
Devices: 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.
[my_phone] 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
Configuration Files
To be done
sip.conf
extensions.conf
modules.conf
mobile.conf
References
- Asterisk 1.6.0.6 on Debian 4.0
- Setup Asterisk 1.6 with DAHDI on Debian Etch
- chan_mobile - Voip-info.org
- chan-mobile for Asterisk®
- HOWTO build and configure chan_mobile on Trixbox
![]() |
This article is currently a stub. You can help this Wiki by expanding it . This template will categorize articles that include it into Category:Stubs. |