Summary:ASTERISK-11269: mobile to asterisk audio stability strongly depends on asterisk to mobile audio activity
Reporter:Emmanuel Favre-Nicolin (manouchk)Labels:
Date Opened:2008-01-20 12:47:05.000-0600Date Closed:2009-04-21 13:13:37
Versions:Frequency of
Environment:Attachments:( 0) audio1.diff
( 1) sip_call_mobile_sip_with_noisy_microphone.bz2
( 2) sip_call_mobile_sip_with_silent_microphone.bz2
Description:In a simple testing configuration with a remote mobile (mobile R), a remote connected to asterisk by bluetooth (mobile A) and a sip phone (I 'm using x-lite for the test), I found that the stability of the audio flux from mobile to asterisk strongly depends on the activity asterisk to mobile volume in a connexion between the sip phone and the remote mobile.

It means that the lag can be very high about 8 seconds and that some audio parts from the mobile are lost (if no sound from asterisk to mobile)

If in the contrary there is sound made on the sip phone side, this sound is firstly perfectly transmitted to the mobile and the lag is only about 1 or 2 seconds for the audio coming from the mobile to asterisk (and then the sip phone).


I did catch the HCI data in both case in a call of about 10 seconds were I was speaking 1,2,3..10 on the mobile side
1) no noise on the asterisk (sip phone) side
2) with some noise on the asterisk (sip phone) side (done by saturating the mic or touching the mic...)

(I selected reproducibilty=always because in nature, it is reproducible but it is difficult to determine if 100% reproducible in the sense that it would behave exactly the same way.)

My configuration:
kernel vanilla with patch patch-2.6.23-mh1.gz from bluez
bluez libs and utils version 3.24
bluez-firmware 1.2
asterisk-trunk 98514 (12/1/2008)
asterisk-addons 501 (15/1/2008)
bluetooth usb trendnet TBW-105ub with Broadcom Corp. chipset
       > iManufacturer           1 Broadcom Corp
       > iProduct                2 BCM92045B3 ROM

I'm wondering if it could be linked with bug 11627 and 11556.
Comments:By: Emmanuel Favre-Nicolin (manouchk) 2008-01-20 12:48:52.000-0600

I have to add that the mobile used is a sony-ericsson W300i

and the (most important) configurations used (mobile.conf and extensions.conf)

$ more mobile.conf
interval=10   ; Number of seconds between trying to connect to devices.

;forcemaster=yes  ;
;alignmentdetection=yes ;
address=00:16:B8:5F:C2:XX ; the address of the phone
port=4 ;handfreeprofile       ; the rfcomm port number (from mobile search)
;port=5 ;headset profile


$ more extensions.conf
MOBILEA=Mobile/W300i    ;the mobile connected to asterisk through chan_mobile
MOBILEB=Mobile/W300i/068311XXXX    ;the "remote" mobile


exten => 0,1,Answer()
exten => 0,n,Authenticate(1234)
exten => 0,n,Dial(${MOBILEB},30)

exten => s,1,Answer()
exten => s,n,Dial(${SOFTPHONE},45) ; yet directly dialing because could not get

By: Emmanuel Favre-Nicolin (manouchk) 2008-01-20 12:57:46.000-0600

I added 2 files :
sip_call_mobile_sip_with_noisy_microphone.bz2 and

were obtained by the respective command :
hcidump -V -B -a>sip_call_mobile_sip_with_noisy_microphone
hcidump -V -B -a>sip_call_mobile_sip_with_silent_microphone

By: zaterio (zaterio) 2008-04-07 20:24:44

With the sony ericcson  k510 the problem are similar:

when I calling from a sip client: if in the sip client side there are no sound i cant hear anithing from another side, for example when i say "start" in the another side the person begins to count from 1 to 10 (1 seg steps) , i can hear 1...2.. and no more. when i restart talking i can hear again. I planig a one generator in the asterisk to maintaing the comunication.

the configs:
usb dongles: cambride chipset
asterisk-addons svn version: 576
asterisk trunk svn: 112765
kernel 2.6.18
debian OS

By: zaterio (zaterio) 2008-04-09 22:39:28

with nocallsetup=yes the problem disapear (erricson k510) but i have a lag in the audio: 2 segs

for the k510 i have:

debian3:/etc/asterisk# l2ping 00:1D:28:05:D3:52
Ping: 00:1D:28:05:D3:52 from 00:11:B1:09:F8:51 (data size 44) ...
44 bytes from 00:1D:28:05:D3:52 id 0 time 1972.16ms
44 bytes from 00:1D:28:05:D3:52 id 1 time 1552.41ms
44 bytes from 00:1D:28:05:D3:52 id 2 time 1556.29ms
sent, 3 received, 0% loss

By: BrettS (ughnz) 2008-05-18 02:35:10

I can confirm that this is happening and can re-produce it 100%

Using BOL Sip phone a software based SIP client and turning the mic gain right down will stop all audio from the cellphone. Turning the mic gain up and making a sound will start the audio from the cellphone until you turn the gain down again.

Watching traffic to <> from the SIP client with the mic gain turned right down in is not sending any RTP traffic which results in no RTP traffic from the cellphone.

With all other channels having the mic gain right down does not effect the RTP stream.

Using asterisk 1.4.19-1 with chan_mobile rev454 & bluez 3.31

By: Augusto Henrique Petzinger (apetzinger) 2008-05-28 11:55:57


I use Bluetooth Dlink DBT-122, Phones: Nokia 6220 or QTEK 9100 or Sony Ericson Z600, Kernel, asterisk-1.4.20 and have same problem.
Big latency (up to 2 sec).

By: Matthew Nicholson (mnicholson) 2009-02-18 18:14:44.000-0600

This error appears to be caused because of the way chan_mobile handles audio data.  Currently chan_mobile only reads audio from the phone when it writes audio to the phone.  I am working on a fix.

By: Matthew Nicholson (mnicholson) 2009-02-19 17:09:10.000-0600

I just uploaded the audio1.diff patch.  Please test this patch and see if it resolves your issue.

By: Emmanuel Favre-Nicolin (manouchk) 2009-03-02 10:01:43.000-0600

I hope someone else can do this. I'm presently not using asterisk yet and even less with my mobile which much more complicated and I'm not able to make it work in a short time. This patch apply to what version of asterisk? Is this patch in the actual svn version?

By: Matthew Nicholson (mnicholson) 2009-03-02 10:47:31.000-0600

This patch applies to the trunk version of asterisk-addons, it is not yet in the actual svn code.

By: Matthew Nicholson (mnicholson) 2009-04-15 14:14:48

I will be closing this issue soon if there are no objections.  This should be fixed in addons trunk.