<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
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="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<div>
<div>
<div>
<p class="MsoNormal">Hi List!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I am running into an „issue” that I cannot really explain.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have a call from Station A to Station B with both legs connected to Asterisk via Kamailio.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Asterisk used is latest 18.1.0 with chan_pjsip.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Station A -> Kamailio -> Asterisk -> Kamailio -> Station B<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Now when Station B gets the INVITE it answers with 183 Session Progress to initiate Early Media.<o:p></o:p></span></p>
<p class="MsoNormal"><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<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Content (only some Header lines might have switched position but their content is identical) to Station A.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><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)?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Station A -> Asterisk2 -> Kamailio -> Asterisk -> Kamailio -> Station B<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><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.<o:p></o:p></span></p>
<p class="MsoNormal"><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.<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>