[Home]

Summary:ASTERISK-13077: Mobile connection is broken after 40+ minutes (asterisk hangs)
Reporter:jongerenchaos (jongerenchaos)Labels:
Date Opened:2008-11-17 14:50:28.000-0600Date Closed:2009-04-21 13:28:11
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/chan_mobile
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) log-core-show-logs.txt
Description:When i use the chan_mobile asterisk module this works great but there are serveral problems after some minutes:

- If you receive a inbound call from the cellphone to asterisk this works well. But after some time you get a higher delay and this delay is growing in the same call. (First you have no delay from the cellphone <=> asterisk).

- After 40+ minutes, when de sound delay is very high (2 seconds) the connection hangs and becomes silent.When you get this problem, asterisk hangs and it is not working to receive a new call and also CORE STOP NOW doesnt work.

Is there anybody who can resolve this problem.

I try the following options, all without a solution:
- Reinstalling Asterisk (serval versions)
- Use different 2.6 kernels (from ubunto interpid,hardy, debian sarge & etch)
- Different CSR dongles (with Bluecore 2,3 and 4)
- Disabling ehci_hcd (modprobe -r ehci_hcd)

****** ADDITIONAL INFORMATION ******

I use:
Ubuntu 2.6.24-19-server
Bluez-4.18 (also this problem is with other versions)
Asterisk SVN-trunk-r157167 built by root @ server on a i686 running Linux on 2008-11-09 10:50:13 UTC
Motorola L6 phones
Bluetooth dongle:
Class: 0x0a0100
       Service Classes: Networking, Capturing
       Device Class: Computer, Uncategorized
       HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
       Manufacturer: Cambridge Silicon Radio (10)
Comments:By: Tilghman Lesher (tilghman) 2008-11-17 16:14:00.000-0600

Please recompile with DEBUG_THREADS turned on in 'make menuselect', then when the problem occurs, run:

asterisk -rx 'core show locks'

and upload the output here.

By: jongerenchaos (jongerenchaos) 2008-11-19 14:44:29.000-0600

File is add under this bug as attached. Also on this call the delay during the call becomes higher en higher.

For the information:
There are two bluetooth phones connected and i use also IAX to transport some calls to another asterisk PABX

I get also some strange information on de command DMESG

[  898.420921] hci_scodata_packet: hci0 SCO packet for unknown connection handle 42
[  898.421039] hci_scodata_packet: hci0 SCO packet for unknown connection handle 42
[  898.421087] hci_scodata_packet: hci0 SCO packet for unknown connection handle 42
[  922.812942] hci_scodata_packet: hci0 SCO packet for unknown connection handle 46
[ 2099.320327] hci_scodata_packet: hci0 SCO packet for unknown connection handle 42



By: jongerenchaos (jongerenchaos) 2008-12-27 15:55:39.000-0600

Problem is not resolved yet (also not with the newest bluez-4.24)

By: jongerenchaos (jongerenchaos) 2009-01-27 14:56:51.000-0600

Sometimes i get also:

WARNING[4761]: chan_mobile.c:762 mbl_digit_end: Unknown digit 'D'
[279082.069253] btusb_isoc_complete: hci0 corrupted SCO packet

I redirect the chan_mobile call to sip and i get the following message after some time:
chan_sip.c:21018 check_rtp_timeout: Disconnecting call 'SIP/beluit-08f033a8' for lack of RTP activity in 61 seconds

By: Matthew Nicholson (mnicholson) 2009-01-27 15:44:28.000-0600

Ok.  Thanks for the additional info.  I'll see if I can reproduce this.

By: jongerenchaos (jongerenchaos) 2009-02-02 12:27:33.000-0600

I'll try asterisk/chan_mobile again with Bluez 4.28. There is more stability.

But the audio from asterisk to the cellphone

I think there is a big audio problem:
Audio from asterisk to the cellphone works well with all the bluez versions.
Audio from the cellphone to asterisk is always delayed, but in the new bluez versions it is the delay smaller (but not useable).

Maybe that we can rewrite the chan_mobile for transporting audio from the cellphone to asterisk. The bluetooth dongles accept ULAW or ALAW if you change the class from bluez.

Anybody who can help with it??

By: Leif Madsen (lmadsen) 2009-02-02 14:23:22.000-0600

jongerenchaos: The distorted audio is a known issue. See issue ASTERISK-12559.

By: nixon nixon (nixon) 2009-02-28 06:21:18.000-0600

May be this is from this "opera"?...
komp*CLI> module unload chan_mobile
 == Unregistered channel type 'Mobile'
 == Unregistered application 'MobileStatus'
 == Unregistered application 'MobileSendSMS'
[Feb 28 14:15:18] ERROR[3468]: chan_mobile.c:3062 do_sco_listen: ast_io_wait() failed for audio on adapter asus
   -- Bluetooth Device Nokia6021 has disconnected.

_At this moment into messages we see:
Feb 28 14:15:18 komp bluetoothd[3462]: No matching connection found for handle 1

By: Matthew Nicholson (mnicholson) 2009-03-18 11:50:15

The "unknown connection handle" errors appear to be related to this bluez bug.

http://bugzilla.kernel.org/show_bug.cgi?id=9871



By: Matthew Nicholson (mnicholson) 2009-04-09 10:19:33

Please see if this bug still exists with the trunk version of asterisk-addons.

By: Vivek Kapoor (marquivon) 2009-04-11 10:03:56

The issue persists with the trunk version (downloaded on 11 April 2009). Here is some more information if it helps

Ubuntu Jaunty 9.04 Beta, Kernel 2.6.28-11-generic 64 Bit
XMicro Bluetooth Dongle - Cambridge Silicon Radio and Broadcom
Asterisk version: asterisk-1.6.2.0-beta1
Asterisk-addons: Trunk version as on 11 April 2009
Phones tried: E61, E70, E51
Only Asterisk and Asterisk addons are installed. No zaptel/DAHDI, sounds etc. are there. I also am not using the ooh323 module - only using the chan_mobile module.

The issue that I'm facing is that when the call arrives, there is no sound at all. With the asterisk-addons beta, as soon as the call arrives, asterisk crashes. It only accepts the call when the asterisk-addons trunk version is used.


hci_scodata_packet: hci0 SCO packet for unknown connection handle 48
[ 1595.519542] hci_scodata_packet: hci0 SCO packet for unknown connection handle 44
[ 1595.519546] hci_scodata_packet: hci0 SCO packet for unknown connection handle 44
[ 1674.854575] hci_scodata_packet: hci0 SCO packet for unknown connection handle 44
[ 1674.854580] hci_scodata_packet: hci0 SCO packet for unknown connection handle 44
[ 1674.854582] hci_scodata_packet: hci0 SCO packet for unknown connection handle 44
[ 1689.096581] hci_scodata_packet: hci0 SCO packet for unknown connection handle 44

and

btusb_isoc_complete: hci0 corrupted SCO packet

bluetoothd[4816]: link_key_request (sba=00:02:72:81:E6:6A, dba=00:1D:FD:EC:82:BA)
bluetoothd[4816]: No matching connection found for handle 44
bluetoothd[4816]: No matching connection found for handle 41
bluetoothd[4816]: No matching connection found for handle 52
bluetoothd[4816]: No matching connection found for handle 41


I really want to use the bluetooth connectivity - the only version I saw it working was Ubuntu Hardy 8.04 and I have all my machines upgraded to either Intrepid 8.10 or Jaunty 9.04. Can you suggest if there's any solution.

I also tried using the Virtual Machines through KVM as well as VirtualBox but no luck. There's no voice - and in Hardy 8.04 though there is some voice but it is distorted.

By: jongerenchaos (jongerenchaos) 2009-04-11 10:10:33

First try to use the newest version of bluez @ http://www.bluez.org/

By: Vivek Kapoor (marquivon) 2009-04-11 10:15:17

This is what I have by default - would 4.34 absolutely required? I was unable to compile 4.34 on one of  my other machines but did with 4.33 and it used to crash the system after a call arrived on the phone.

bluez             4.32
bluez-alsa        4.32
bluez-btsco       0.50
bluez-compat      4.32
bluez-cups        4.32
bluez-gnome       1.8
bluez-gstreamer  4.32
bluez-hcidump     1.42
bluez-utils       4.32
libbluetooth-dev  4.32
libbluetooth3  4.32

By: jongerenchaos (jongerenchaos) 2009-04-11 10:25:21

For me 4.34 bluez works great in combination with chan_mobile. No problems with audio at all (2.6.28-8-server/Ubuntu Jaunty) for now. Maybe that you can try also the SVN version of asterisk Asterisk SVN-trunk-r187963.

The error messages are normal (i get the same messages), and that give no problems.

By: Vivek Kapoor (marquivon) 2009-04-11 13:20:19

@jongerenchaos - Sorry to trouble, but are you running Jaunty server in a virtualized environment or a dedicated box? 32 Bit or 64 Bit - though that shouldn't make a difference I presume.

By: jongerenchaos (jongerenchaos) 2009-04-11 13:28:22

It's a dedicated linux box (CPU 900MHZ) with an 32bit kernel.

By: Vivek Kapoor (marquivon) 2009-04-12 10:39:03

@jongerenchaos: I have been trying to setup chan_mobile on Ubuntu 8.10 and 9.04 for over a month and have always been unsuccessful. Either there is no voice, or if I run 8.04 in a Virtual Machine then the voice is garbled.

Can you post a few instructions on how you installed it on the Jaunty 9.04 Server. I did the server install and was unsuccessful. Bluez 4.35 (and 4.34) don't compile successfully; always giving the error related to libsbc. If you have some steps on how you did that, would be great.

I don't want to hijack this thread - if you can provide me a link or send it to subs.vk[at]exain.com
Much appreciated.

By: Matthew Nicholson (mnicholson) 2009-04-21 13:28:11

This should be fixed in addons trunk.