Use of asterisk to diiagnose VOIP audio dropouts

I am trying to diagnose audio dropouts in the VOIP system in our community and I am looking for a tool which will let me make a call to another (VOIP) phone via our VOIP provider and play an audio file. I would like to run this using command line interface on a Linux (OpenWRT) platform.
Could I use Asterisk for this? If so, could someone recommend a tutorial to get me started?

You can do this in Asterisk using the Originate CLI command, using call files, and several other methods.

also take a look at sipp for making test calls

Thanks David and TheMark,
I’ve installed Asterisk on an Ubuntu system, but I am a bit overwhelmed by the many config files. I;m sure Asterisk is capable of doing many things, much more than I need. It would appear that what I’m trying to do is reasonably simple.
At first glance sipp appears to be doing the job. Only concern I have is that there does not seem to be a lot of development going on. There is of course, nothing wrong with mature software, but tthese days the underlying infrasture changes frequently in non-backward compatble ways…

Maybe Asterisks AMI will be useful to you. The RTCP events show lost packets and jitter data.

Indeed, lost packets may be the cause of my problems.
I suppose I will need to start climbing the learning curve.
Any suggestions?

What kind of audio drop outs? The user stops hearing the other side? That could be more related to the users network and NAT. So knowing the audio issue will help guide you on troubleshooting.

The audio dropouts do not occur on the side where the phone is, but on the other side.
The severity varies a bit, but there are breaks all the time - a conversation is impossible.
This started to happen a few months ago.

hmm maybe just some thing as simple at setup at mirror port on your switch and then have a tcpdump that capture both SIP and RTP
as in the end you will need tcpdump to debug RTP packets

And these are calls where both parties are with the same VoIP provider?

I’ve captured the SIP streams and they seem to be fine.
The issue is with RTP.
Still working on a way in which I can generate calls at the user’s site and monitor them at my place.
I have installed Asterisk on a Raspberry PI which I can call though our network from a phone.
I am still trying to find out how to play a long (or repeated) sound file using G729 and G723.

@Blaze Studios:
I have tried calling from my mobile as well as via my IP phone which uses the same provider.

OK, so you’re trying to troubleshoot problems multiple people using this provider is having? You want to somehow monitor calls on other networks to determine what is happening?

What happens when you call from your cell to your home phone service? Are you saying that the cell phone side of the call is hearing breaking up audio and having problems hearing the audio vs the IP phone side? The IP phone side is fine?

This is the same thing that happens on two users using the VoIP service? User A calls User B but User A can’t hear anything from Caller B?

At this point, based on what you’ve said. You can monitor your side of the call. You will not be able to monitor the other side without setting something up on that other sides network.

Also, have you spoken with the provider about any of this?

Hi Blaze Studios
Thanks for thinking along!
In our village we are running a wifi network in an area which is not covered by regular internet with about 115 members.
About 25 of those are using VOIP with the same provider. 2 of those, in the same branch, are encountering audio drop-out problems.
Typically these clients get about 100 Mbps download and 50 Mbps upload (iperf3 with tcp)

To answer your questions:

  1. What happens when you call from your cell to your home phone service
    No problems. Clear undisrupted sound.
  2. This is the same thing that happens on two users using the VoIP service? User A calls User B but User A can’t hear anything from Caller B?
    No. Only the person calling (or being called by one of the two users in our network) has poor audio. It makes no difference if they are calling with a regular (non-VOIP) phone, a mobile or a VOIP phone with the same provider.
  3. At this point, based on what you’ve said. You can monitor your side of the call. You will not be able to monitor the other side without setting something up on that other sides network.
    I have access to some Mikrotik routers on which I can monitor VOIP traffic. Attached is a screenshot from this morning. In a normal call (i.e. without audio srops) the up and download would be very similar, at about 80 kbps or so. In the screenshot there is a large variation in the upload.

So I’d like to track this down further, but for that I need a way to generate traffic at the client. I was thinking of installing a Raspberry PI with Asterisk on it, which I can access using ssh.

Yes, our client did talk to our provider before she alerted me. As expected the provider’s knee-jerk reaction was to blame our network. I was sceptical to this, as our speeds are consistent and good, I have a utility which pings our connection point at the fiber every second, and we hardly loose anything. The provider’s speedtest is good (just measured 152/41 Mbps, Average latency 33 ms, jitter 7.7 ms).
However, based on the measurents I have I must concede they are probably right. Something is not right.
Very strange, because if I run an iperf3 test from her place using UDP at 100 kbps I hardly loose any packets…

hmm do your SIP provider have a Echo Test Number that you can call
also in which direction is the RTP problem
and it is not possible to capture the RTP stream as well as SIP ?

Not sure if they have an echo test number.
The RTP problem is in upload direction: from the client’s IP phone to the network.
Yes, I should be able to capture both SIP as well as RTP packets. In various places, in fact.
But my first problem is to generate traffic. Still learning Asterisk and getting all the tools in place.

if the problem is with sending RTP to the provider setting up at test server in your network will probably not show any errors

alternative way to make a echo call send a call from you PBX to the provider where the To number belongs to your trunk, the provider should then send the call bact and you can then try to replicate the RTP issue
if there is no RTP issue there but other uses are experience sound issue at the same time then the issue it between you provider and the remote users (there upstream provider)

This is 100% a networking issue. Only two of your users have issues and it is related to their outbound audio which is tied to their upload traffic. Depending on who the VoIP provider is, there is a pretty high change they don’t even touch the RTP and they pass it through to their actual upstream/PSTN carrier. So in order to test this right the provider is going to need to be involved. They would need to do a full capture with RTP of the call so they can see what the audio sounds like when it comes through their network.

You could test from inside the users network and if that test is clean, meaning no audio/RTP dropouts before it hits the WAN then the issue is after the WAN. Testing on your own network (ISP network) is a false test since the VoIP provider is third party and the traffic would be going over the public Internet and not staying within your network.

I’ve spent a long time at ISPs, LECs and have had numerous WISPs partner with us over the years. This is an issue with the users network/Internet connection.

Again, thanks for your interest!

I agree. The question is where. From what I can see the packets are lost before or at the first switch, before they go to our provider. But I really would like some sound measurements before I continue.