# Bad audio on a new Asterisk machine

**URL:** <https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480>\
**Category:** Asterisk Support\
**Created:** [April 8, 2020, 7:02am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480 "2020-04-08T07:02:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dux](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dux](https://community.asterisk.org/u/dux)\
**Post date:** [April 8, 2020, 7:02am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/1 "2020-04-08T07:02:21Z")

</div>

Hello!  
I have installed Asterisk 17.3 on a new machine of the same configuration as the previous one (4GB RAM, 1 core2Duo processor), but the sound (alaw codec) is not smooth, but randomly distorted (slightly stuttering). I the dialplan this is the Background and SayDigits applications.

How to adjust the quality of sound? I have tried both the new and traditional alaw algorithms.

---

<div class="post-metadata">

**Author:** ![satish4asterisk](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@satish4asterisk](https://community.asterisk.org/u/satish4asterisk)\
**Post date:** [April 8, 2020, 8:46am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/2 "2020-04-08T08:46:41Z")

</div>

(1)Did you check there’s no packet loss in your network?  
(2)Is there any other process consuming most of the OS resources at the same time?

---

<div class="post-metadata">

**Author:** ![dux](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dux](https://community.asterisk.org/u/dux)\
**Post date:** [April 8, 2020, 8:52am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/3 "2020-04-08T08:52:04Z")

</div>

With the pjsip show channelstats command I did not see any packet loss on the leg of my call. The CPU load is 1-3 percent. I think the problem may lie in wrong configuration settings. Earlier I used to have such a problem more seriously, but I solved it with Wait command for 0,2 seconds. On the new machine the setting "transmit\_silence\_during\_record " was set to no. I just turned it on, and audio became better, but the problem did not entirely disappear.

---

<div class="post-metadata">

**Author:** ![Chano](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/chano/32/3448_2.png) [@Chano](https://community.asterisk.org/u/Chano)\
**Post date:** [April 14, 2020, 9:19am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/4 "2020-04-14T09:19:00Z")

</div>

CPU load is not the only problem, if your load avg. is high, audio problems are common, even though CPU usage is only a few percent. Check the load with the uptime command, and make sure it’s no higher than the number of CPUs in the system. (That would be 2 in case of a dual core CPU)

RAM should be no problem, asterisk is not that memory hungry. (At least not in version 16 that I’m running)

---

<div class="post-metadata">

**Author:** ![dux](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dux](https://community.asterisk.org/u/dux)\
**Post date:** [April 14, 2020, 9:20am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/5 "2020-04-14T09:20:54Z")

</div>

It says load average: 0.01, 0.01, 0.00

---

<div class="post-metadata">

**Author:** ![dux](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dux](https://community.asterisk.org/u/dux)\
**Post date:** [April 14, 2020, 9:22am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/6 "2020-04-14T09:22:22Z")

</div>

Maybe it is due to pauses in audio (between words)? I have noticed that, if there is a pause at the beginning, my files stutter more often. If I remove them, they are played better. But occasionally they do not play well. This is annoying.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [April 14, 2020, 9:45am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/7 "2020-04-14T09:45:21Z")

</div>

I would look at the media stream, with wireshark. Are there comfort noise frames, which Asterisk doesn’t handle? Is there excessive jitter?

---

<div class="post-metadata">

**Author:** ![dux](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dux](https://community.asterisk.org/u/dux)\
**Post date:** [April 14, 2020, 10:07am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/8 "2020-04-14T10:07:01Z")

</div>

I think this has something to do with comfort noise or silence. My audio files (IVR menus) have speech together with pauses. I have recently enabled Transmit silence during rec, it is better now. Any other settings, I may adjust? I will take a trace to check for comfort noise frames.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [May 14, 2020, 10:13am UTC](https://community.asterisk.org/t/bad-audio-on-a-new-asterisk-machine/83480/9 "2020-05-14T10:13:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
