<p>Salah Ahmed has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10245">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Extra fingerprint attribute in SDP<br><br>If an endpoint is configured with following settings,<br><br>media_encryption = dtls<br>media_encryption_optimistic = yes<br>media_use_received_transport = yes<br><br>and if an incoming call don't have DTLS capability, then asterisk<br>answer this call with the fingerprint attribute in 200 Ok to A-Side<br>client.<br><br>ASTERISK-28067<br><br>Change-Id: I559ea4253f43ab9fc99dc1511b170f02edd4df6c<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 11 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/45/10245/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c</span><br><span>index 7c7040e..f2cac01 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -768,9 +768,11 @@</span><br><span> char transport_end = stream->desc.transport.ptr[stream->desc.transport.slen - 1];</span><br><span> unsigned int optimistic;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if ((transport_end == 'F' && !endpoint->media.rtp.use_avpf)</span><br><span style="color: hsl(0, 100%, 40%);">- || (transport_end != 'F' && endpoint->media.rtp.use_avpf)) {</span><br><span style="color: hsl(0, 100%, 40%);">- return AST_SIP_MEDIA_TRANSPORT_INVALID;</span><br><span style="color: hsl(120, 100%, 40%);">+ if(!endpoint->media.rtp.use_received_transport) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((transport_end == 'F' && !endpoint->media.rtp.use_avpf)</span><br><span style="color: hsl(120, 100%, 40%);">+ || (transport_end != 'F' && endpoint->media.rtp.use_avpf)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return AST_SIP_MEDIA_TRANSPORT_INVALID;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> }</span><br><span> </span><br><span> incoming_encryption = get_media_encryption_type(stream->desc.transport, stream, &optimistic);</span><br><span>@@ -779,7 +781,7 @@</span><br><span> return incoming_encryption;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (endpoint->media.rtp.force_avp ||</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((!endpoint->media.rtp.use_received_transport && endpoint->media.rtp.force_avp) ||</span><br><span> endpoint->media.rtp.encryption_optimistic) {</span><br><span> return incoming_encryption;</span><br><span> }</span><br><span>@@ -1014,14 +1016,14 @@</span><br><span> }</span><br><span> </span><br><span> /* Ensure incoming transport is compatible with the endpoint's configuration */</span><br><span style="color: hsl(0, 100%, 40%);">- if (!session->endpoint->media.rtp.use_received_transport) {</span><br><span style="color: hsl(0, 100%, 40%);">- encryption = check_endpoint_media_transport(session->endpoint, stream);</span><br><span style="color: hsl(120, 100%, 40%);">+ encryption = check_endpoint_media_transport(session->endpoint, stream);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (encryption == AST_SIP_MEDIA_TRANSPORT_INVALID) {</span><br><span style="color: hsl(0, 100%, 40%);">- return -1;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(120, 100%, 40%);">+ if (encryption == AST_SIP_MEDIA_TRANSPORT_INVALID) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ session_media->encryption = encryption;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ast_copy_pj_str(host, stream->conn ? &stream->conn->addr : &sdp->conn->addr, sizeof(host));</span><br><span> </span><br><span> /* Ensure that the address provided is valid */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10245">change 10245</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10245"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I559ea4253f43ab9fc99dc1511b170f02edd4df6c </div>
<div style="display:none"> Gerrit-Change-Number: 10245 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Salah Ahmed <txrubel@gmail.com> </div>