How to use diffirent codecs in different directions

Hello everyone

Is it possible to configure Freepbx to use different codecs for call directions without using transcoding? For example: for calls to internal numbers, the g722 codec is used, for other directions alaw, ulaw

I tried to install the g722 codec on internal numbers in priority when calling internal numbers, everything works, but when I try to call an external line, transcoding is enabled.

I use FreePBX 15 and pjsip

Is it bad when trancoding is happening ?

Yes, sometimes the sound quality drops. And as I understand it transcoding loads the processor and the sound quality suffers

I found 2 articles. They say that this function is planned for implementation, but so far, as I understand it, it is still in the works…


Yes, the work is still in progress.

Realistically though if you’re strictly doing g722 and ulaw, that is not a costly conversion and quality is still fine.

1 Like

If I set the codec priority for the internal number: g722&alaw&ulaw, then when calling through a provider that uses the alaw&ulaw&g729 codecs, transcoding will be enabled. It turns out that at the moment you can’t do without using transcoding?

Not automatically in an intelligent way. There are some dialplan primitives[1] that can be used to control things to a degree, but it’s all up to you at that point and not something I’m aware that FreePBX does/uses.


Thanks for the answers!

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