Problem with playing tones

I would like to play busy and congestion tones in case a line is busy or congested. Before playing tones I issue progress(), then playtones and then wait for 5 seconds. It happens that sometimes they are not played in softphones, although the ringing tone in the Dial command always sounds. Another problem is the quality of the tones, generated with the PlayTones application, is not as clear as the ringing tone of the Dial application (the sound quality is worse).
How to correctly generate busy and congestion tones?

Have you tried Proceeding() instead of Progress() & PlayTones() ?

Coupled with Busy() and Congestion() and Dial(), it might suit your needs better.

The phones may not support early media (or a router may block it).

Tones generated in the phone will not be distorted by codecs. What codecs are you using? I wouldn’t expect, for example, GSM codecs to reproduce pure tones and simple tone combination accurately, because it is based on a vocal tract model, and vocal tracts generally don’t generate pure tones.

1 Like

I use alaw and g729.

G.729 is also a vocal tract model based codec.

Is there a way to generate pure tones in Asterisk (like in regular telephony with tone generators)? The tones, generated with the PlayTones() command, are not of a good quality. I use softphones.

Use G.711 (ulaw or Alaw) codecs, and make sure that nothing changes the codec on the way.

If that doesn’t work, you will need to rewrite indications.c, but note the current code is designed to minimise the CPU load by computing the sine function incrementally.

In some contexts, you could pre-record the tones and use playback and music on hold.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.