<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10460">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Matthew Fredrickson: Looks good to me, approved
George Joseph: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip deprecation.<br><br>This officially deprecates chan_sip in Asterisk 17+. A warning is<br>printed upon startup or module load to tell users that they should<br>consider migrating. chan_sip is still built by default but the default<br>modules.conf skips loading it at startup.<br><br>Very important to note we are not scheduling a time where chan_sip will<br>be removed. The goal of this change is to accurately inform end users<br>of the current state of chan_sip and encourage movement to the fully<br>supported chan_pjsip.<br><br>Change-Id: Icebd8848f63feab94ef882d36b2e99d73155af93<br>---<br>M CHANGES<br>M UPGRADE.txt<br>M channels/chan_sip.c<br>M channels/sip/config_parser.c<br>M channels/sip/dialplan_functions.c<br>M channels/sip/reqresp_parser.c<br>M channels/sip/route.c<br>M channels/sip/security_events.c<br>M channels/sip/utils.c<br>M configs/samples/modules.conf.sample<br>10 files changed, 65 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/CHANGES b/CHANGES</span><br><span>index bd1a7a7..5bfdc54 100644</span><br><span>--- a/CHANGES</span><br><span>+++ b/CHANGES</span><br><span>@@ -9,6 +9,17 @@</span><br><span> ==============================================================================</span><br><span> </span><br><span> ------------------------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+--- Functionality changes from Asterisk 16 to Asterisk 17 --------------------</span><br><span style="color: hsl(120, 100%, 40%);">+------------------------------------------------------------------------------</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+chan_sip</span><br><span style="color: hsl(120, 100%, 40%);">+------------------</span><br><span style="color: hsl(120, 100%, 40%);">+ * The chan_sip module is now deprecated, users should migrate to the</span><br><span style="color: hsl(120, 100%, 40%);">+ replacement module chan_pjsip. See guides at the Asterisk Wiki:</span><br><span style="color: hsl(120, 100%, 40%);">+ https://wiki.asterisk.org/wiki/x/tAHOAQ</span><br><span style="color: hsl(120, 100%, 40%);">+ https://wiki.asterisk.org/wiki/x/hYCLAQ</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+------------------------------------------------------------------------------</span><br><span> --- Functionality changes from Asterisk 16.0.0 to Asterisk 16.1.0 ------------</span><br><span> ------------------------------------------------------------------------------</span><br><span> </span><br><span>diff --git a/UPGRADE.txt b/UPGRADE.txt</span><br><span>index 7506af2..3cf8e27 100644</span><br><span>--- a/UPGRADE.txt</span><br><span>+++ b/UPGRADE.txt</span><br><span>@@ -27,6 +27,12 @@</span><br><span> </span><br><span> New in 17.0.0:</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+chan_sip:</span><br><span style="color: hsl(120, 100%, 40%);">+ - The chan_sip module is now deprecated, users should migrate to the</span><br><span style="color: hsl(120, 100%, 40%);">+ replacement module chan_pjsip. See guides at the Asterisk Wiki:</span><br><span style="color: hsl(120, 100%, 40%);">+ https://wiki.asterisk.org/wiki/x/tAHOAQ</span><br><span style="color: hsl(120, 100%, 40%);">+ https://wiki.asterisk.org/wiki/x/hYCLAQ</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> func_callerid:</span><br><span> - The CALLERPRES() dialplan function, deprecated in Asterisk 1.8, has been</span><br><span> removed.</span><br><span>diff --git a/channels/chan_sip.c b/channels/chan_sip.c</span><br><span>index 5097d46..3aae905 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -176,7 +176,7 @@</span><br><span> /*** MODULEINFO</span><br><span> <use type="module">res_crypto</use></span><br><span> <use type="module">res_http_websocket</use></span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> /*! \page sip_session_timers SIP Session Timers in Asterisk Chan_sip</span><br><span>@@ -35321,6 +35321,37 @@</span><br><span> .sipinfo_send = sipinfo_send,</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static void deprecation_notice(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "chan_sip has no official maintainer and is deprecated. Migration to\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "chan_pjsip is recommended. See guides at the Asterisk Wiki:\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "https://wiki.asterisk.org/wiki/x/tAHOAQ\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "https://wiki.asterisk.org/wiki/x/hYCLAQ\n");</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! \brief Event callback which indicates we're fully booted */</span><br><span style="color: hsl(120, 100%, 40%);">+static void startup_event_cb(void *data, struct stasis_subscription *sub, struct stasis_message *message)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_json_payload *payload;</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *type;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (stasis_message_type(message) != ast_manager_get_generic_type()) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ payload = stasis_message_data(message);</span><br><span style="color: hsl(120, 100%, 40%);">+ type = ast_json_string_get(ast_json_object_get(payload->json, "type"));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (strcmp(type, "FullyBooted")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ deprecation_notice();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ stasis_unsubscribe(sub);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static int unload_module(void);</span><br><span> </span><br><span> /*!</span><br><span>@@ -35534,6 +35565,12 @@</span><br><span> ast_websocket_add_protocol("sip", sip_websocket_callback);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_fully_booted) {</span><br><span style="color: hsl(120, 100%, 40%);">+ deprecation_notice();</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ stasis_subscribe_pool(ast_manager_get_topic(), startup_event_cb, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> return AST_MODULE_LOAD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span>@@ -35751,7 +35788,7 @@</span><br><span> }</span><br><span> </span><br><span> AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Session Initiation Protocol (SIP)",</span><br><span style="color: hsl(0, 100%, 40%);">- .support_level = AST_MODULE_SUPPORT_CORE,</span><br><span style="color: hsl(120, 100%, 40%);">+ .support_level = AST_MODULE_SUPPORT_DEPRECATED,</span><br><span> .load = load_module,</span><br><span> .unload = unload_module,</span><br><span> .reload = reload,</span><br><span>diff --git a/channels/sip/config_parser.c b/channels/sip/config_parser.c</span><br><span>index 211f600..64cb66a 100644</span><br><span>--- a/channels/sip/config_parser.c</span><br><span>+++ b/channels/sip/config_parser.c</span><br><span>@@ -20,7 +20,7 @@</span><br><span> */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span>diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c</span><br><span>index 09804ce..7c34fc9 100644</span><br><span>--- a/channels/sip/dialplan_functions.c</span><br><span>+++ b/channels/sip/dialplan_functions.c</span><br><span>@@ -20,7 +20,7 @@</span><br><span> */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> /*** DOCUMENTATION</span><br><span>diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c</span><br><span>index 4d91446..b43bed6 100644</span><br><span>--- a/channels/sip/reqresp_parser.c</span><br><span>+++ b/channels/sip/reqresp_parser.c</span><br><span>@@ -20,7 +20,7 @@</span><br><span> */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span>diff --git a/channels/sip/route.c b/channels/sip/route.c</span><br><span>index 584b46b..916c3af 100644</span><br><span>--- a/channels/sip/route.c</span><br><span>+++ b/channels/sip/route.c</span><br><span>@@ -20,7 +20,7 @@</span><br><span> */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span>diff --git a/channels/sip/security_events.c b/channels/sip/security_events.c</span><br><span>index 86ba413..eabc904 100644</span><br><span>--- a/channels/sip/security_events.c</span><br><span>+++ b/channels/sip/security_events.c</span><br><span>@@ -25,7 +25,7 @@</span><br><span> */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span>diff --git a/channels/sip/utils.c b/channels/sip/utils.c</span><br><span>index 45a4128..d53316c 100644</span><br><span>--- a/channels/sip/utils.c</span><br><span>+++ b/channels/sip/utils.c</span><br><span>@@ -22,7 +22,7 @@</span><br><span> */</span><br><span> </span><br><span> /*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>extended</support_level></span><br><span style="color: hsl(120, 100%, 40%);">+ <support_level>deprecated</support_level></span><br><span> ***/</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span>diff --git a/configs/samples/modules.conf.sample b/configs/samples/modules.conf.sample</span><br><span>index c6c0dbc..793245d 100644</span><br><span>--- a/configs/samples/modules.conf.sample</span><br><span>+++ b/configs/samples/modules.conf.sample</span><br><span>@@ -41,4 +41,6 @@</span><br><span> noload => res_hep.so</span><br><span> noload => res_hep_pjsip.so</span><br><span> noload => res_hep_rtcp.so</span><br><span style="color: hsl(0, 100%, 40%);">-;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+; Do not load chan_sip by default, it may conflict with res_pjsip.</span><br><span style="color: hsl(120, 100%, 40%);">+noload => chan_sip.so</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10460">change 10460</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/10460"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Icebd8848f63feab94ef882d36b2e99d73155af93 </div>
<div style="display:none"> Gerrit-Change-Number: 10460 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>