<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="DE-AT" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Thanks Joshua for the quick answer!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I may put some investigation effort into this after the holidays regarding the known-issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">For now we “help” ourselves by dropping the second 183 Session progress in Kamailio to mitigate the issue that arises in the second scenario.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Best regards!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">Von: </span></b><span style="font-size:12.0pt;color:black">asterisk-users <asterisk-users-bounces@lists.digium.com> im Auftrag von "Joshua C. Colp" <jcolp@sangoma.com><br>
<b>Antworten an: </b>Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Datum: </b>Donnerstag, 17. Dezember 2020 um 15:22<br>
<b>An: </b>Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Betreff: </b>[External] Re: [asterisk-users] Multiple 183 Session Progress for a single call<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div style="mso-element:para-border-div;border:solid #9C6500 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt;background:#FFEB9C">
<p style="background:#FFEB9C;border:none;padding:0cm"><b><span style="font-size:10.0pt;color:black">CAUTION:</span></b><span style="color:black">
</span><span style="font-size:10.0pt;color:black">This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.</span><o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Thu, Dec 17, 2020 at 10:14 AM Floimair Florian <<a href="mailto:f.floimair@commend.com">f.floimair@commend.com</a>> wrote:<o:p></o:p></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi List!<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I am running into an „issue” that I cannot really explain.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I have a call from Station A to Station B with both legs connected to Asterisk via Kamailio.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Asterisk used is latest 18.1.0 with chan_pjsip.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Station A -> Kamailio -> Asterisk -> Kamailio -> Station B</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Now when Station B gets the INVITE it answers with 183 Session Progress to initiate Early Media.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">However Asterisk not only passes this 183 Session Progress on to Station A, it creates a second 183 Session Progress with basically the same</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Content (only some Header lines might have switched position but their content is identical) to Station A.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">The first question that comes to mind is:<br>
Why does Asterisk send the second 183 Session Progress in the first place (it did not get anything from Station A or Station B that would explain this)?</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There is already an open issue for this[1], but noone has worked on it as of yet.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">And in turn this leads to an issue if I replace station A with another Asterisk and put station A behind this Asterisk.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Station A -> Asterisk2 -> Kamailio -> Asterisk -> Kamailio -> Station B</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">In that case whatever was in the SDP of the first 183 Session Progress (e.g. audio=recvonly video=inactive) will cause the second Asterisk to put both media streams
 to sendrecv, and starts sending RTP packets from Station A for both audio and video which clearly is a bug in Asterisk. By the way we tested with different versions from the latest 18 back to an early 16 version. They all show this behaviour.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">To recap both 183 Session Progress contain the same SDP, the first one leads to wanted behaviour, the second one causes Asterisk to send both audio and video
 even though it shouldn’t.</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I can't say for certainty, but this is likely because of the way codec and stream negotiation in Asterisk works. Each leg is independent (negotiated between Asterisk and an endpoint), and the result of an outgoing leg (be it from a 200
 OK or 183 Session Progress) is not forwarded to the calling side. There is continued work being done to improve this so in the future it could become smarter, but it is not yet there.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[1] <a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fissues.asterisk.org%2Fjira%2Fbrowse%2FASTERISK-28185&data=04%7C01%7Cf.floimair%40commend.com%7C581d516089c74644460b08d8a29722b2%7C13b1ddb756454e7fbe663171548559da%7C0%7C0%7C637438117312983378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=e9eGkOstRp1NKZfY%2B315NUitngFoT%2FZ8WoIOd0BDcDk%3D&reserved=0">issues.asterisk.org/jira/browse/ASTERISK-28185</a> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"tahoma",sans-serif;color:#073763">Joshua C. Colp</span><span style="font-family:"tahoma",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"tahoma",sans-serif;color:#073763">Asterisk Technical Lead</span><span style="font-family:"tahoma",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"tahoma",sans-serif;color:#073763">Sangoma Technologies</span><span style="font-family:"tahoma",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"tahoma",sans-serif;color:#073763">Check us out at
<a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.sangoma.com%2F&data=04%7C01%7Cf.floimair%40commend.com%7C581d516089c74644460b08d8a29722b2%7C13b1ddb756454e7fbe663171548559da%7C0%7C0%7C637438117312993368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SMKjlwzSYhg1NWEdQh3xX%2B5lWaRrQecP4Zpu%2B93e9tI%3D&reserved=0" target="_blank">
www.sangoma.com</a> and <a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asterisk.org%2F&data=04%7C01%7Cf.floimair%40commend.com%7C581d516089c74644460b08d8a29722b2%7C13b1ddb756454e7fbe663171548559da%7C0%7C0%7C637438117313003365%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=De%2F%2FLAVHAPL2%2F7tg5n4DBQ%2F4ra%2BVX7kkGVrVFw3na50%3D&reserved=0" target="_blank">
www.asterisk.org</a></span><span style="font-family:"tahoma",sans-serif"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>