FreePBX | Register | Issues | Wiki | Portal | Support

Audio is not good


#1

Hello everyone, I set up a switchboard on a KVM, a simple conference with some extensions and some calling from outside. The conference works, except the audio that is not fluid. He feels very bad, sometimes good and then he starts to jump. I checked the trunk and it looks fine, as it looks good inbound and outbound. It is connected to NAT.
I did a test together with the voip number providers and they tell me it’s a switchboard problem.
The supplier of the KVM where the PBX is installed told me that I have checked the network and there are zero packet loss and tells me exactly that the problem is in the PBX setup.
I have no more ideas, what can I do? Are there any other checks you can do?
Thanks for the help


(Itzik) #2

We’ll need a little more information.

The server is on the same network as the phones?
Is there any issues with extension to extension calls?


#3

I did not know what kind of information to give, I will try to explain the system well.
The server is remote exactly in Milan has in static ip. The telephone number is a geographical voip with a prefix of the local province. In the conference they connect internals (also connected to them with a Zoiper softphone) and also users who call from a mobile phone.
In any way you connect me, either internally or via mobile phone call, the audio jerks.


(Itzik) #4

Are both internet connections stable? (your office and the place where the PBX is hosted)


#5

Yes, they are both stable. I did an MTR test online on the server and did not give lost packets.
My connection is Ping 34, Jitter 9, Download 29, Upload 3


#6

If conferencing is the only purpose of this PBX, or if your meetings will have more than about six people, I suggest using a commercial conference service instead. There are some decent free ones and excellent inexpensive ones; I’ll provide recommendations if you are interested.

For troubleshooting, first report the simplest case that has bad audio. If possible, use an IP phone with a wired Ethernet connection for these tests. Next best is a softphone on a PC with a wired connection and a good headset.

  1. From an internal extension, call *43 (echo test). Listen carefully to the long announcement preceding the test (the actual test is not useful here).

  2. Enable voicemail on an extension. In Voicemail Advanced Settings, turn on Review message for the extension. Call the extension, let it go to voicemail and record a message. Press # then 2 to review the message, listen carefully for problems.

  3. Call directly from one extension to another and check for voice quality problems.

  4. Temporarily route your incoming number to an extension and have someone call in. If you have problems with quality, report whether it affects what the extension user hears, what the remote party hears or both.

  5. Enable music on hold for your conference. Call in from only one extension and listen for problems with the music.

  6. Have a second internal user call into the conference and check for audio issues.

  7. Have more users call in until the sound goes bad. Report the number of users when you first have trouble. Also tell us the number of users you would like to support.


#7

678/5000

I did all the tests and I honestly do not see a big difference between the call from outside the office or between the communication between extensions. The conference should be made between 3 and 6 participants, but even with only 1 participant the quality remains that, but does not worsen with the increase of connected. I inserted the music and has the same quality of the voice, at times well then it gets worse.
I noticed one thing though, the quality gets worse at the same time that I make a change or load a page on the PBX and re-establish itself after about 10 seconds. I doubt that the KVM is too small for the work it has to do. These are the values of the virtual machinekvm%20valori


#8

I’m not sure that I understand your post. Please confirm that you have quality issues on all calls, whether or not the Conference app is involved.

OK, to rule out the possibility that the download was interfering with the audio on your own network connection, test by listening to the music on a mobile phone dialed into the system, so the audio is not passing through your office network connection. Then, if the quality degrades when you load a page, we can be pretty sure that there is insufficient CPU to keep the audio flowing smoothly.

IMO there are three likely possibilities:

  1. Your VPS provider is not giving you the CPU that they claim (25% of 1 core).
  2. There is something wrong with your FreePBX installation that is causing Asterisk or another process to run continuously, even without any calls in progress.
  3. Some combination of your settings (transcoding, recording calls, etc.) is causing calls to use much more CPU than expected.

What does your CPU usage show when the system is idle (Asterisk running but no calls in progress)? Which processes are using the most CPU? How do the statistics change when two users are connected to the conference? I have a script for measuring scheduling delays, which I will post shortly.


#9

sorry my english but i speak italian … google translates like this …

Yes

At the time I made the screen, Asterisk there were no phone calls

When I edit a parameter in the asterisk or do a search in the CDR reports the audio signal is ruined, with any type of call extension or not extension

in this picture there was a connected


#10

Here is a perl script for analyzing scheduling delays. It does no network or disk I/O (other than writing its log file). It simply asks to be awakened every 10 ms and compares the actual time it gets activated with the requested time. If it’s more than 30 ms late, that’s sufficient jitter to cause an audible glitch. It also logs ‘small’ delays (anything over 10 ms). A one-line summary is created every ten minutes. For each minute with at least one delay over 30 ms, it logs the number of delayed packets for each second (X means more than 9), so you can get an idea of how the trouble would affect the sound. Let this run in the background for an hour or more, then post the contents of the schedtime.log file that it writes. If you make calls during this time, keep a record so we can correlate that with the log.

#!/usr/bin/perl

use Time::HiRes qw( time sleep );

$smalld = 0.010;                # more delay than this is a "small" jitter
$badd = 0.030;                  # more delay than this is a "bad" jitter

open(LOG, ">schedtime.log") or die;
select((select(LOG), $|=1)[0]);
print LOG "time\tgood\tsmall\tbad\tmax\n";
$good = $small = $bad = $max = 0;
$duesec = 0;
for ($i = 0; $i < 60; ++$i) {
    $bads[$i] = 0;
}
$timedue = int((($timenow = time) + 61) / 60) * 60;
sleep($timedue - $timenow);
while (1) {
    $delay = ($timenow = time) - $timedue;
    $max = $delay if $delay > $max;
    if ($delay < $smalld) {
        ++$good;
    }
    elsif ($delay < $badd) {
        ++$small;
    }
    else {
        ++$bad;
        ++$bads[$duesec];
    }
    $timedue += 0.01;
    if (int($timedue * 100 + .5) % 100 == 0) {  # started new second
        $timedue = int($timedue + .5);          # set to exact integer
        if (++$duesec == 60) {  # started new minute
            $duesec = 0;
            for ($i = 0; $i < 60; ++$i) {
                last if $bads[$i]; # at least one bad in last minute
            }
            if ($i < 60) {      # one or more bad
                ($i, $mm, $hh) = gmtime($timedue);
                $badstr = sprintf("%02d:%02d  ", $hh, $mm);
                for ($i = 0; $i < 60; ++$i) {
                    $badstr .= $bads[$i] > 9 ? 'X' : $bads[$i];
                    $bads[$i] = 0; # reset for next minute
                }
                print LOG $badstr, "\n";
            }
            if ($timedue % 600 == 0) { # crossed 10 minute boundary
                ($i, $mm, $hh) = gmtime($timedue);
                printf(LOG "%02d:%02d\t%d\t%d\t%d\t%1.4f\n", $hh, $mm, $good, $small, $bad, $max);
                $good = $small = $bad = $max = 0;
            }
        }
    }
    sleep($timedue - $timenow) if $timedue > $timenow;
}