Bad audio quality, 3KHz noise


#1

Hi all,

i’m experiencing a strange problem. I have an asterisk instance acting also as SIP client, so i can establish a call between a softphone and Asterisk. Asterisk, in this scenario, uses channel ALSA. On Asterisk side i have a bad voice quality, while the voice quality is good on sofphone side. I started to make some tests. I generated a 700HZ tone and sending it through the call, on Asterisk side i get the 700HZ tone plus a 3KHZ tone. Recording the audio in dialplan 3KHZ tone disappeared. In addition, also playing recorded audio with aplay 3KHZ tone is not there. So i think the problem is about the way Asterisk passes PCM samples to alsa layer or a missing configuration for alsa.

Some info:

Asterisk version: 13.7.2
codec: ulaw
sample rate 8000
PCM S16_LE

Any idea?


#2

How exact are these frequencies? Is it 3KHz or 3kHz?

Personally, I’d consider the sound card drivers as proof of concept drivers, rather than production ones. I doubt that anyone is maintaining them


#3

The noise is a tone with a freq of 3 kHz. Please consider that reproducing wav file containing 700 Hz tone through aplay the problem disappears. I don’t think it is a sound card’s driver problem.


#4

There is no obvious relationship between 3,000 Hz and 700 Hz, when using a sampling rate of 8,000/s and a frame rate of of 50/s. The image of 3,000 Hz, is 5,000 Hz.

In any case, I doubt anyone would be particularly interested in fixing this, even if it is an Asterisk bug.


#5

Can you describe your phone or mic setup and configuration. Perhaps you use wireshark to monitor audio comming from one peer/endpoint into and then out of the astrisk box to the other peer/endpoint.
Is the sound heard at the receiver or transmitter or both if you simply turn on the mic? Are you also trying to stream video at the same time. I’m assuming if you change the codec to something else it dosent solve the problem. Is it possible to swap to a different sound manager other than ALSA or use a different sound card or sound option, personally on a linux system running varoius soft sip clients i’ve had more luck selecting PCI:0 card rather than accepting the ALSA:default.


#6

I’m running Asterisk on an embedded board equipped with an sgtl5000 sound card. No tcpdump is running, and no video streaming active. The problem is only at receiver (no MIC’s fault) and in particular if i ask Asterisk to record the conversation (cmd Monitor in dialplan) the problem is not there. I think the problem could be due a missing configuration for the audio card that Asterisk doesn’t set before passing PCM samples to alsa layer. Yes, you are correct, with a different codec the problem doesn’t disappear.