Summary:ASTERISK-08765: Strange audio problems (distortion, truncation...) on Intel G965 / Core2Duo system
Reporter:Paolo Ornati (ornati)Labels:
Date Opened:2007-02-10 04:26:38.000-0600Date Closed:2011-06-07 14:03:15
Versions:Frequency of
Description:Note: I'm new to Asterisk and I'm facing a very strange problem, but only on a specific PC  ;)

I have 2 PC:
1) AMD Athlon64 / Asus K8V SE (chipset: VIA KT800)
  32bit Debian Etch

2) Intel Core2Duo / Intel DG965ss (chipset: Intel G965 Express)
  64bit Gentoo

On the AMD one, with Asterisk 1.2.13 (Debian Etch package), everything works fine.

With the Intel one, not matter what version of Asterisk I run, I've strage problems with audio.

For example, I've set up a very simple SIP channel that I call from the same PC (using Ekiga or KPhone):

---- sip.conf ---------------------
qualify=yes      ; Qualify peer is no more than 2000 ms away
nat=no           ; This phone is not natted
host=dynamic     ; This device registers with us
canreinvite=no   ; Asterisk by default tries to redirect

And a very simple extensions.conf:
exten => _2.,1,Answer()
exten => _2.,n,SayDigits(${EXTEN})
exten => _2.,n,Hangup()

exten => _3.,1,SayDigits(${EXTEN})
exten => _3.,n,Hangup()

Now, if I call "sip:2123456789" I hear a small crappy sound (bum! bum!) and then silence. The whole call lasts about 4 seconds.

If I call "sip:3123456789" I hear a bit of silence and then the the last part of "three" followed by "four", "five" etc... BUT all these are somehow distorted.


On the Intel system I've tested a lot of things...

64bit Gentoo:
 Asterisk 1.2.13 / 1.2.14 / 1.4.0

32bit Gentoo (chroot):
 Asterisk 1.4.0 / 1.2.14

32bit Debian Etch (cloned from the other PC):
  Asterisk 1.2.13
Note: the only difference from the other PC is the kernel, since with the Debian one (2.6.18) I've troubles getting work audio and network (so I can't test with Ekiga) so I've built a 32bit 2.6.20.

I've also tried 64bit Gentoo with kernel 2.6.18 (the one that Debian Etch uses) but nothing!

It looks hardware dependent.

Currently I'm out of ideas so, if you have one, I'm glad to try it!
Comments:By: Francesco Romano (francesco_r) 2007-02-10 08:38:10.000-0600

Perhaps your hardware it's broken...
I have installed Asterisk with Slackware 11 and kernel in multiple Core2Duo/G965 systems (Intel WESTCHESTER) and works perfectly.

By: Paolo Ornati (ornati) 2007-02-10 09:29:09.000-0600

Broken? Uhm... everything else works fine, what exactly should be broken to cause this?

For "everything" else I mean a lot of computation (mainly because of building everything from source - Gentoo :).

And this issue, in it's strangeness, is somehow consistent (the results are 100% reproducible).

By: Francesco Romano (francesco_r) 2007-02-10 11:18:06.000-0600

Have you tried with kernel 2.6.19 or 2.6.20?

By: Paolo Ornati (ornati) 2007-02-10 11:36:45.000-0600

So far I've tried with 2.6.18 / 2.6.20.

I've also tried a "minimal" 2.6.20 (no SMP, no PREEMPTION, no frequency scaling...).

I'll try other things and report back if something interesting arise.

By: Joshua C. Colp (jcolp) 2007-02-15 20:01:39.000-0600

There's nothing specific in Asterisk that would cause this... but it is under the mercy of Linux. What sort of timing source are you using? If not zaptel you may want to try ztdummy and see if it improves.

By: Paolo Ornati (ornati) 2007-02-16 03:08:05.000-0600

Before I wasn't using zaptel (lack of hardware) nor ztdummy, so I don't know what asterisk was using (rtc?).

Now I've tried with "ztdummy" loaded:
# lsmod
Module                  Size  Used by
ztdummy                 4112  0
zaptel                182248  5 ztdummy

and nothing changes.

I've seen that ztdummy can use rtc or kernel timer, I've tried both... but how I make sure Asterisk is using it?

I don't see any "time source" related message even with "asterisk -vvvvvc".

By: Serge Vecher (serge-v) 2007-03-07 13:01:33.000-0600

The problem described in this bug does not seem to be a bug in Asterisk. If you can narrow down the problem to specific code used in Asterisk, please feel free to reopen the issue with that information provided. Otherwise, seek help on #asterisk-users IRC channel or asterisk-users mailing list.