[Freeswitch-users] Clock precision and raw audio recording

Stanislav Sinyagin ssinyagin at gmail.com
Sun May 10 18:42:12 MSD 2015


I've run it on a different Xen server which is more powerful and more
busy, and got also the same chopping audio in native recording.



On Sat, May 9, 2015 at 12:12 AM, Stanislav Sinyagin <ssinyagin at gmail.com> wrote:
> I'm observing an effect which needs explanation. Comments from the
> core developers will be appreciated. The effect was tested with
> versions 1.4.18 and today's master, on 64-bit Debian 7 and Ubuntu
> 14.04. All test calls were in PCMU or PCMA.
>
> My customer requested me to build a server for call quality assurance
> for their telephony system. I installed FreeSWITCH and set the
> following in the public dialplan to record the incoming audio:
>
>     <extension name="record">
>       <condition field="destination_number" expression="^record_(.+)$">
>         <action application="jitterbuffer" data="60:200:20"/>
>         <action application="set" data="RECORD_READ_ONLY=true"/>
>         <action application="set" data="send_silence_when_idle=400"/>
>         <action application="set" data="record_waste_resources=true"/>
>         <action application="answer"/>
>         <action application="record_session" data="/var/tmp/record_$1"/>
>         <action application="playback" data="silence_stream://-1"/>
>       </condition>
>     </extension>
>
> The first try was with a DigitalOcean (KVM) virtual machine. I started
> recording *.wav files, and sometimes there were skipped frames: 1-2
> skipped frames in a 2-minute call, one in every 10-15 calls.
>
> Then I changed the configuration to write raw audio files (removed the
> .wav extension from the record_session argument). As a result, the
> recorded input audio was quite bad: lost frames every few seconds in
> every call.
>
> Then I made test calls within the server itself, by originating a call
> to its public profile and playing the test WAV audio:
>
> fs_cli  -x 'originate sofia/external/record_03 at 111.222.222.111:5080
> &playback(/var/tmp/ITU-T_P_50_BRITISH_ENGLISH.wav)'
>
> The resulting input raw audio was also choppy. The same result was on
> another VM on a different physical server at DigitalOcean.
>
> Then I made the same self-call tests on a Xen VM and on a baremetal
> ARM server, and there the recorded audio was of perfect quality.
>
> Self-calls with recording into WAV files produced audio of perfect quality.
>
> Setting RECORD_USE_THREAD=false did not change the effect.
>
> Example of choppy received audio, converted from PCMU to WAV for convenience:
> http://www.k-open.com/s/record_04-in.wav
> The source audio:
> http://murmur.voxserv.ch/media/ITU-T_P_50_BRITISH_ENGLISH.wav
>
> So, it looks like the clock that is available at KVM is not precise
> enough, but that's not my question.
>
> QUESTION: why is raw recording so much more sensitive to the clock precision?
>
> thanks,
> stanislav



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list