Codec translation

Codec translation occurs when Smartswitch has negotiated to use codec A with the originator, and codec B with the terminator.
After that, in order for peers to hear each other, Smartswitch must perform transcoding A <-> B in real time.

Codec translation is a very CPU-intensive operation.
In addition, it almost always leads to a deterioration in the quality of the transmitted audio.
It should be avoided whenever possible.

There are 2 possible approaches to configuring codec negotiation:

The peer chooses the codec.

With this approach, you specify the list of acceptable codecs in the peer settings in Smartswitch.
This list may not completely overlap with the list of actually supported codecs of the partner.
This may be relevant if you are not sure exactly what codecs the peer supports.
When setting up an outgoing call, Smartswitch offers the peer all configured codecs.
The peer chooses one of the proposed codecs, while he can either take into account the priority offered by Smartswitch, or choose the codec at his own discretion - Smartswitch cannot influence his decision in any way.
This approach can lead to the fact that peers choose different codecs for the incoming leg and outgoing leg, and Smartswitch will be forced to perform codec transcoding.
This mode works by default, since it is assumed that the Smartswitch administrator usually does not want to find out exactly what codecs the partner supports when configuring a peer and carefully fill in the list of codecs for a peer.

Smartswitch selects the codec.

With this approach, Smartswitсh independently selects the most suitable codec, so that codec translation is not activated.
And when making an outgoing call, it offers only the selected codec.
Smartswitch selects the codec according to the configured list of codecs.
To enable this mode, enable the "preferred codec only" option in the peer settings, for which you are sure that the codec list is configured correctly.
It is preferable to use this mode, but it requires more attention during setup to configure the exact list of codecs that the partner supports.
For example, if you inadvertently configure support for G.729 and G.711 ulaw for a peer, and the peer only supports G.711 ulaw, then Smartswitch can select G.729 for the next call, and the peer will discard it, since he does not support G.729 ...

preferred codec only on originator preferred codec only on terminator configured codecs on originator configured codecs on terminator codecs in SDP originator -> Smartswitch codecs in SDP Smartswitch -> originator codecs in SDP Smartswitch -> terminator
no yes ulaw g729 ulaw ulaw g729
yes yes ulaw g729 ulaw ulaw g729
yes yes ulaw g729, ulaw ulaw ulaw ulaw
yes yes g729, ulaw ulaw, alaw g729, ulaw ulaw ulaw
yes yes g729, ulaw ulaw, g729 g729, ulaw ulaw ulaw
yes yes g729, ulaw alaw, gsm g729, ulaw ulaw alaw (ulaw <-> alaw = 9150 us)
yes yes g729, ulaw gsm, alaw g729, ulaw ulaw alaw
yes yes g729, ulaw gsm, g729 g729, ulaw g729 g729

Русский перевод