On 21/05/2019 18.42, Carsten Bock wrote:
Hi Richard,
Thanks for your reply, understood.
The issue is following (not really an issue, more an optimization): At the moment of the offer, I simply don't know, what will be supported by the callee. G711 is however always supported, that's why I don't want to strip it. I send the call to our upstream provider; if he sends it to Telefonica, we get an answer with G722 and G711. If he sends it to Deutsche Telekom, the answer is only G711. However, we don't know, if it's gonna be Telefonica or Deutsche Telekom...
I was thinking about avoiding uneccessary RTP traffic (in HD) between RTPEngine and the device in case of an outbound call. From a signalling perspective, I get the right result, if I use sdp_remove_codecs() in my reply. However, that won't work, since the RTP stream sent from RTPEngine to the device is in HD, regardless of the signalling.
Maybe you want to make your transcoding options also dependent on whether G.711 was present in the original offer, and/or in what order the codecs were listed? Rtpengine won't do transcoding if both sides support the same codec, even if other codec pairings are possible (unless `always-transcode` is given). Are you using that option? Are you using other options to reorder codecs in the offer? Because normally the first supported codec will be used, and rtpengine adds transcoding codec offers to the end of the list. So they should only be used if no other codec is supported by the callee, unless the callee ignores the listed codec preferences, or codecs were reordered, or `always-transcode` was used.
Cheers