<div dir="ltr"><div>2. Under what conditions would we send a codec in an offer to a UAS (Bob) that <i><b>wasn't</b></i> in the UAS's endpoint allow= parameter. Similarly, under what conditions would we send a format to Bob that <b><i>was</i></b> in his endpoint allow= parameter but <b><i>wasn't</i></b> in the reconciled list we got from Alice via the core? Same possible options and questions as above.</div><div><br></div><div>I think there are use cases in the HD Voice domain. If Alice has HD voice in her offer, add HD Voice codecs to the offer sent to BOB. Otherwise only send the narrow band codecs. This is to avoid transcoding narrow band into wide band pointlessly. (The same would hold true for Video codecs)</div><div><br></div><div>3. OK now whatever we've decided to send to Bob, according to RFC3264
para 6.1, Bob MUST send back an answer that contains a common format OR
reject the stream if there are no formats in common. It doesn't say
whether it's valid for Bob to send back formats we didn't request <b><i>in addition </i></b>to
ones we did request. It wouldn't make sense for him to do that because
that same RFC and paragraph only says we MUST accept media in a format
we sent. It doesn't mention what should happen if we get media in a
format we <b><i>didn't</i></b> request. Based on this, unless someone
can give us a valid use case for this, and rules governing when it's
acceptable and when it's not, we do NOT plan on supporting receiving
media in a format we didn't request. We'd just drop the frames. If
Bob wants to use a format not in the offer, he should RE-INVITE.</div><div><br></div><div>I agree, I think this should be considered invalid and the frames dropped.<br></div><div><br></div><div>3. Bob can re-order the formats in his answer so I guess we need
another option to use the order we sent or the order we received before
we send it back to the core. Do we care about the order we got <i>from</i> the core or on Bob's endpoint any more? Hopefully not.<br><br></div><div>The deciding to use our order vis his order should be covered by the existing asymmetric_codecs flag shouldn't it?<br><br><div>4. Now we've got a list from the core and we need to send an
answer back to Alice... Do we need any sort alterations at all here or
can we just use what came from the core?<br></div><div>In the case of Video the answer to Alice needs to be filtered to only include the Video Codecs Bob as negotiated, otherwise the call will fail as asterisk cannot provide video transcoding. Also more generally, if Alice's endpoint has video enabled, but Bob rejected video. The answer to Alice should also reject video.<br></div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 3, 2020 at 10:18 PM George Joseph <<a href="mailto:gjoseph@digium.com">gjoseph@digium.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Greetings All,<div><br></div><div>We've been working hard on new codec negotiation stuff for Asterisk 18 and we've got some stuff to run by you. It's a lot so please read carefully.</div><div><br></div><div>To give you some idea of just how difficult a job this is, a simple call from Alice to Bob currently causes 8 attempts to reconcile codecs between them in app_dial, chan_pjsip, res_pjsip_session and res_pjsip_sdp_rtp. If you've noticed a recent addition of a SCOPE_TRACE facility for Asterisk being committed, this was the driver. It was also very enlightening. So we're trying to simplify things a little. Well, a lot. We've got some questions that we'd like answered with <i><b>real</b></i> use cases.</div><div><br></div><div>Simple use case, Alice to Bob, no direct media.</div><div><br></div><div>1. Under what conditions would we accept a format on an incoming offer from a UAC (Alice) that <i><b>wasn't</b></i> in the UAC's endpoint allow= parameter? Does whether we accept formats not on the endpoint need to be configurable? Don't just say "yes". :) We need use cases. We could use the offer's list exclusively, use the endpoint's list exclusively, merge the two together, or use only those in common. What happens if after applying that operation, there are no formats in common? Drop the call? Transocde? Using what format? It'd have to be one Alice accepts. We'll save the process of transcoding for a follow-on discussion.</div><div><br></div><div>2. Under what conditions would we send a codec in an offer to a UAS (Bob) that <i><b>wasn't</b></i> in the UAS's endpoint allow= parameter. Similarly, under what conditions would we send a format to Bob that <b><i>was</i></b> in his endpoint allow= parameter but <b><i>wasn't</i></b> in the reconciled list we got from Alice via the core? Same possible options and questions as above.</div><div><br></div><div>3. OK now whatever we've decided to send to Bob, according to RFC3264 para 6.1, Bob MUST send back an answer that contains a common format OR reject the stream if there are no formats in common. It doesn't say whether it's valid for Bob to send back formats we didn't request <b><i>in addition </i></b>to ones we did request. It wouldn't make sense for him to do that because that same RFC and paragraph only says we MUST accept media in a format we sent. It doesn't mention what should happen if we get media in a format we <b><i>didn't</i></b> request. Based on this, unless someone can give us a valid use case for this, and rules governing when it's acceptable and when it's not, we do NOT plan on supporting receiving media in a format we didn't request. We'd just drop the frames. If Bob wants to use a format not in the offer, he should RE-INVITE.</div><div><br></div><div>4. Now we've got Bob's answer and are passing it back to the core so we need to send an answer back to Alice. First, unless someone can give us a valid use case, we will never send Alice a format she didn't request in her offer so those will get removed. Based on options specified above though, the potential answer MAY contain formats NOT in Alice's endpoint allow= parameter. Same options and questions as "1".</div><div><br></div><div>Now let's talk about format preference order.</div><div><br></div><div>On the Alice to Bob side...</div><div>1. On Alice's incoming leg, after reconciling Alice's offer and Alice's endpoint, we can sort by Alice's preferred order or Alice's endpoint's preferred order based on configuration and send that order to the core.</div><div><br></div><div>2. On Bob's outgoing leg, after reconciling what came from the core and Bob's endpoint, we can also sort based on either and send that in the offer.</div><div><br></div><div>3. Bob can re-order the formats in his answer so I guess we need another option to use the order we sent or the order we received before we send it back to the core. Do we care about the order we got <i>from</i> the core or on Bob's endpoint any more? Hopefully not.</div><div><br></div><div>4. Now we've got a list from the core and we need to send an answer back to Alice... Do we need any sort alterations at all here or can we just use what came from the core?</div><div><br></div><div>One more thing to consider... Alice and Bob may <b><i>not</i></b> both be using a pjsip channel. In this case, the process can only be applied on the call leg that <i><b>is</b></i> pjsip. Let's say that Alice's leg is pjsip and Bob's isn't. We can make Alice's channel aware that Bob isn't capable of the advanced codec process but only after Bob's channel has been created so the process Alice runs when passing the list to the core won't know. The process that runs when constructing Alice's answer <i>will</i> know by virtue of <i>not getting anything</i> from the core because today there's no feedback at all from the core. On the flip side, if Alice is chan_sip and Bob is chan_pjsip, Bob <i>will</i> know whether what came from the core is "advanced" or not. Now the question is, given all that's talked about above, do the rules change depending on whether both channels are pjsip or not? Of course, if <i>neither</i> is pjsip, none of the above applies and the old process is used.</div><div><br></div><div>I know this is a lot to take in but I'd implore you to read thoroughly, respond with real life scenarios and ask questions if something isn't clear. We are NOT going to shove this into 18 without everyone understanding the implications, and if the process gets too complex, we'll NEVER put it in because it'll work no better and be no better understood than the current process.</div><div><br></div><div>THANKS!</div><div><br></div><div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">George Joseph</span><br></div></div><div dir="ltr" style="font-size:small"></div><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">Asterisk Software Developer</span><br></div><span style="color:rgb(7,55,99);font-family:tahoma,sans-serif;font-size:small">direct/fax +1 256 428 6012</span><br><div style="font-family:tahoma,sans-serif;font-size:small"><font color="#073763">Check us out at</font> <a href="http://www.sangoma.com/" style="color:rgb(17,85,204)" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br></div><div><img src="cid:ii_kazqalpp8" alt="image.png" width="230" height="40"><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div style="font-family:tahoma,sans-serif;font-size:small"></div></div></div></div></div></div></div></div></div></div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div>