Hi,
I am trying the following scenario: - Caller (Side A) supports: G722 PCMA PCMU G729
Callee (Side B) supports: PCMA PCMU G729
I have configured like this: rtpengine_offer("...codec-mask-opus codec-mask-G722 codec-mask-PCMA codec-mask-PCMU codec-mask-G729 transcode-PCMA transcode-PCMU transcode-G729")
But both sides end up on PCMA; where as I would like G722 for Caller side and PCMA for Callee's end and rtpengine should transcode between G722 to PCMA and vice versa.
Please can someone guide me.
Thanks
Regards Muhammad Zaka
-----Original Message----- From: sr-users [mailto:sr-users-bounces@lists.kamailio.org] On Behalf Of Richard Fuchs Sent: 20 February 2018 19:01 To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] RTPengine - Transcoding example available?
On 2018-02-20 05:46 AM, Denys Pozniak wrote:
Hello!
Please explain how to achive next:
Side A supports: OPUS PCMA
Side B supports: OPUS PCMA PCMU
I need to transcode in direction A->B from PCMA to OPUS? So should be like this: A(PCMA) -> (PCMA)Rtpengine(OPUS)->B(OPUS)
I configured like this: rtpengine_offer("codec-mask-PCMA codec-transcode-opus"); rtpengine_answer("codec-mask-opus codec-transcode-PCMA");
But leg from Rtpengine to A has wrong codec (OPUS): https://drive.google.com/file/d/14GAIt8lL7Igj9S95b_RS6CXtmGVhjLa1/view
You don't need to put any transcoding options into rtpengine_answer() - they should all go into rtpengine_offer()
Since A supports all codecs that B supports except PCMU, you can add PCMU into the offer going to B with:
rtpengine_offer("... transcode-PCMU")
But most likely both sides will end up talking Opus (without transcoding) since they both support it and it's listed first. If B ends up talking PCMU to rtpengine, it will transcode it to Opus as A doesn't support PCMA and Opus is first in its list. If either side ends up talking PCMA, it's also passed through without transcoding since both sides support it.
If you want to force PCMA on A's side and Opus on B's side, you need to:
1) accept PCMA from A, but don't offer it to B: codec-mask-PCMA 2) ignore that Opus was offered from A: codec-strip-opus 3) offer Opus to B: transcode-opus
Make sure you update your rtpengine code base as this use case has only just been implemented (previously the `transcode` option would simply negate the `codec-strip` which is not what you want). Full example:
rtpengine_offer("... ICE=remove codec-mask-PCMA codec-strip-opus transcode-opus")
Cheers
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users