You are visiting:Home arrow Articles for Geeks arrow Asterisk arrow HOWTO build and configure chan_mobile on Trixbox Tuesday, 09 March 2010
Google
Support Geek-Pages.com in making a small donation:
Main Menu
Home
Articles for Geeks
FAQs for Non-Geeks
Links
Kevan's Blog
Contact Us
Search
Login Form





Lost Password?
No account yet? Register
Submit article to:
HOWTO build and configure chan_mobile on Trixbox PDF Print E-mail
Written by Kevan   
Installing and configuring chan_mobile allows bluetooth mobile/cellphones and headsets to work as trunks and extensions on your Trixbox.

This howto contains my work and the work of others from the Trixbox forums.  

Here are the steps for installing chan_mobile with Trixbox 2.3 Beta:
1. Let’s add a few components:

[trixbox1.local ~]# yum -y install bluez-utils bluez-libs bluez-libs-devel bluez-hcidump automake autoconf subversion gcc gcc-c++

2. Using the Package manager install the ncurses libraries, while you are at it you should also
install WebMin:

3. Type the following commands:

[trixbox1.local ~]# cd /usr/src
[trixbox1.local ~]# wget http://downloads.digium.com/pub/asterisk/old-releases/asterisk-1.4.13.tar.gz
[trixbox1.local ~]# tar xvfz asterisk-1.4.13.tar.gz
[trixbox1.local ~]# cd asterisk-1.4.13
[trixbox1.local ~]# ./configure
[trixbox1.local ~]# make

4. Type the following commands:

[trixbox1.local ~]# svn co http://svn.digium.com/svn/asterisk-addons/trunk asterisk-addons-trunk
[trixbox1.local ~]# cd asterisk-addons-trunk
[trixbox1.local ~]# svn update -r 421
[trixbox1.local ~]# cat chan_mobile.c | sed -e 's/ast_debug(1,/ast_log(LOG_DEBUG,/' | sed -e 's/, config_flags);/);/' > chan_mobile_1.4.c
[trixbox1.local ~]# mv chan_mobile_1.4.c chan_mobile.c
[trixbox1.local ~]# ./configure --with-asterisk=/usr/src/asterisk-1.4.13
[trixbox1.local ~]# make clean
[trixbox1.local ~]# make menuselect

Press 1, Select chan_mobile (deselect other stuff) and then Type “x” to exit the menu

NOTE: I just left the default selections... and hit an "x" without deselecting items...

[trixbox1.local ~]# make
[trixbox1.local ~]# make install
[trixbox1.local ~]# cp /usr/src/asterisk-addons-trunk/chan_mobile.so /usr/lib/asterisk/modules
5. Load chan_mobile.so
(asterisk -r (and then...) module load chan_mobile.so)
6. cp /usr/src/asterisk-addons-trunk/configs/mobile.conf.sample /etc/asterisk/mobile.conf
7. nano /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;
}

8. /etc/init.d/bluetooth restart

You'll probably be told that your system couldn't stop bluetooth (because it wasn't running) and
then it'll restart.