said by nunya:I've been trying for years to get BT working with asterisk. What method did you use to get this working?
I used information mixed from different places, I didn't put together a tutorial yet. However, here are the basics:
- I am using CentOS (that's my favorite Linux flavor for servers)
- you need to install the bluez, bluez-libs, dbus, python, dbus-python, usbutils, pygobject2 and possibly some of the -devel packages associated with these packages (I didn't keep track of everything I installed)
- once you have all the packages installed, start the dbus and bluetooth services in this order (if you are using CentOS, the init scrips are already set properly for this)
- then I used the info from this article (under Bluetooth Pairing) to scan for devices and do the pairing: »
wiki.stocksy.co.uk/wiki/ ··· CentOS_6(depending on the python version, if you get some errors when running the python script, you need to modify it a little bit, basically remove the brackets for some function calls - let me know, I can send you the modified script)
- once the pairing is done, the Asterisk box needs to be set as "trusted" in your phone's BT settings
- then you need to set the chan_mobile.conf file in asterisk. Here's a basic sample:
;
; chan_mobile.conf
;
[general]
interval=30 ; Number of seconds between trying to connect to devices.
[adapter]
id=blue
address=22:22:22:22:22:22 ; this is the MAC address for the bluetooth adapter (hci0 reported by "hcitool dev")
[cellphone]
address=00:11:22:33:44:55 ; this is the MAC address for the phone adapter (as reported by "hcitool scan")
port=4 ; the rfcomm port number (from mobile search)
context=cellinbound ; dialplan context for incoming calls
adapter=blue ; adapter to use
group=1 ; this phone is in channel group 1
sms=yes ; support SMS ? (this didn't work for any of my phones)
- then in your extensions.conf you need to have a context where your chan-mobile calls will land. Mine is very simple, like this:
[cellinbound]
exten => s,1,NoOp(${CALLERID(num)})
exten => s,n,Wait(1)
exten => s,n,Answer
exten => s,n,Dial(${TRUNKLOCAL}/4165551234)
Let me know how it goes, I can try to help while the info is still fresh in my brain :)