chan_mobile now working on trixbox 2.4 - Use your cell phone as a trunk!
Happy holidays everybody. I was playing around with chan_mobile from the Asterisk 1.6 branch. Thanks to a few forum posters it was easy to get working with Asterisk 1.4. The documentation on this forum is incomplete though. I figured out a few things like why the pass codes aren't accepted during paring and I rolled everything into an RPM for easy installation.
Have fun.
http://www.trixbox.org/wiki/chan-mobile
BTW - Bluetooth support is provided by the Bluez libraries - hardware support information is here:
http://www.bluez.org/hardware.html
Let's not make this a support issue for Andrew.
Also nerdvittles.com has a lot of bluetooth information.
Ive just installed 2.4 and am running through the guide
http://www.trixbox.org/wiki/chan-mobile
I'm just before step 11, I type 'mobile search' it says 'All Bluetooth adapters are in use at this time.'
What do I do ?
Ive just installed 2.4 and am running through the guide
http://www.trixbox.org/wiki/chan-mobile
I'm just before step 11, I type 'mobile search' it says 'All Bluetooth adapters are in use at this time.'
What do I do ?
Not sure why I'm having trouble and no one else is, or if this is even related
if I type service bluetooth reload
I get the message Stopping Bluetooth services: [ OK ]
/etc/init.d/bluetooth: line 41: /usr/sbin/passkey-agent: No such file or directory
that line says
/usr/sbin/passkey-agent --default `cat /etc/bluetooth/passkeys/default` &
anyone see a problem ?
I had the same problem as TDF, i.e: /etc/init.d/bluetooth: line 41: /usr/sbin/passkey-agent: No such file or directory
My installation put the "passkey-agent" file in "/sbin" rather than "/usr/sbin" as the Bluetooth startup script requires. I copied "/sbin/passkey-agent" to "/usr/sbin/" then restarted the Bluetooth service and no more error. My phone now pairs with trixbox and everything is *almost* working.
Incoming calls to my mobile go to the desired extension and if I place an outgoing call via the mobile trunk I can see the screen on my phone display the called number. But on either incoming or outgoing calls there is no audio in any direction. Asterisk displays an error of: "hci_scodata_packet: hci0 SCO packet for unknown connection handle 0"
I'm wondering if the installation RPM has put something else besides "passkey-agent" in the wrong place and that is stopping the audio? Any suggestions are much appreciated.
as TDF and wireguy... with passkey-agent and no audio
Calls get routed out the outbound route and mobile trunk, the info gets sent to the cell phone and the cell dials out however no audio is passed to the physical desk phone...
Not sure how to get past this point.... If anyone makes it past these issues let us know! thanks...
- Matt
Although We are not using Trixbox but pure 1.4 asterisk we have had several diffrent results.
Yes we have it working and very well on a nokia e70
1 way audio on a nokia 62xx series
bad /broken audio on spv700 (windows phone)
no pairing on motorola (can't remember model number) gave up quickly !!!
We have found That a cambridge chipset Bluetooth dongle is VITAL
On the e70 it does exactly as it says on the tin- we can receive mobile calls into * via bluetooth and make outbound calls via the Mobile Phone. The bluetooth proximity is fantastic - as soon as the phone is in range it will make & receive calls with no additional prompting. This is a fantastic device so keep trying to get it working it is worth it.
IT DOES WORK
Simon
I'm not 100% but maybe this command
hciconfig -a hci0 revision
I just tried it and it says 'Unsupported manufacturer' so I guess thats a clue, if thats what its referring to.
This will give you full details
hciconfig -a
Cambridge chipsets or Cambridge Silicone Radio are often referred to as CSR.
You might spot these on Ebay
http://www.globalsources.com/gsol/I/USB-Bluetooth/p/sm/1003952225...
http://www.globalsources.com/gsol/I/Bluetooth-handsfree/p/sm/1004...
or something from this list
http://www.holtmann.org/linux/bluetooth/features.html
I started playing around with this today on two phones. a treo 700w and a motorola rokr.
I can get both dialing and receiving calls without problem, but the audio isn't transmitting.
What I did notice on the motorola was that when I switched from the handset back to the trixbox I could hear audio come through, but just for a quick moment.
One other thing. If you are looking to do more than one cell phone, what I did find out is that currently this module only supports on phone per bluetooth dongle. it *does* specify that you can have multiple dongles!
This will be a GREAT way to start saving customers money once this starts working.
I'm going to condense some extra info here into some extra steps:
1. cp /sbin/passkey-agent /usr/sbin
2. nano /etc/bluetooth/hcid.conf (you can change your BT identity and passkey)
3. nano /etc/bluetooth/passkeys/default (you can setup other custom passkeys here too)
I'm still working on the audio thing, hopefully I can get that figured out today.
After what simple68 said and some Googling, I'd say the CSR chipset is a safe bet as well as being the most prolific.
Theres plenty on Ebay, a search in the bluetooth section for Cambridge and or CSR will bring up a few and they will help you ID many more. Thats what I did anyway, mine should be here tommorow.
Hi!
I have the same issue with my Linksys USBTT100 and a Motorola V360 with the audio 1-way...
BUT...
I found with some research that the revision of chan_mobile we are using is 421 and if you look at this link (from digium)
http://svn.digium.com/view/asterisk-addons/trunk/chan_mobile.c?vi...
And look at, let say, revision 422: Changes to address audio quality and 1-way audio issues with some phones.
Hummmm...
So my question is this: How can we upgrade this chan_mobile in our trixbox to a newer version that might address some problems people are having?
I have two phones... My other phone is a Sony W300i...
And it WORKS both ways with exactly the same setup (Box+bluetooth dongle+configs) when I tested with my Motorola V360! But some calls have big static noise in the ear piece of my trixbox phone rather than my voice...
So can we conclude that it's seems to be a phone specific problem?
I think my suggestion still holds of changing the version...
Hope to get this working... I've been waiting for this for some time!
I go through all the various hcitool commands. Sometimes I can scan sometimes not.
From the phone, after futzing around, I get prompted for the PIN. Then I check with hcitool con and no connection? hcitool cc MAC starts something but nothing seems to work.
And at the Asterisk CLI, mobile show devices ists the Tero as NOT available.
Oh, the Dongle is CSR chipset. Anyone can help me?
Anyone has problem let try this way. I have follow Andrew step. I get hard time to make it work. Then I skip some step he has show. Then I have it work without problem with any cell phone with bluetooth connection. I used D-Link DBT-120
1. plugin D-Link DBT-120
2. hcitool dev
3. copy mac address to mobile.conf
4. amportal restart
5. asterisk -vvvr
6. CLI> mobile search
7. keep press mobile search until the you see your phone.
8. Then copy it to mobile.conf
[EARN MONEY SLEEPING]
address=00:15:A8:52:A0:00
port=7
context=from-pstn
adapter=blue
9. amportal restart
Now on your phone will ask you to accept trixbox audio. You say yes. then will ask you for pin number. Then put it 1234.
That all you are connect. And everytime you turn on your cell phone. It will automatic connect.
Well I dunno what the deal is. I worked on this some more tonight and so far I can dial out and get calls in without problem, but I can't get any audio. I can here a fraction of a second of audio but thats is. I suspect the phone goes into a secure mode and thats why no one gets audio, but I can't figure out anything from there. I found some docs that showed other configs with some encryption but still no luck.
I bought a CSR adaptor off ebay so i'll try that when it goes here and see how that goes I guess. Short of that i'm stumped.
Well, I've succeeded in installation the BT Nokia 6310i to work with TB 2.4.0 after a little struggle. What I'd like to know if it's feasible to have the mobile trunk work in an outgoing fashine only, i.e, Unidirectional ! As, I don't want TB answeres calls to my mobile phone. I have two phones sharing the same line #. I tried, without success to inactivate automatic call pickup in the Nokia mobile phone, but it seems ineffective.
Any help appreciated.
I made more progress today, but....
I can get the phone to connect to TB. hcitool scan shows the phone. hcitool con does not list any connections.
But when I get into Asterisk cli and try a mobile search,
The phone goes into a connection startup.
the phone is listed as not available and as a headset, not a phone.
So there is something missing from my mobile.conf. I seem to remember that there is something to set in mobile.conf to identify the bluetooth device as a phone or a headset.
Anyone have this information (and why is this not mentioned in the wiki?)
kspare,
I tried to build 463 and I get this error. Any idea how to build a higher version than 421?
build_tools/mkdep -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fPIC -fPIC chan_mobile.c
[CC] chan_mobile.c -> chan_mobile.o
chan_mobile.c: In function 'mbl_new':
chan_mobile.c:517: warning: implicit declaration of function 'ast_channel_set_fd'
chan_mobile.c: In function 'mbl_call':
chan_mobile.c:616: warning: implicit declaration of function 'ast_debug'
chan_mobile.c: In function 'mbl_load_config':
chan_mobile.c:1846: error: too many arguments to function 'ast_config_load'
make[1]: *** [chan_mobile.o] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/chan_mobile-463'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.15142 (%build)
I looked at this a few weeks ago - you can only compile the addon's in the 1.4 branch against the Asterisk 1.4 branch. If you try to compile against the Asterisk trunk I recall similar errors - you *can* compile the latest chan-mobile agianst the latest 1.4 Asterisk branch.
Then I tried to load resulting chan-mobile.so in trixbox against the version of Asterisk at the time 1.4.15... 1.4.16? I could not get it to load.
This might also help (or not) http://lists.digium.com/pipermail/asterisk-users/2007-August/1948...
http://bruscolini.acheronte.it/2007/12/06/chan_mobile-for-asteris...
I was a bit confused by the Asterisk 1.6 chatter above since I don't even see a 1.6 branch yet: http://svn.digium.com/view/asterisk/branches/
What has to be setup in FreePBX? Does the RPM take care of all that?
I followed another guide (Kevan's I believe) and got the bluetooth working no problem. Cell phone connected. Asterisk picks up the call and says "goodbye" and hangs up.
Do I need to set something up in FreePBX? I have a route for all calls to going to an IVR.
Would someone please clarify how chan_mobile works? What needs to be setup?
Here's some output from the Asterisk CLI to show you what's going on.
Thanks.
Loaded chan_mobile.so => (Bluetooth Mobile Device Channel Driver)
-- Bluetooth Device Katja Cell has connected.
-- Bluetooth Device Katja Cell initialised and ready.
== Starting Mobile/Katja Cell-3487 at incoming-mobile,s,1 failed so falling back to exten 's'
== Starting Mobile/Katja Cell-3487 at incoming-mobile,s,1 still failed so falling back to context 'default'
-- Executing [s@default:1] Playback("Mobile/Katja Cell-3487", "vm-goodbye") in new stack
--
According to the infomation about chan_mobile, you cna only have one pohone per bluetooth dongle. You can have more than 1 dongle.
Over on th eBluetooth list, there was a question recently about having more than 16 dongles, so I suspect that 16 is the current tops or the bluz drivers.
I have a bluetooth USB adapter that says:
hciconfig -a hci0 revision
hci0: Type: USB
BD Address: 11:11:11:11:11:11 ACL MTU: 672:3 SCO MTU: 48:1
Unsupported manufacturer
An other that says:
hciconfig -a hci0 revision
hci0: Type: USB
BD Address: 00:0B:0D:62:B1:22 ACL MTU: 377:10 SCO MTU: 64:8
Firmware 4.3 / 9
I guess this command really says if the USB adapter is supported.
on step 5, when I type the command it returns:
method return sender=:1.0 -> dest=:1.5
My phones won’t find any device.
I figured out, that when you do a
asterisk –r
trixbox1*CLI> mobile search
It won’t show the port you should use, unless the device is paired.
That’s why Andrew told us to pair in the first place.
But its not all mobiles/USB adapters that will pair Mobile > Trixbox way.
Some (Like mine Nokia 6131) will only pair TrixBox Mobile.
Address Name Usable Type Port
00:18:42:9A:95:69 [unknown] No Headset 0
00:19:4F:AF:CB:D4 [unknown] No Headset 0
I also found out, that each port is a bluetooth service understood by the mobile, and some ports wont even prompt the phone for acceptance (For instance port 2 and 4 on my nokia).
Then jump to step 12 and force your mobile bluetooth name, MAC and any PORT, it will at least prompt your mobile, asking permission for whichever service that port is, (In my case it asked for Remote SIM card connection).
It doesn’t matter, just accept, Pair but don’t accept when the phone asks if trixbox can connect without prompting at this step.
(PS: An other problem here, my mobile wouldn’t accept a 4 digit PIN It said it needed a 16 digit PIN, and changing that /etc/bluetooth/hcid.conf will do no effect. Just change the PIN where Andrew said /etc/bluetooth/passkeys/default for something with 16 digits, in my case 1234567891011121)
After you get your mobile Paired, Amportal Restart, when your mobile asks if you accept connection from trixbox, push NO.
Then rush to type:
asterisk –r
trixbox1*CLI> mobile search
(Before the 10 seconds configured to try to connect again, or you will get "All Bluetooth adapters are in use at this time." This one was for TDF, he said he had this problem)
Now you should see:
trixbox1*CLI> mobile search
Address Name Usable Type Port
00:19:4F:AF:CB:D4 6131-2 Yes Phone 13
And now you know which port to use.
Change the port on Mobile.conf
and Amportal Restart
Your mobile was already Paired, so it will only prompt for permission, only this time it will ask if you accept an Audio connection, push YES and if you would like your mobile to always become a Asterisk trunk whenever its near enough to the Asterisk computer, set allow this device to automatic connect to YES.
About my friends with audio problem, I really think its because of one of these reasons:
Wrong port (wrong service)
Motorola Phone (I strongly advise trying a nokia, I've had too many Motorola Vs Bluetooth issues, more then I can count, too many file corrupted from USB adapters to Motorolas, Not finding the phone or not pairing)
I am sorry for the extended post, I just want my friends to have the same happy face as I just had when my IVR spoke UP when I called my Mobile!!!
Cheers everyone.
Hi Everyone.
Just reading through this topic and thought I'd say thanks to Andrew and everyone else who has contributed to this post. I haven't tried any of the things mentioned here myself yet but on discovery of this post I will be doing.
Coizado, that looks like a very helpful and comprehensive entry. Hope I can get this working for us and our customers. It's a great function.
Hello everyone,
And here I am again...
Yesterday when I left everything was fine... But today, I noticed that when I recived a call on the mobile, asterisk didnt answer...
Testing recieving and making calls, I found out that the problem happens when the mobile transfers the audio to trixbox...
When I make a call from asterisk throught mobile trunk, the phone recieves it and beggin to make the call, but as soon as the other side starts ringing, the phone says "Transfering to Audio device" so that asterisk would listen the calling tone...
As soon as that happens, mobile says "disconected from trixbox" "Continue call?" a few seconds latter, "Accept connection from trixbox?".
The SSH screen shows:
/usr/sbin/safe_asterisk: line 117: 4123 Falha de segmentação (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY}
Asterisk ended with exit status 139Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: nenhum processo abortado
That would be translated as:
/usr/sbin/safe_asterisk: line 117: 4123 "Segmentation fault" (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY}
Asterisk ended with exit status 139Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: "No process killed"
I am guessing, that when the audio is transfered to asterisk, it craches and restarts, thats why I get "Disconnected from trixbox" and then it restarts "Accept conection from trixbox?"
Any suggestions?
Thanks very much...
Never Mind Guys, Upgrading to 2.4.2.0 solved the problem. I'll leave this post, so that if someone encounters the same problem, one knows what to do.
i've now tried an LG150 and a Samsung phone as well, all dial out just fine, and sometimes I can hear the first ring, and then nothing.....it just goes silent...not sure what i'm doing wrong, but I can't get nokia phones, Nokia isn't doing cmda technology anymore and thats the strongest carrier where i am from....
Doesn't make much sense that only phones that support channel 7 work? if this is to work like any other bluetooth headset it should connect like a normal headset you'd think???
Hi kspare
Mine's gsm (Motorola v3x) and so can only say that this works
Hopefully there's a way for cdma also.. - All the best
Strange if cdma doesn't work as I would have thought that the Audio Gateway control (over bluetooth) would be abstract from the carrier technology
I am working on my Motorola V9 for few days, was long to get pairing, but succeeded in making the phone discoverable while searching for new connection. But no audio.... Calls to my cell reach Trixbox, i can answer the call with X-Lite softphone, hang up also , but no audio. I am using few different adaptors, D-Link DBT-122 (Broadcom hci 2.0), Trendnet TBW-101ub (ISS Corp hci 1.2), and a Motorola PC-850 (Broadcom hci 1.2) with all the same results. They all pair with success, but no audio and that message "hci0 SCO packet for unknown connection handle 0" for the Broadcom adaptors. The Trendnet (ISS Corp chipset) seems to work better.
But still no audio...
Patiently waiting for a Cambridge unit from Ebay...
Just learning Trixbox for the last few days, really excited about all these possibilities...
FOSS VOIP is wonderfull...

Member Since:
2006-05-30