<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9327">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip: Clarify certificate configuration for Websocket.<br><br>The Websocket transport uses the built-in HTTP server. As a result<br>the TLS configuration is done in http.conf and not in pjsip.conf.<br><br>This change adds a warning if this is configured in pjsip.conf and<br>also clarifies in the sample configuration file.<br><br>Change-Id: I187d994d328c3ed274b6754fd4c2a4955bdc6dd9<br>---<br>M configs/samples/pjsip.conf.sample<br>M res/res_pjsip/config_transport.c<br>2 files changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/9327/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configs/samples/pjsip.conf.sample b/configs/samples/pjsip.conf.sample</span><br><span>index 69576c1..fa80c6c 100644</span><br><span>--- a/configs/samples/pjsip.conf.sample</span><br><span>+++ b/configs/samples/pjsip.conf.sample</span><br><span>@@ -842,6 +842,10 @@</span><br><span> ;==========================TRANSPORT SECTION OPTIONS=========================</span><br><span> ;[transport]</span><br><span> ; SYNOPSIS: SIP Transport</span><br><span style="color: hsl(120, 100%, 40%);">+;</span><br><span style="color: hsl(120, 100%, 40%);">+; Note that for the Websocket transport the TLS configuration is configured</span><br><span style="color: hsl(120, 100%, 40%);">+; in http.conf and is applied for all HTTPS traffic.</span><br><span style="color: hsl(120, 100%, 40%);">+;</span><br><span> ;async_operations=1 ; Number of simultaneous Asynchronous Operations</span><br><span> ; (default: "1")</span><br><span> ;bind= ; IP Address and optional port to bind to for this transport (default:</span><br><span>diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c</span><br><span>index 55ef3c5..3ad4dcc 100644</span><br><span>--- a/res/res_pjsip/config_transport.c</span><br><span>+++ b/res/res_pjsip/config_transport.c</span><br><span>@@ -650,6 +650,9 @@</span><br><span> } else if ((transport->type == AST_TRANSPORT_WS) || (transport->type == AST_TRANSPORT_WSS)) {</span><br><span> if (transport->cos || transport->tos) {</span><br><span> ast_log(LOG_WARNING, "TOS and COS values ignored for websocket transport\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (!ast_strlen_zero(transport->ca_list_file) || !ast_strlen_zero(transport->ca_list_path) ||</span><br><span style="color: hsl(120, 100%, 40%);">+ !ast_strlen_zero(transport->cert_file) || !ast_strlen_zero(transport->privkey_file)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "TLS certificate values ignored for websocket transport as they are configured in http.conf\n");</span><br><span> }</span><br><span> res = PJ_SUCCESS;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9327">change 9327</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/9327"/><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: I187d994d328c3ed274b6754fd4c2a4955bdc6dd9 </div>
<div style="display:none"> Gerrit-Change-Number: 9327 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>