[asterisk-dev] Asterisk 18 Planning: Codec Negotiation

Michael Maier m1278468 at mailbox.org
Thu Jan 30 04:54:43 CST 2020


On 29.01.20 at 22:44 Kevin Harwell wrote:
> Ugh I used the wrong keyboard shortcuts and the message sent before I was
> done. Below is the rest :-)
> 
> On Wed, Jan 29, 2020 at 3:42 PM Kevin Harwell <kharwell at digium.com> wrote:
> 
>> On Wed, Jan 29, 2020 at 3:12 PM Michael Maier <m1278468 at mailbox.org>
>> wrote:
>>
>>>
>>>
>>
>>> ....
>>>
>>> From my point of view, it should always be possible to prevent
>>> transcoding as long as there is one codec which can be used on both
>>> sides. If there is more than one codec equal on both sides, it's good to
>>> have the possibility by your planned options if the local or the remote
>>> most preferred codec should be used.
>>>
>>> Default configuration for me would be like that:
>>> incoming_sdp_receive_prefs=local
>>> outgoing_sdp_send_prefs=remote
>>> outgoing_sdp_receive_prefs=local
>>> incoming_sdp_send_prefs=local
>>> transcode=avoid
>>>
>>> From my understanding, this should avoid any unnecessary transcoding as
>>> long as there's just one common codec on both sides and should always
>>> prefer the codecs desired by the caller.
>>>
>>> Did I got this correctly?
>>>
>>
>> We're still working through the idea of the "transcode" option, and how it
>> might work in practice. But what you have is the general idea. To better
>> avoid it, in the setup you have above I'd probably modify the following:
>>
> 
> incoming_sdp_send_prefs=remote
> 
> This would send in the answer to Alice the exact order preferred by Bob. If
> Alice accepts then Asterisk should never transcode.

Thanks! That's true. Probably even better remote_limit (even for
outgoing_sdp_send_prefs).


Could the planned codec handling globally described like this:


The codec handling is based on 4 lists.

1. incoming_sdp_receive_prefs
   This list is created based on the allow line
   of the callers extension and the SDP offer of
   the phone (local ...).

   Or:

   This list is created based on the SDP offer of
   the caller and the allow line of the extension
   (remote).

   Codecs not given in the callers allow line are
   dropped. Both list variants may have a
   different codec order.


2. outgoing_sdp_send_prefs
   The list can be created on base of the callees
   allow line and list 1 (option local ...).

   Or:

   The list can be created on base of list 1
   (option remote ...) and the callees allow line.

   Both lists may have a different codec order or
   different codecs (if *_single is provided).

   Codecs not given in the callees allow line or
   list 1 are dropped (*_limit).


3. outgoing_sdp_receive_prefs
   The list is created based on the received SDP
   and list 2 (remote ...).

   Or:

   The list is based on list 2 and the received
   SDP.

   These list variants may provide different codec
   orders or different codecs (if *_single is
   provided).

   This list only contains codecs which can be
   found in the received SDP and in list 2 at the
   same time.


4. incoming_sdp_send_prefs
   This list is created based on list 3 and 1
   (remote ...)

   Or

   the list is based on 1 and 3 (local ...).

   The Codec order may differ between those
   variants.

   This list only contains codecs which can be
   found in list 3 and 1 at the same time
   (*_limit).


Thanks
Michael



More information about the asterisk-dev mailing list