Echo Dialplan Application produces Choppy sound

Hi all,

I am trying to use Asterisk to measure round trip delays in telephony networks. The basic idea is to make automated test calls from one Asterisk server connected via ISDN to another Asterisk server connected to a GSM network. The calls originate on ISDN and I use the Monitor dialplan application to record incoming and outgoing audio. Once the call is established I use the Playback application to send a reference audio signal to the GSM Asterisk server. The GSM server uses the Echo dialplan application to loop back the received audio. By comparing the incoming and outgoing audio files on the ISDN side it should be possible to determine the round trip delay in the voice channel.

The test signal is a series of 100ms 440Hz sine waves - 100ms silence. I can then detect the edges in both incoming and ougoing recordings. The difference is the round trip delay.

However, I receive choppy sound from the Echo application on the GSM side. Some of the sine waves are missing or are heavily distorted. I already have disabled echo cancellation on the Junghanns GSM card. On the ISDN side I use a Fritz! ISDN card going through the CAPI driver. I tried the following variations to narrow down the problem:

  1. I also used Monitor() on the GSM side to see if the signal comes in distorted. Before starting the Echo() application I start the Monitor() application. Both incoming and outgoing signals are distorted exactly the same way.
  2. If I only Monitor() on the GSM side without doing the Echo() the incoming signal is fine.

So it seems that the Echo() application affects both the incoming and outgoing audio and it seems to be that the audio leaves the ISDN side OK. I also see the same problem when I call the GSM side with my cell phone, so it also seems independent of the ISDN side.

Can someone help me to understand why the sound looped back by the Echo() application is so choppy? Is this a performance problem? Does Asterisk itself include echo cancellation when bridging the audio? The CPU and IO load is very low on the Asterisk doing the Echo().

Any help is highly appreciated.


GSM is not designed to accurately transmit sine waves. It is possible that it handles the steady state case well, but it is unlikely to handle transients well. It is a very simplified vocal tract model, and only intended for use with speech. (DTMF is transmitted out of band and regenerated at the mobile network boundary, or in the mobile.


Thanks for the answer, but I don’t think that this is the issue here. The signal is transmitted fine through the network from ISDN through the GSM, if I disable to Echo application on the GSM side. So I would conclude that the GSM speech codec is not the problem here. The recorded sound on the receiving side is noisy, but the on/off characteristics is fine.

It is odd though, that if I enable the echo application then incoming and outgoing signals get choppy an the on/off characteristics gets messed up. It seems to be some problem with the Echo application or with the Echo application in conjunction with the Monitor application.

That is where I am stuck here.