This howto describes how easily one can enable VoIP QoS monitoring just by utilizing a SIP phone (in the example we used pjsip/pjsua) and Sevana NIQA for single-ended voice quality assessment to receive call MOS scores.
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Turn your sip_softphone_into_a_voice_quality_monitoring_instrument
1. Turn your free SIP softphone into a voice
quality monitoring instrument with Sevana's
NIQA application.
The purpose of this quick howto document is to show that implementation of a voice quality
monitoring system may be relatively simple. The most complicated task is to find an easy to
use and cost effective solution that would provide a perceptual evaluation of voice/speech
quality recorded by your SIP-system. However, Sevana NIQA was an easy choice.
We decided to use one of the most popular free SIP softphones – pjsip (www.pjsip.org).
This is a cute, light, but powerful tool that can do the two main things required for creating
a VQM system:
• functionality to make SIP calls – obviously all SIP phones have this functionality
• ability to play and record audio files
If you have a SIP software phone that supports these two features (and most likely any of
them does) then by using Sevana's AQuA or NIQA product you can setup a simple Voice
Quality Monitoring (VQM) within a couple of minutes.
First of all you need to have a SIP account (although calling to an IP address is also
possible). We have used free sip accounts provided by www.realsip.com. Then you should
create a configuration file for your SIP-phone that will serve as an answering machine. This
file may be as simple as the following:
# we don't want the host's audio device
#--null-audio
# SIP parameters
--realm realsip.com
--registrar sip:realsip.com # DNS SRV, or FQDN
--id sip:sevana@realsip.com
--username XXXXXX
--password YYYYYY
# default of 55 will be rejected as being too short by sipX
--reg-timeout 3600
# auto-answer all calls with "200 OK"
--auto-answer 200
# limit call duration – this maybe actually important if you like to
automatically hang up after the test call is
# finished
#--duration 20
2. # automatically loop incoming RTP to outgoing RTP – maybe useful
sometimes, but not this time
#--auto-loop
# mix WAV file into the audio stream
--play-file AE1F5901.wav # This is the audio that is going to be played
to the calling party
# we would recommnd using Sevana speech model file that AQuA can
generate, but this time we have
# chosen a sample test audio in French
# This command tells the softphone to record incoming calls into
call.wav file stored in the same folder
--rec-file call.wav
# This is important command to tell the softphone that audio sampling
rate should be 8kHz, because NIQA
# product can test only speech signals at 8kHz (although AQuA can test
any type of audio: voice, HD Voice
# and even HD Audio)
--clock-rate=8000
# This command tells the system to automatically play the audio file we
set (in this case AE1F5901.wav)
--auto-play
# And this command enables recording of incoming call
--auto-rec
# These are two important commands that set level of details in the log
file (3 is just what we need, but you
# can check pjsip manual for other options), and the call log will be
stored in log.txt – perfect!
--log-level=3
--log-file=log.txt
Amazingly, but for a simple voice quality monitoring solution the server part is pretty much
ready! Let's configure PJSIP for the calling party:
# SIP parameters
--realm realsip.com
--registrar sip:realsip.com # DNS SRV, or FQDN
--id sip:sevanaoy@realsip.com
--username XXXXXXX
--password YYYYYYY
# default of 55 will be rejected as being too short by sipX
--reg-timeout 3600
3. # limit call duration – alright, we want to hangup after 20 seconds
--duration 20
# mix WAV file into the audio stream
# Note, this is another audio that wll be played to our voice quality
monitoring “server”
--play-file test.wav
# And this call.wav will be stored on the client side
--rec-file call.wav
--clock-rate=8000
--auto-play
--auto-rec
--log-level=3
--log-file=log.txt
Now let's go for the first voice quality test! Yes, it's that simple:
On the server side run:
pjsua –config-file=config.cfg
Wait till the server boots and switches to waiting for a call status. And then on the client
side issue the command:
pjsua –config-file=config.cfg sip:sevana@realsip.com
You will see how the client will make a call, and the server will respond (even just by
changes in the command line windows of the server and the client). Then after 20 seconds
the calling party will hangup like it was written in the configuration file. Let's see what we
have got...
Client side:
We have a log.txt file containing important data about VoIP call parameters:
[DISCONNCTD] To:
sip:sevana@realsip.com;tag=5eca32938acd491c88739797ad3a3d09
Call time: 00h:00m:20s, 1st res in 1191 ms, conn in 1193ms
SRTP status: Not active Crypto-suite: (null)
#0 speex @16KHz, sendrecv, peer=192.168.0.190:4000
RX pt=103, stat last update: 00h:00m:00.931s ago
total 685pkt 45.3KB (72.7KB +IP hdr) @avg=17.9Kbps/28.7Kbps
pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
jitter : 0.000 17.254 57.000 19.250 5.127
TX pt=103, ptime=20ms, stat last update: 00h:00m:01.941s ago
total 700pkt 46.4KB (74.4KB +IP hdr) @avg 18.3Kbps/29.4Kbps
pkt loss=1 (0.1%), dup=0 (0.0%), reorder=0 (0.0%)
4. (msec) min avg max last dev
loss period: 20.000 20.000 20.000 20.000 0.000
jitter : 0.000 22.700 35.437 21.750 12.653
RTT msec : 2.563 5.744 12.999 3.082 4.237
And we also have call.wav, which contains the audio recorded on the server side.
Now it's time to use Sevana NIQA to obtain a MOS score of the call:
niqa -rdf TstBase.nbf -gqa call.wav
And the result is:
Sevana NonIntrusive Audio Quality Analyzer - NIQA v.1.1.1.24.
Copyright (c) 2010 by Sevana Oy, Finland. All rights reserved.
---------------------------------------------------------------
Database loaded!
Quality of file 'C:NIQASIPcall.wav' is 3.337179.
Used next Asins: 'FFr4'
Quality score calculated!
Wow! NIQA not only provided the MOS score (MOS = 3.34), but was also able to recognize
that it was a Female voice speaking in French (Ffr4). MOS score is pretty good, but the
most important thing is that we can now create the first record of voice quality monitoring:
Jitter,
Total, pkt Total, KB Avg, Kbps Pkt loss MOS
Avg.
RX 685 45.3 17.9 28.7 0 17.254 3.34
TX 700 46.4 18.3 29.4 0.1 22.7
And another important characteristic: RTT msec : 2.563 5.744 12.999 3.082 4.237
So, we know quite a lot about the VoIP conditions of the incoming call as well as that the
call quality was good (MOS is quite high).
Server side:
Here we also have a log.txt file containing the same important data about VoIP call
parameters:
[DISCONNCTD] To:
<sip:sevanaoy@realsip.com>;tag=6878cb877e224f89bbad8cbcb66df63b
Call time: 00h:00m:20s, 1st res in 79 ms, conn in 297ms
SRTP status: Not active Crypto-suite: (null)
#0 speex @16KHz, sendrecv, peer=192.168.0.167:4000
RX pt=103, stat last update: 00h:00m:01.781s ago
total 690pkt 45.7KB (73.3KB +IP hdr) @avg=18.0Kbps/28.9Kbps
pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
5. jitter : 0.562 23.396 221.500 221.500 6.725
TX pt=103, ptime=20ms, stat last update: 00h:00m:04.953s ago
total 700pkt 46.4KB (74.4KB +IP hdr) @avg 18.3Kbps/29.4Kbps
pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
jitter : 16.125 18.021 19.437 19.437 1.393
RTT msec : 2.853 13.575 34.667 2.853 14.915
Now the same procedure with the call.wav file that was created on the server side:
niqa -rdf TstBase.nbf -gqa call.wav
And the result is:
Sevana NonIntrusive Audio Quality Analyzer - NIQA v.1.1.1.24.
Copyright (c) 2010 by Sevana Oy, Finland. All rights reserved.
---------------------------------------------------------------
Database loaded!
Quality of file 'C:NIQASIPcall.wav' is 3.329050.
Used next Asins: 'FFr4'
Quality score calculated!
Alright, now we can build the same call quality monitoring record as we did for the calling
party:
Jitter,
Total, pkt Total, KB Avg, Kbps Pkt loss MOS
Avg.
RX 690 45.7 18.0 28.9 0 23.396 3.33
TX 700 46.4 18.3 29.4 0 18.021
Finally: RTT msec : 2.853 13.575 34.667 2.853 14.915
Calling party and called party voice quality records:
Now we can compare two records and evaluate what this gives to us:
Calling party:
Jitter,
Total, pkt Total, KB Avg, Kbps Pkt loss MOS
Avg.
6. RX 685 45.3 17.9 28.7 0 17.254 3.34
TX 700 46.4 18.3 29.4 0.1 22.7
Called party:
Jitter,
Total, pkt Total, KB Avg, Kbps Pkt loss MOS
Avg.
RX 690 45.7 18.0 28.9 0 23.396 3.33
TX 700 46.4 18.3 29.4 0 18.021
As one can see there are not many differences and the quality score is quite good and
stable both for transmitted and received audio, now how can we use these records for our
QoS analysis?
QoS Monitoring Solution
As long as the quality remains quite high this analysis and call quality data stored in a
database (like MySQL f.e.) is not that useful, but how to detect that the quality went down?
Only by R-value calculation is not the best approach, and therefore we suggest the following
case for your consideration:
1. QoS monitoring system based on obtaining MOS scores provided by Sevana NIQA
and VoIP parameters is running and storing call quality records for statistics
2. The system always monitors MOS value as the key voice quality indicator
3. MOS score drops down, let's say below 2
4. The system searching for a call quality record with the highest MOS score and
matches its parameters against parameters of the “bad call”.
5. The system immediately will be able to indicate what are the reasons for the quality
loss, because it can compare all main network parameters for high and low MOS
scores.
6. The system will be able to continously provide speech quality scores for all calls thus
allowing to visualize what trunks, routes, destinations are a matter of lower quality
What's the catch?
Well, there is no catch... Well, there is always a catch, but this time it's very simple:
We hope we have shown with this small howto a simple approach that will allow anybody to
build his own QoS monitoring solution based just on a software SIP phone allowing to
monitor... not, not the voice or speech quality of VoIP calls, but:
1. how many times your VoIP customers are happy about your service
7. 2. what makes your customers unhappy in your service
3. where is the problem that makes your customers unhappy
4. where to search for the problem origin
And if you doubt that we can help really anybody to enable his own QoS monitoring, just
think of answering a couple of questions:
• Is it expensive is loosing customers due to making them unhappy of making calls in
your system?
• Is it important to be sure that your Service Level Agreement (SLA) is always valid?
• Do you know enough about Sevana NIQA?
• Have you contacted Sevana concerning using NIQA for your OoS system?
If you don't know answer even to just one of the questions, please contact us: give us a
call, send an email, we'll get back to you immediately and we are sure you will be pleased
with what our voice quality assessment software can do to keep your customers happy and
you aware of having control over your VoIP system.
We are sure that NIQA is just what you
need...
...because:
• Available for evaluation
• Strong competitor for ITU P.563/P.564
• Ability to be trained to detect reasons for quality loss
• Ability to be trained for customer specific needs
• Multi-platform
• High performance
• Outstanding pricing
• Available as online service