<div dir="ltr"><div dir="ltr">On Thu, Jan 30, 2020 at 4:55 AM Michael Maier <<a href="mailto:m1278468@mailbox.org">m1278468@mailbox.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">....<br>
<br>Could the planned codec handling globally described like this:<br>
<br></blockquote><div><br></div><div>Overall I think you have the gist of it. See below, though, for a couple of clarifications.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The codec handling is based on 4 lists.<br>
<br>
1. incoming_sdp_receive_prefs<br>
   This list is created based on the allow line<br>
   of the callers extension and the SDP offer of<br>
   the phone (local ...).<br>
<br>
   Or:<br>
<br>
   This list is created based on the SDP offer of<br>
   the caller and the allow line of the extension<br>
   (remote).<br>
<br>
   Codecs not given in the callers allow line are<br>
   dropped. Both list variants may have a<br>
   different codec order.<br>
<br>
<br>
2. outgoing_sdp_send_prefs<br>
   The list can be created on base of the callees<br>
   allow line and list 1 (option local ...).<br>
<br>
   Or:<br>
<br>
   The list can be created on base of list 1<br>
   (option remote ...) and the callees allow line.<br>
<br>
   Both lists may have a different codec order or<br>
   different codecs (if *_single is provided).<br>
<br>
   Codecs not given in the callees allow line or<br>
   list 1 are dropped (*_limit).<br>
<br></blockquote><div><br></div><div>This is mostly correct, but for clarification selecting the "remote" or "local" value will always only contain those codecs from the endpoint configuration allow line. Or another way to say it is the resulting list is the intersection of the two lists (list 1 and allow=) plus the codecs in the allow line that are not in list 1. The order will change depending on which value is used.</div><div><br></div><div>This means that if list 1 contains a codec not found in the endpoints allow= line then that codec will not be included in the resulting list. For example;</div><div><br></div><div>list 1 = opus,ulaw,alaw</div><div>allow= ulaw, alaw, g722</div><div><br></div><div>Then if "remote" or "local" is chosen then the resulting list will never have opus in it. Unless for some reason folks think it would make sense to make an offer to a device containing codec(s) that were not part of its Asterisk endpoint configuration definition.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3. outgoing_sdp_receive_prefs<br>
   The list is created based on the received SDP<br>
   and list 2 (remote ...).<br>
<br>
   Or:<br>
<br>
   The list is based on list 2 and the received<br>
   SDP.<br>
<br>
   These list variants may provide different codec<br>
   orders or different codecs (if *_single is<br>
   provided).<br>
<br>
   This list only contains codecs which can be<br>
   found in the received SDP and in list 2 at the<br>
   same time.<br>
<br>
<br>
4. incoming_sdp_send_prefs<br>
   This list is created based on list 3 and 1<br>
   (remote ...)<br>
<br>
   Or<br>
<br>
   the list is based on 1 and 3 (local ...).<br>
<br>
   The Codec order may differ between those<br>
   variants.<br>
<br>
   This list only contains codecs which can be<br>
   found in list 3 and 1 at the same time<br>
   (*_limit).<br>
<br></blockquote><div><br></div><div>Again this is mostly the case, but pretty much the same description from above applies here too, i.e. the resulting list will never have codecs in it that were not part of list 1.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Kevin Harwell<div>Senior Software Developer</div><div>Sangoma Technologies<br><div>Check us out at: <a href="https://sangoma.com/" target="_blank">https://sangoma.com</a> & <a href="https://asterisk.org" target="_blank">https://asterisk.org</a></div></div></div></div></div></div></div></div>