File format priority in playback


I have cases when the same prompt for playback exist in multiple formats (like ulaw, sln etc). Is there a way to know which format will Asterisk pick? Can I set the order of priority?


The one with the lowest cost in “core show translations”, given the target codec.

The order is fixed by the computed cost of the translation.

1 Like

I see. That’s make life complecated… If my core show channel xxx shows the following, what is the base codec, g722 or alaw?
NativeFormats: (alaw)
WriteFormat: g722
ReadFormat: alaw

The base codec, that is going out over the wire, is g722.

So, in the case bellow, the codec used over the wire is adpcm? And what is the meaning of the tanslation chain here?

NativeFormats: (alaw)
WriteFormat: adpcm
ReadFormat: alaw
WriteTranscode: Yes (adpcm@8000)->(slin@8000)->(alaw@8000)


Sorry, I thought I typed alaw instead of g722. Yeesh, one of those days. Here’s the key for information:

NativeFormats = what is going out over the wire
WriteFormat = what the current application or what is handling the channel is providing, which is translated to native format
ReadFormat = what the current application or what is handling the channel is expecting, which is translated from native format

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