<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16293">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_url: Remove deprecated module.<br><br>ASTERISK-29588<br><br>Change-Id: If846d40b37c5b646bcd7326111db280529a5971b<br>---<br>D apps/app_url.c<br>A doc/UPGRADE-staging/app_url_removal.txt<br>2 files changed, 6 insertions(+), 182 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/93/16293/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_url.c b/apps/app_url.c</span><br><span>deleted file mode 100644</span><br><span>index 08e1ec5..0000000</span><br><span>--- a/apps/app_url.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,182 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * Asterisk -- An open source telephony toolkit.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (C) 1999 - 2005, Digium, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Mark Spencer <markster@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * See http://www.asterisk.org for more information about</span><br><span style="color: hsl(0, 100%, 40%);">- * the Asterisk project. Please do not directly contact</span><br><span style="color: hsl(0, 100%, 40%);">- * any of the maintainers of this project for assistance;</span><br><span style="color: hsl(0, 100%, 40%);">- * the project provides a web site, mailing lists and IRC</span><br><span style="color: hsl(0, 100%, 40%);">- * channels for your use.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software, distributed under the terms of</span><br><span style="color: hsl(0, 100%, 40%);">- * the GNU General Public License Version 2. See the LICENSE file</span><br><span style="color: hsl(0, 100%, 40%);">- * at the top of the source tree.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/*! \file</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * \brief App to transmit a URL</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * \author Mark Spencer <markster@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * \ingroup applications</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/*** MODULEINFO</span><br><span style="color: hsl(0, 100%, 40%);">- <support_level>deprecated</support_level></span><br><span style="color: hsl(0, 100%, 40%);">- <deprecated_in>16</deprecated_in></span><br><span style="color: hsl(0, 100%, 40%);">- <removed_in>19</removed_in></span><br><span style="color: hsl(0, 100%, 40%);">- ***/</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include "asterisk.h"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include "asterisk/pbx.h"</span><br><span style="color: hsl(0, 100%, 40%);">-#include "asterisk/module.h"</span><br><span style="color: hsl(0, 100%, 40%);">-#include "asterisk/app.h"</span><br><span style="color: hsl(0, 100%, 40%);">-#include "asterisk/channel.h"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/*** DOCUMENTATION</span><br><span style="color: hsl(0, 100%, 40%);">- <application name="SendURL" language="en_US"></span><br><span style="color: hsl(0, 100%, 40%);">- <synopsis></span><br><span style="color: hsl(0, 100%, 40%);">- Send a URL.</span><br><span style="color: hsl(0, 100%, 40%);">- </synopsis></span><br><span style="color: hsl(0, 100%, 40%);">- <syntax></span><br><span style="color: hsl(0, 100%, 40%);">- <parameter name="URL" required="true" /></span><br><span style="color: hsl(0, 100%, 40%);">- <parameter name="option"></span><br><span style="color: hsl(0, 100%, 40%);">- <optionlist></span><br><span style="color: hsl(0, 100%, 40%);">- <option name="w"></span><br><span style="color: hsl(0, 100%, 40%);">- <para>Execution will wait for an acknowledgement that the</span><br><span style="color: hsl(0, 100%, 40%);">- URL has been loaded before continuing.</para></span><br><span style="color: hsl(0, 100%, 40%);">- </option></span><br><span style="color: hsl(0, 100%, 40%);">- </optionlist></span><br><span style="color: hsl(0, 100%, 40%);">- </parameter></span><br><span style="color: hsl(0, 100%, 40%);">- </syntax></span><br><span style="color: hsl(0, 100%, 40%);">- <description></span><br><span style="color: hsl(0, 100%, 40%);">- <para>Requests client go to <replaceable>URL</replaceable> (IAX2) or sends the</span><br><span style="color: hsl(0, 100%, 40%);">- URL to the client (other channels).</para></span><br><span style="color: hsl(0, 100%, 40%);">- <para>Result is returned in the <variable>SENDURLSTATUS</variable> channel variable:</para></span><br><span style="color: hsl(0, 100%, 40%);">- <variablelist></span><br><span style="color: hsl(0, 100%, 40%);">- <variable name="SENDURLSTATUS"></span><br><span style="color: hsl(0, 100%, 40%);">- <value name="SUCCESS"></span><br><span style="color: hsl(0, 100%, 40%);">- URL successfully sent to client.</span><br><span style="color: hsl(0, 100%, 40%);">- </value></span><br><span style="color: hsl(0, 100%, 40%);">- <value name="FAILURE"></span><br><span style="color: hsl(0, 100%, 40%);">- Failed to send URL.</span><br><span style="color: hsl(0, 100%, 40%);">- </value></span><br><span style="color: hsl(0, 100%, 40%);">- <value name="NOLOAD"></span><br><span style="color: hsl(0, 100%, 40%);">- Client failed to load URL (wait enabled).</span><br><span style="color: hsl(0, 100%, 40%);">- </value></span><br><span style="color: hsl(0, 100%, 40%);">- <value name="UNSUPPORTED"></span><br><span style="color: hsl(0, 100%, 40%);">- Channel does not support URL transport.</span><br><span style="color: hsl(0, 100%, 40%);">- </value></span><br><span style="color: hsl(0, 100%, 40%);">- </variable></span><br><span style="color: hsl(0, 100%, 40%);">- </variablelist></span><br><span style="color: hsl(0, 100%, 40%);">- <para>SendURL continues normally if the URL was sent correctly or if the channel</span><br><span style="color: hsl(0, 100%, 40%);">- does not support HTML transport. Otherwise, the channel is hung up.</para></span><br><span style="color: hsl(0, 100%, 40%);">- </description></span><br><span style="color: hsl(0, 100%, 40%);">- <see-also></span><br><span style="color: hsl(0, 100%, 40%);">- <ref type="application">SendImage</ref></span><br><span style="color: hsl(0, 100%, 40%);">- <ref type="application">SendText</ref></span><br><span style="color: hsl(0, 100%, 40%);">- </see-also></span><br><span style="color: hsl(0, 100%, 40%);">- </application></span><br><span style="color: hsl(0, 100%, 40%);">- ***/</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static char *app = "SendURL";</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-enum option_flags {</span><br><span style="color: hsl(0, 100%, 40%);">- OPTION_WAIT = (1 << 0),</span><br><span style="color: hsl(0, 100%, 40%);">-};</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-AST_APP_OPTIONS(app_opts,{</span><br><span style="color: hsl(0, 100%, 40%);">- AST_APP_OPTION('w', OPTION_WAIT),</span><br><span style="color: hsl(0, 100%, 40%);">-});</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static int sendurl_exec(struct ast_channel *chan, const char *data)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- int res = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- char *tmp;</span><br><span style="color: hsl(0, 100%, 40%);">- struct ast_frame *f;</span><br><span style="color: hsl(0, 100%, 40%);">- char *status = "FAILURE";</span><br><span style="color: hsl(0, 100%, 40%);">- char *opts[0];</span><br><span style="color: hsl(0, 100%, 40%);">- struct ast_flags flags = { 0 };</span><br><span style="color: hsl(0, 100%, 40%);">- AST_DECLARE_APP_ARGS(args,</span><br><span style="color: hsl(0, 100%, 40%);">- AST_APP_ARG(url);</span><br><span style="color: hsl(0, 100%, 40%);">- AST_APP_ARG(options);</span><br><span style="color: hsl(0, 100%, 40%);">- );</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if (ast_strlen_zero(data)) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_WARNING, "SendURL requires an argument (URL)\n");</span><br><span style="color: hsl(0, 100%, 40%);">- pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", status);</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(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- tmp = ast_strdupa(data);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- AST_STANDARD_APP_ARGS(args, tmp);</span><br><span style="color: hsl(0, 100%, 40%);">- if (args.argc == 2)</span><br><span style="color: hsl(0, 100%, 40%);">- ast_app_parse_options(app_opts, &flags, opts, args.options);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if (!ast_channel_supports_html(chan)) {</span><br><span style="color: hsl(0, 100%, 40%);">- /* Does not support transport */</span><br><span style="color: hsl(0, 100%, 40%);">- pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "UNSUPPORTED");</span><br><span style="color: hsl(0, 100%, 40%);">- return 0;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- res = ast_channel_sendurl(chan, args.url);</span><br><span style="color: hsl(0, 100%, 40%);">- if (res == -1) {</span><br><span style="color: hsl(0, 100%, 40%);">- pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "FAILURE");</span><br><span style="color: hsl(0, 100%, 40%);">- return res;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- status = "SUCCESS";</span><br><span style="color: hsl(0, 100%, 40%);">- if (ast_test_flag(&flags, OPTION_WAIT)) {</span><br><span style="color: hsl(0, 100%, 40%);">- for(;;) {</span><br><span style="color: hsl(0, 100%, 40%);">- /* Wait for an event */</span><br><span style="color: hsl(0, 100%, 40%);">- res = ast_waitfor(chan, -1);</span><br><span style="color: hsl(0, 100%, 40%);">- if (res < 0)</span><br><span style="color: hsl(0, 100%, 40%);">- break;</span><br><span style="color: hsl(0, 100%, 40%);">- f = ast_read(chan);</span><br><span style="color: hsl(0, 100%, 40%);">- if (!f) {</span><br><span style="color: hsl(0, 100%, 40%);">- res = -1;</span><br><span style="color: hsl(0, 100%, 40%);">- status = "FAILURE";</span><br><span style="color: hsl(0, 100%, 40%);">- break;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- if (f->frametype == AST_FRAME_HTML) {</span><br><span style="color: hsl(0, 100%, 40%);">- switch (f->subclass.integer) {</span><br><span style="color: hsl(0, 100%, 40%);">- case AST_HTML_LDCOMPLETE:</span><br><span style="color: hsl(0, 100%, 40%);">- res = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- ast_frfree(f);</span><br><span style="color: hsl(0, 100%, 40%);">- status = "NOLOAD";</span><br><span style="color: hsl(0, 100%, 40%);">- goto out;</span><br><span style="color: hsl(0, 100%, 40%);">- break;</span><br><span style="color: hsl(0, 100%, 40%);">- case AST_HTML_NOSUPPORT:</span><br><span style="color: hsl(0, 100%, 40%);">- /* Does not support transport */</span><br><span style="color: hsl(0, 100%, 40%);">- status = "UNSUPPORTED";</span><br><span style="color: hsl(0, 100%, 40%);">- res = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- ast_frfree(f);</span><br><span style="color: hsl(0, 100%, 40%);">- goto out;</span><br><span style="color: hsl(0, 100%, 40%);">- break;</span><br><span style="color: hsl(0, 100%, 40%);">- default:</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_WARNING, "Don't know what to do with HTML subclass %d\n", f->subclass.integer);</span><br><span style="color: hsl(0, 100%, 40%);">- };</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- ast_frfree(f);</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-out:</span><br><span style="color: hsl(0, 100%, 40%);">- pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", status);</span><br><span style="color: hsl(0, 100%, 40%);">- return res;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static int unload_module(void)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- return ast_unregister_application(app);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static int load_module(void)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">- return ast_register_application_xml(app, sendurl_exec);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Send URL Applications");</span><br><span>diff --git a/doc/UPGRADE-staging/app_url_removal.txt b/doc/UPGRADE-staging/app_url_removal.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..bf04380</span><br><span>--- /dev/null</span><br><span>+++ b/doc/UPGRADE-staging/app_url_removal.txt</span><br><span>@@ -0,0 +1,6 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: app_url</span><br><span style="color: hsl(120, 100%, 40%);">+Master-Only: True</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+This module was deprecated in Asterisk 16</span><br><span style="color: hsl(120, 100%, 40%);">+and is now being removed in accordance with</span><br><span style="color: hsl(120, 100%, 40%);">+the Asterisk Module Deprecation policy.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16293">change 16293</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/+/16293"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: If846d40b37c5b646bcd7326111db280529a5971b </div>
<div style="display:none"> Gerrit-Change-Number: 16293 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>