Giter Site home page Giter Site logo

test_fs_clock's Introduction

Test clock precision on a FreeSWITCH host

WARNING

The test results are not reliable, and the source of the problem seems to be in CPU resource scarcity inside a VM, and not in clock precision.

Introduction

This is a set of test scripts that verify if the FreeSWITCH host system has a precise enough clock, so that FreeSWITCH can reliably send RTP with even intervals. Some versions of KVM and VmWare are known to deliver poor clock precision.

These scripts are based on the experience gained from FS-7805 issue in FreeSWITRCH JIRA.

Installing FreeSWITCH on Debian

The following procedure installs a minimal configuration and the daily master branch build of FreeSWITCH. You can also install the stable branch if you remove the "debian-unstable" repository link. Also the stable branch can be installed on a Wheezy host.

If you prefer not to use the minimal configuration, the default (so called vanilla) configuration will also work with this test suite.

apt-get update && apt-get install -y curl git

cd /etc
git clone https://github.com/voxserv/freeswitch_conf_minimal.git freeswitch

cat >/etc/apt/sources.list.d/freeswitch.list <<EOT
deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main
deb http://files.freeswitch.org/repo/deb/debian/ jessie main
EOT

wget -O - https://files.freeswitch.org/repo/deb/debian/key.gpg |apt-key add -

apt-get update && apt-get install -y freeswitch-all

Installing this test suite

apt-get install -y libmath-vector-real-perl libmath-vector-real-xs-perl
cd /opt
git clone https://github.com/voxserv/test_fs_clock.git
cp /opt/test_fs_clock/999_test_fs_clock.xml /etc/freeswitch/dialplan/public/
fs_cli -x 'reloadxml'

The package libmath-vector-real-xs-perl is not available, but the script runs without it too.

Running the test

/opt/test_fs_clock/run_dialer
/opt/test_fs_clock/compare_spectrums /var/tmp/test_fs_clock_*.wav

The compare_spectrums script takes the frequency histogram of the first WAV file and compares it as a vector against histograms of all other WAV files.

If you see all zeros in Distance output, your clock is perfectly fine. If you see varying values above zero, it means that FreeSWITCH does not get a precise clock, and some applications, such as conference, would suffer from distortions.

After the test is finished, it makes sense to remove the XML from FreeSWITCH configuration:

rm /etc/freeswitch/dialplan/public/999_test_fs_clock.xml
fs_cli -x 'reloadxml'

Author

Stanislav Sinyagin [email protected]

test_fs_clock's People

Contributors

ssinyagin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.