<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 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=us-ascii">
<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:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.sipsdpimportantparam
        {mso-style-name:sipsdpimportantparam;}
span.sipsdpequals
        {mso-style-name:sipsdpequals;}
span.sipsdpadiovideo
        {mso-style-name:sipsdpadiovideo;}
span.sipsdpipport
        {mso-style-name:sipsdpipport;}
span.sipsdpvalue
        {mso-style-name:sipsdpvalue;}
span.sipsdpcodecip
        {mso-style-name:sipsdpcodecip;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am attempting to get optional SRTP to work based on rfc 8643.  I have found that I can configure FreeSWITCH to allow for crypto in RTP/AVP, but I don’t seem to get it to work fully.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve used the configuration elements rtp_allow_crypto_in_avp and  NDLB-allow-crypto-in-avp.  Both give me the same results but neither fully works.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I found in the archives another person who experienced this same issue.  It was in October of 2018 and is titled ‘Accepting an “optional” SRTP offer (crypto in RTP/AVP) and establishing SRTP’.  In that case, he was using version 1.6.20. 
 From the responses, it seemed like in 1.8.2 it was possibly supposed to be working.  I’m using 1.8.5 and I have tried it in 1.10.3 as well but they both seem to behave the same. 
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A recap of what is in the SDP offer and the SDP answer are as follows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The endpoint is signaling optional SRTP according to rfc 8643 by sending a crypto token or a fingerprint in the SDP for a media descriptor that is signaled as RTP/AVP.<o:p></o:p></p>
<p class="MsoNormal">                <i>m=audio 58702 RTP/AVP 0 8 101<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>c=IN IP4 65.37.249.200<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>b=AS:64<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=rtpmap:0 PCMU/8000<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=rtpmap:8 PCMA/8000<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=rtpmap:101 telephone-event/8000<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=ptime:30<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:8u1pUNOnFJUWKAa25GEtyFnHebV6AHrdpDgZ47nYBU6AtxlWiECv+RZPOSjW5g==<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=crypto:2 AES_CM_128_HMAC_SHA1_80 inline:q3iDyAquDcVye5MVFF4NR2Krli3PdmSwxMKGFK8D<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=setup:active<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=fingerprint:sha-1 5F:29:44:20:8A:CB:81:1C:DC:9B:B0:C6:4D:EB:01:C1:6B:B8:CE:8E<o:p></o:p></i></p>
<p class="MsoNormal"><i><o:p> </o:p></i></p>
<p class="MsoNormal">I can see in the console log that the initially prepared SDP answer contains an m-line with RTP/SAVP and it also contains the selected crypto attribute for the response. 
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><i>m=audio 25190 RTP/SAVP 0 101<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=rtpmap:0 PCMU/8000<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=rtpmap:101 telephone-event/8000<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=fmtp:101 0-16<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=ptime:30<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=sendrecv<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:.5in"><i>a=crypto:2 AES_CM_128_HMAC_SHA1_80 inline:JfypK+0Vu1y6WXx0B/hhARVcvzYmO0Tt3xRJGx3o</i><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yet before it is sent, it is changed to have the media channels disabled.<o:p></o:p></p>
<p class="MsoNormal">                <i>m=audio 0 RTP/AVP 19 <o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What else do I need to do to get this to work with optional encryption coming in the SDP-Offer?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Eugene Christensen<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:navy">CONFIDENTIALITY NOTICE.</span></b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:navy"> This e-mail transmission, and any documents, files or
 previous e-mail messages attached to it, may contain confidential and proprietary information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying,
 distribution or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify me by reply e-mail at
</span><a href="mailto:echristensen@sorenson.com"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:blue">echristensen@sorenson.com</span></a><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:navy"> or by telephone at +1 (801)
 287-9419, and destroy the original transmission and its attachments without reading them or saving them to disk.</span><span style="font-size:8.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>