dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
15
tbrummell2
join:2002-02-09
Ottawa, ON

tbrummell2 to toro

Member

to toro

Re: Does an app like this exists ?

said by toro:

I was wondering if anyone has seen a smartphone app that can answer an incoming call coming through the GSM network and forward it to another number using VoIP.
Basically a bridge between a softphone and the actual "hard" phone built into the smartphone.

I can do that with my phone, bluetooth & Asterisk server, obviously the cell has to be in proximity to the server for this to work.

toro
join:2006-01-27
Scarborough, ON

toro

Member

said by tbrummell2:

I can do that with my phone, bluetooth & Asterisk server, obviously the cell has to be in proximity to the server for this to work.

That was one of the directions I tried, and I made some progress with it, but I couldn't get any audio to work. My understanding is that some USB BT devices work while others don't. The ones I tried with (two so far) are probably from the list that don't work
Which USB adapter did you use ?
tbrummell2
join:2002-02-09
Ottawa, ON

tbrummell2

Member

I have it working on 2 Asterisk systems. One is an HP 6930P laptop with the built in Bluetooth chip, and the other is a HP notebook with Linksys USB 1.1 dongle (the old black and purple ones with the stick up in the air antenna's).

toro
join:2006-01-27
Scarborough, ON

toro

Member

I was digging through the junk in my basement yesterday and found two old BT USB adapters (the first two I ever got). They are both noname and I think they support only Bluetooth 1.1 but both of them work way better than the newer adapters I tested.
Now I ran into a different issue. Only every second call gets answered by my asterisk. This is very consistent and it happens with both adapters and two different cell phones. I am thinking I am not doing some proper initialization or cleanup. My inbound extension is really very simple, like this:
[cellinbound]
 
exten => s,1,NoOp(${CALLERID(num)})
exten => s,n,Wait(1)
exten => s,n,Answer
exten => s,n,Dial(${TRUNKOUT}/416NNNNNNN)
exten => s,n,Hangup
 

nunya
LXI 483
MVM
join:2000-12-23
O Fallon, MO

nunya to tbrummell2

MVM

to tbrummell2
I've been trying for years to get BT working with asterisk. What method did you use to get this working?

toro
join:2006-01-27
Scarborough, ON

toro

Member

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 :)
toro

toro

Member

An update to this, maybe it will help others. After playing for a while with the bluetooth channel with not so great results in either quality or reliability, I stumbled upon this: »code.google.com/p/asteri ··· -dongle/
It's an Asterisk channel that works with Huawei 3G USB data sticks. Apparently these have pretty much all the features of a phone except for keyboard, display, mic/speaker. I grabbed a USB dongle for $15 on craigslist, put my SIM card in, compiled and installed the channel and was up and running in less than 30 min. The quality is great, it supports both voice and SMS and costs a fraction compared to a GSM to SIP gateway.
Just one note, it didn't work for me under asterisk 11.x, so I used the newest version in the 1.8 branch.
SCADAGeo
Premium Member
join:2012-11-08
N California

SCADAGeo

Premium Member

I found my old bluetooth dongle a week ago. Thanks for the update.