<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14327">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core_local: Local calls are always secure.<br><br>In a Dialplan, the channel drivers 'chan_sip' and 'chan_iax2' support<br>the channel items 'secure_bridge_media' and 'secure_bridge_signaling'.<br>That way, a channel can be forced to use encryption even if not<br>specified in its configuration.<br><br>However, when the Local Proxy kicks in, for example, in case of a<br>forwarding (SIP status 302), Local Proxy stated it does not know those<br>items. Consequently, such a call could not be proxied how clever your<br>Dialplan was. Because local calls within Asterisk are always secure,<br>Local Proxy accepts such a request now.<br><br>ASTERISK-22920<br><br>Change-Id: I4c143bb70f686790953cc04c5a4b810bbb03636c<br>---<br>M main/core_local.c<br>1 file changed, 13 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/14327/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/core_local.c b/main/core_local.c</span><br><span>index ae28106..0193c71 100644</span><br><span>--- a/main/core_local.c</span><br><span>+++ b/main/core_local.c</span><br><span>@@ -142,6 +142,7 @@</span><br><span> static void local_optimization_started_cb(struct ast_unreal_pvt *base, struct ast_channel *source,</span><br><span>              enum ast_unreal_channel_indicator dest, unsigned int id);</span><br><span> static void local_optimization_finished_cb(struct ast_unreal_pvt *base, int success, unsigned int id);</span><br><span style="color: hsl(120, 100%, 40%);">+static int local_setoption(struct ast_channel *chan, int option, void *data, int datalen);</span><br><span> </span><br><span> static struct ast_manager_event_blob *local_message_to_ami(struct stasis_message *msg);</span><br><span> </span><br><span>@@ -185,7 +186,7 @@</span><br><span>     .send_text = ast_unreal_sendtext,</span><br><span>    .devicestate = local_devicestate,</span><br><span>    .queryoption = ast_unreal_queryoption,</span><br><span style="color: hsl(0, 100%, 40%);">-  .setoption = ast_unreal_setoption,</span><br><span style="color: hsl(120, 100%, 40%);">+    .setoption = local_setoption,</span><br><span> };</span><br><span> </span><br><span> /*! What to do with the ;2 channel when ast_call() happens. */</span><br><span>@@ -1083,3 +1084,14 @@</span><br><span>   ast_register_cleanup(local_shutdown);</span><br><span>        return 0;</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int local_setoption(struct ast_channel *ast, int option, void *data, int datalen)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        switch (option) {</span><br><span style="color: hsl(120, 100%, 40%);">+     case AST_OPTION_SECURE_SIGNALING:</span><br><span style="color: hsl(120, 100%, 40%);">+     case AST_OPTION_SECURE_MEDIA:</span><br><span style="color: hsl(120, 100%, 40%);">+                 return 0; /* local calls (like forwardings) are secure always */</span><br><span style="color: hsl(120, 100%, 40%);">+      default:</span><br><span style="color: hsl(120, 100%, 40%);">+                      return ast_unreal_setoption(ast, option, data, datalen);</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14327">change 14327</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/c/asterisk/+/14327"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4c143bb70f686790953cc04c5a4b810bbb03636c </div>
<div style="display:none"> Gerrit-Change-Number: 14327 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>