Asterisk command to get the supported file format for ring

Hi,
I want to know the supported audio file formats for rings and tones.

I remarked that the modules used to support files format are present in /usr/lib/asterisk/modules:

ls /usr/lib/asterisk/modules format_g726.so format_g729.so format_gsm.so format_pcm.so format_sln.so format_sln16.so format_wav.so format_wav_gsm.so

I can extract the supported file formats from the above output. But

  1. is it the complete list of supported file format? are there other file format are not mentioned here?
  2. are there an asterisk command to extract the supported audio file format for rings and tones?

Asterisk doesn’t use audio files for rings and tones. Where possible, they re generated in the phone or up/downstream system, based on locally configured information. Asterisk can only create ring cadences, not actually rings. Tones are generated algorithmically based on indications.conf, and always start in SLIN format, so there must be a codec conversion path from there to the target codec.

For announcements and music on hold, the allowed formats can depend on the codec modules you have installed as well as the formats available, as there needs to be a sequence of codecs to get from a form actually held to the one needed by the remote system. E.g. if you have G.729 audio, but no G.729 codec, you can use that audio, but only for G.729 device and you can use no other audio forum for a G.729 only device.

There are CLI commands which will tell you about the file extensions and formats potentially supported, and will give you the complete matrix of codec conversion costs (from which you can deduce unsupported conversions). There names are fairly obvious, but I don’t have a running Asterisk system where I am at the moment.

Thank you for the answer

[quote=“david55”]Asterisk doesn’t use audio files for rings and tones. Where possible, they re generated in the phone or up/downstream system, based on locally configured information. Asterisk can only create ring cadences, not actually rings. Tones are generated algorithmically based on indications.conf, and always start in SLIN format, so there must be a codec conversion path from there to the target codec.

For announcements and music on hold, the allowed formats can depend on the codec modules you have installed as well as the formats available, as there needs to be a sequence of codecs to get from a form actually held to the one needed by the remote system. E.g. if you have G.729 audio, but no G.729 codec, you can use that audio, but only for G.729 device and you can use no other audio forum for a G.729 only device.

There are CLI commands which will tell you about the file extensions and formats potentially supported, and will give you the complete matrix of codec conversion costs (from which you can deduce unsupported conversions). There names are fairly obvious, but I don’t have a running Asterisk system where I am at the moment.[/quote]