[Asterisk-Users] Distortion/crackling/skipping problems on outgoing calls -- please help!!!

Robert Geller robert at worksofmagic.com
Sun Sep 4 17:56:48 MST 2005


Rich Adamson wrote:

>>Sorry to write so many consecutive messages in such a short period of 
>>time, but this problem is really bugging me as it has been going on for 
>>days.
>>
>>When I look in Ethereal, there are actually "two calls" going on -- in 
>>this particular call, Source call #4 and Source call #10318, #4 coming 
>>from the asterisk server and the other one coming from my computer to 
>>the Asterisk server. I don't know why there are two separate "calls," 
>>but perhaps one of you do. 
>>    
>>
>
>Its not really two separate calls; its the transmit leg and the receive
>leg of the same call.
>
>  
>
Oh, ok, that makes sense.

>>Anyhow, source call #10318 seems fine, 
>>sending a new packet every 20 ms pretty much perfectly and all (although 
>>I do see now that one packet has a timestamp of 33080 and the next has 
>>one of 35060 -- is this something to be concerned about? 
>>    
>>
>
>The diff is 1980, which essentially suggests there were 99 iax packets
>missing between those two timestamps. (Should note that timestamps 
>miscalculations have been an issue in the iax2 source code, but I don't
>remember if some of the fixes were before or after the version of code
>your running. That really was the basis for suggesting a code upgrade.)
>
>If 99 iax2 packets are actually missing, you _would_ have a problem 
>with the audio quality.
>
>  
>
Perhaps I read that wrong, as the different filters don't seem to show 
those packets as lost or jittered. Plus, this crackle happens fairly 
often, so I don't know if it's any indication of dropped packets (or the 
root of the problem, at least), but then again, I'm not sure. I will try 
taking another sample.

>>it doesn't seem 
>>widespread). However, call #4 seems to send every 20 ms, but then there 
>>will be a pause or something in sending, in between which there will be 
>>more packets from source call #10318 which are sent pretty much OK. 
>>    
>>
>
>Keep in mind that you're looking at a full duplex flow of packets in
>and out. The fact that packets are not exactly one transmit for one 
>every one received is not as important as identifying missing packets
>in the form of large jumps in timestamp values.
>
>  
>
Yeah, I see what you're saying.

>>Then, the next packet for source call #4 will have a timestamp of 
>>something like 33540, exactly 200 ms after the previous packet from 
>>source call #10318. However, the next packet for SC (source call) #10318 
>>increments 20 ms like it should. Every single packet then on (in this 
>>capture, I recorded about 1500 packets) sends perfectly. iax2.rrdropped, 
>>iax2.rrjitter, and iax2.iax.rrloss returned only 2 packets--the same 
>>two, in the middle of the 1500 packets. So, out of 1500, these are the 
>>only two that seem to have problems.
>>    
>>
>
>Asterisk can generally handle a couple of missing 20 millisecond packets,
>but it can't compensate (or cover up) hugh timestamp jumps. Might
>consider doing another ethereal run or two and see if you can reach
>a conclusion that the timestamp jumps are in fact associated with the
>choppy audio. If you can reach that conclusion, the next step is to
>isolate why; is it bad code or the network that's causing the issue?
>
>I don't recall from your previous postings, but could you repeat what
>exact code versions are running on "my computer" and the remote "asterisk
>server"?
>
>  
>
By code versions, do you mean what OS I'm running on my computer? I'm 
running Debian etch (testing) and ethereal 0.10.12. On my Asterisk 
system, I'm also running Debian etch, with Asterisk 1.0.7 (debian's 
"testing" version of asterisk).

Would you then suggest that I should upgrade to a later version? Which 
one? 1.0.9? Or are even the BETAs (1.2.x) usable?

I'm not sure if it's just psychological at this point, but the crackle 
seems to have faded a bit; it doesn't sound as harsh or prevalent as it 
did before. I moved my power strip further away from my computer, and 
I'm not sure if this made a difference or not, but it doesn't sound *as 
bad*. Note that it's still bad enough that I would take a land line over 
it any day, and it's certainly and by all means abnormal (thus, 
absolutely worth resolving). I did listen to some sample sounds on 
Cisco's website -- 
http://www.cisco.com/en/US/tech/tk652/tk698/technologies_white_paper09186a00801545e4.shtml#crackle 
-- and determined that my symptom is most like their posted "crackling" 
audio quality symptom, if this helps any more. However, /their/ 
crackling example is much harsher, louder, and more annoying than mine. 
Nonetheless, I believe mine more closely resembles that sample than any 
of the others -- it's just less severe.

It could be a big transformer that's near the Ethernet card, but I 
believe my strip is now a pretty standard distance away from my Ethernet 
card; I measured it, and it's roughly 16 inches from the Ethernet card 
itself. It doesn't seem like it will that much farther, but is that too 
close?

Plus, if it is electrical interference, ethernet being digital and all, 
wouldn't the potential interference render the network useless in other 
ways, not just voip? Again, I can do *everything* otherwise 
network-related perfectly, like downloading (from the network and the 
public Net), listening to online music streams (this one is probably the 
most indicative of a working network, as it is relatively similar to a 
voip conversation in that packets are sent very often and regularly to 
this one destination), browsing, real-time multiplayer gaming, and 
everything else one does and can do on a network -- and everything else 
works great. So, I don't know if electrical interference or bad cabling 
has anything to do with it -- but it still might; I'm just posing a 
question/suggestion. Is it more likely (or not) that the interference is 
coming from the sound card/speakers/transformers, etc.?

BTW, just to reassure you all that my ethernet is fine, here are the 
results of an extremely fast (ping -i 0.0005) ping to the asterisk server:

--- 192.168.2.7 ping statistics ---
10758 packets transmitted, 10758 received, 0% packet loss, time 28976ms
rtt min/avg/max/mdev = 0.106/0.118/10.779/0.105 ms, pipe 2, ipg/ewma 
2.693/0.118 ms

i don't think my ethernet is flawed at all. i did several of those 
tests, by the way.

Perhaps it *is* my sound card. i'm trying to load XP on my laptop (since 
either the laptop's multimedia controller or 2000 seem to be f-ing up) 
to test it, and I'll report the results to you when I do that.

Regards and thanks for your continuing support,
Robert Geller



More information about the asterisk-users mailing list