Asterisk chan_mobile fail

I’ve been struggling with setting up chan_mobile on my Asterisk system.  For those fortunate enough to actually get it working, chan_mobile provides an interface for Asterisk to treat a mobile phone like a PSTN or VoIP trunk–when someone calls your mobile phone it can ring your desk phone or softphone, or you can use your normal handset to make an outgoing call on your mobile.  It works by making the Asterisk system look like a Bluetooth headset or handsfree to the phone.  You can even connect Bluetooth headsets to Asterisk using chan_mobile and have them appear like an extension in your dialplan (although that capability doesn’t seem to be covered very much).

I figured this would be an ideal way to make use of an old Nokia 6230 with a broken speaker.  Somewhat foolishly, on the assumption that it would Just Work (and that all the troubles experienced by others would not beset me) I went and bought a two-pack of prepaid mobile SIM cards and went through the adventure of activating them.  One of these SIMs I threw into the 6230, the other I kept on hand for after I got everything working.  The plan, you see, was to be able to take advantage of free calls between the two accounts by taking one of the phones with me when travelling and leaving the other strapped to Asterisk at home.

I think it’s probably fair to say that I’ve had more success with it than a lot of other folk have.  The process of configuring Asterisk to use the Bluetooth dongle is quite straightforward, and it’s even quite easy to configure the chan_mobile driver to have calls enter your Asterisk system in a routable way.  When I dialled the “tethered” mobile from another phone, I was rewarded with the ringing of my desk phone–and at this point, I think I gave myself the kiss-of-death.  “Wow, that was easy,” I thought…

When I picked up the desk phone, I was rewarded with silence.  Not just the silence of the phone not ringing any more, but also the silence of no audio being passed either way over the call path.  Nothing put the pure, desolate sound of FAIL.

Things actually went downhill from there, believe it or not.  I have tried a total of four different Bluetooth dongles, with results ranging from the aforementioned signalling-but-no-audio to why-the-@#%$-won’t-this-thing-pair.  The three different phones I’ve tried elicited a similar spectrum of results.  “Make sure your dongle has a Cambridge Silicon radio, they definitely work” say the forum experts…  Sorry guys, one of the biggest failures I had–failure of Asterisk to pick up the call–was on the last dongle I tried and, yes, it was a CSR.  I’ve even had two different versions of the bluez stack and (I think) two different asterisk-addons versions.

The one thing that I’ve distilled from all the experiences I read through is that there is a ridiculously high level of sensitivity to particular phone and dongle features.  For example, great success has been reported with the Nokia 6230i.  I figured that I was lucky and that a 6230 would be close enough…  Doesn’t look like it.  There is one model of D-Link Bluetooth device–no longer in production, by the way–generally reported to give the most success.  Tweaking the device class reported by the bluez stack in the Linux host is said to give success too, but led to me being unable to get a connection to Asterisk.  Unfortunately, I have neither the time nor the patience to spend too much time trying to go through the motions of getting it working.  I tell you, if it really is that difficult to get two Bluetooth devices to talk to each other it’s no wonder that the majority of folks still use wired headsets!

Luckily all this little experiment has cost me so far is time.  The two-pack of SIM cards cost me the grand total of $2, and they had enough start-up credit on them to allow me to receive calls without a top-up.  The handsets are from that ever-growing pile of GSM hardware that just about every modern household is accumulating now (well, at least the ones that house a gadget-freak who can’t even bear to part with a broken one).  The kernel version I’m running on the system could be an issue, since I get ugly error messages from the btusb module when I take a call, so a kernel update might help.  After that though it’s likely to cost real money–buying a new/different Bluetooth dongle, for example.

If anyone out there has suggestions on something else to try, I’m listening (reading? watching?).  I don’t mean to complain, after all I am one that usually subscribes to the “it’s Open Source, it’s the hard work and dedication of others, you got it for nothing, you’ve got no right to complain” philosophy.  It is really frustrating to come away from a couple of days’ effort with nothing to show for it, though.

3 thoughts on “Asterisk chan_mobile fail

  1. After having to fight against impedance matching, rx and tx gain, caller id methods, voltage thresholds… and after switching to chan_mobile+gsm, I have no doubts when saying chan_mobile “Just works”.

    I’m using an old Nokia 6021 and it just works, both with my 2.1 Macbook’s bluetooth adapter and some cheap USB bluetooth adapter I had (0a12:0001 “Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)”), the last one being used in my Asterisk server. The only problem is that arround once a week the phone loses it’s audio link and the connection needs to be reseted. Bluetooth adapter and phone model seems to be still very critical. There are some compatibility lists around. Good luck!

    Like

    1. Thanks for the report! Glad to hear chan_mobile is working for someone. I guess I was unlucky with handset(s) and dongles I tried. Perhaps I’ll try again one day!

      Like

  2. Hi – not exactly an answer to your questions – just relating my experience. I’ve been using now for few years a Cambridge Silicon Radio dongle with a Nokia 5000 mobile. I’ve also tried it with success with a newer Nokia 2730 Classic. I first used it with Asterisk 1.6.x series, now it is working with Asterisk 1.8.x series. I found it a bit fiddly in the beginning – but nothing like as much trouble you seem to have had – thankfully.

    One issue that I have is that the bluetooth connection reliably disconnects at the end of the call. I’ve stumbled over an Asterisk bug – which after few years of patches and investigation was eventually closed with (roughly) the conclusion: “This behaviour is typical of certain Nokia phones and there is nothing chan_mobile can do about it”. So I just set it to attempt reconnects every 10 seconds in chan_mobile.conf and hope nobody will call within 10 seconds of ending the last call.

    I normally use it to leave my mobile at home when I go abroad – and use another mobile with a local sim form the country I am in. Then I get Asterisk from home to patch calls incoming on my landline and mobile through to my foreign mobile number where I am. It works out cheaper that way. Kind of a DIY roaming.

    Good luck with your endevour.

    P.S. – At the moment I’m working to get gnokii working with my phone over usb – so that I can have my SMS forwarded over email to me when I’m abroad. chan_mobile SMS only works with a restricted number of phones – mainly Symbian S60 devices from what I gather.

    Like

Leave a reply to Ivan Stepaniuk Cancel reply