Monday, October 01, 2007

Cell/Mobile Phones on Asterisk with Chan_Mobile

chan_mobile is an Asterisk Channel Driver to allow Bluetooth Cell/Mobile Phones to be used as FXO devices, and Headsets as FXS devices.

chan_mobile deals with both bluetooth adapters and bluetooth devices. This means you need to tell chan_mobile about the bluetooth adapters installed in your server as well as the devices (phones / headsets) you wish to use.
chan_mobile currently only allows one device (phone or headset) to be connected to an adapter at a time. This means you need one adapter for each device you wish to use simultaneously. Much effort has gone into trying to make multiple devices per adapter work, but in short it doesnt.
Periodically chan_mobile looks at each configured adapter, and if it is not in use (i.e. no device connected) will initiate a search for devices configured to use this adapater that may be in range. If it finds one it will connect the device and it will be available for Asterisk to use. When the device goes out of range, chan_mobile will disconnect the device and the adapter will become available for other devices.

This driver supports multiple Bluetooth Adapters allwoing multiple phonesand headsets to be connected.
Once the phone or headset comes in range Asterisk automatically connects to each configured mobile phone / headset.
Following are some of the features;
CLI command to discover bluetooth devices.
Inbound calls on the mobile network to the mobile phones are handled by Asterisk, just like inbound calls on a Zap channel.
CLI passed through on inbound calls.
Dial outbound on a mobile phone using Dial(Mobile/device/nnnnnnn) in the dialplan.
Dial a headset using Dial(Mobile/device) in the dialplan.
Application MobileStatus can be used in the dialplan to see if a mobile phone / headset is connected.
Supports devicestate for dialplan hinting.
Supports Inbound and Outbound SMS.
According to a post on the asterisk list,
In order to use chan_mobile, you must have a working bluetooth subsystem on your Asterisk box.This means one or more working bluetooth adapters, and the BlueZ packages.
Any bluetooth adapter supported by the Linux kernel will do, including usb bluetooth dongles.
The BlueZ package you need is bluez-utils. If you are using a GUI then you might want to install bluez-pin also. You also need libbluetooth, and libbluetooth-dev if you are compiling Asterisk from source.
You need to get bluetooth working with your phone before attempting to use chan_mobile. This means 'pairing' your phone or headset with your Asterisk box. I dont describe how to do this here as the process differs from distro to distro. You only need to pair once per adapter. See www.bluez.org for details about setting up Bluetooth under Linux.

Above information was gathered from Asterisk SVN site. Configuring, using and debugging information will be published in an upcoming post.

0 comments:

Blog Widget by LinkWithin