summaryrefslogtreecommitdiff
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-07-04 13:26:37 +0000
committerMatthew Jordan <mjordan@digium.com>2014-07-04 13:26:37 +0000
commit97834718c283d74e3571c1bf52d2840b93157cda (patch)
treea5887ff82e9f3d33c4cc1e64c0f9804dae47c295 /res/res_musiconhold.c
parent3bd495a688199c2db5ebc397210f06191aa59581 (diff)
Remove many deprecated modules
Billing records are fair, To get paid is quite bright, You should really use ODBC; Good-bye cdr_sqlite. Microsoft did once push H.323, Hell, we all remember NetMeeting. But try to compile chan_h323 now And you will take quite a beating. The XMPP and SIP war was fierce, And in the distant fray Was birthed res_jabber/chan_jingle; But neither to stay. For everyone did care and chase what Google professed. "Free Internet Calling" was what devotees cried, But Google did change the specs so often That the developers were happy the day chan_gtalk died. And then there was that odd application Dedicated to the Polish tongue. app_saycountpl was subsumed by Say; One could say its bell was rung. To read and parse a file from the dialplan You could (I guess) use an application. app_readfile did fill that purpose, but I think A function is perhaps better in its creation. Barging is rude, I'm not sure why we do it. Inwardly, the caller will probably sigh. But if you really must do it, Don't use app_dahdibarge, use ChanSpy. We all despise the sound of tinny robots It makes our queues so cold. To control such an abomination It's better to not use Wait/SetMusicOnHold. It's often nice to know properties of a channel It makes our calls right We have a nice function called CHANNEL And so SIPCHANINFO is sent off into the night. And now things get odd; Apparently one could delimit with a colon Properties from the SIPPEER function! Commas are in; all others are done. Finally, a word on pipes and commas. We're sorry. We can't say it enough. But those compatibility options in asterisk.conf; To maintain them forever was just too tough. This patch removes: * cdr_sqlite * chan_gtalk * chan_jingle * chan_h323 * res_jabber * app_saycountpl * app_readfile * app_dahdibarge It removes the following applications/functions: * WaitMusicOnHold * SetMusicOnHold * SIPCHANINFO It removes the colon delimiter from the SIPPEER function. Finally, it also removes all compatibility options that were configurable from asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems. Review: https://reviewboard.asterisk.org/r/3698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 40f6ef10f..1d05f0daa 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -98,36 +98,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
an application such as Answer() or Progress().</para>
</description>
</application>
- <application name="WaitMusicOnHold" language="en_US">
- <synopsis>
- Wait, playing Music On Hold.
- </synopsis>
- <syntax>
- <parameter name="delay" required="true" />
- </syntax>
- <description>
- <para> !!! DEPRECATED. Use MusicOnHold instead !!!</para>
- <para>Plays hold music specified number of seconds. Returns <literal>0</literal> when done,
- or <literal>-1</literal> on hangup. If no hold music is available, the delay will still occur
- with no sound.</para>
- <para> !!! DEPRECATED. Use MusicOnHold instead !!!</para>
- </description>
- </application>
- <application name="SetMusicOnHold" language="en_US">
- <synopsis>
- Set default Music On Hold class.
- </synopsis>
- <syntax>
- <parameter name="class" required="yes" />
- </syntax>
- <description>
- <para>!!! DEPRECATED. USe Set(CHANNEL(musicclass)=...) instead !!!</para>
- <para>Sets the default class for music on hold for a given channel.
- When music on hold is activated, this class will be used to select which
- music is played.</para>
- <para>!!! DEPRECATED. USe Set(CHANNEL(musicclass)=...) instead !!!</para>
- </description>
- </application>
<application name="StartMusicOnHold" language="en_US">
<synopsis>
Play Music On Hold.
@@ -153,8 +123,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
***/
static const char play_moh[] = "MusicOnHold";
-static const char wait_moh[] = "WaitMusicOnHold";
-static const char set_moh[] = "SetMusicOnHold";
static const char start_moh[] = "StartMusicOnHold";
static const char stop_moh[] = "StopMusicOnHold";
@@ -862,46 +830,6 @@ static int play_moh_exec(struct ast_channel *chan, const char *data)
return res;
}
-static int wait_moh_exec(struct ast_channel *chan, const char *data)
-{
- static int deprecation_warning = 0;
- int res;
-
- if (!deprecation_warning) {
- deprecation_warning = 1;
- ast_log(LOG_WARNING, "WaitMusicOnHold application is deprecated and will be removed. Use MusicOnHold with duration parameter instead\n");
- }
-
- if (!data || !atoi(data)) {
- ast_log(LOG_WARNING, "WaitMusicOnHold requires an argument (number of seconds to wait)\n");
- return -1;
- }
- if (ast_moh_start(chan, NULL, NULL)) {
- ast_log(LOG_WARNING, "Unable to start music on hold for %d seconds on channel %s\n", atoi(data), ast_channel_name(chan));
- return 0;
- }
- res = ast_safe_sleep(chan, atoi(data) * 1000);
- ast_moh_stop(chan);
- return res;
-}
-
-static int set_moh_exec(struct ast_channel *chan, const char *data)
-{
- static int deprecation_warning = 0;
-
- if (!deprecation_warning) {
- deprecation_warning = 1;
- ast_log(LOG_WARNING, "SetMusicOnHold application is deprecated and will be removed. Use Set(CHANNEL(musicclass)=...) instead\n");
- }
-
- if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "SetMusicOnHold requires an argument (class)\n");
- return -1;
- }
- ast_channel_musicclass_set(chan, data);
- return 0;
-}
-
static int start_moh_exec(struct ast_channel *chan, const char *data)
{
char *parse;
@@ -2009,10 +1937,6 @@ static int load_module(void)
ast_register_atexit(ast_moh_destroy);
ast_cli_register_multiple(cli_moh, ARRAY_LEN(cli_moh));
if (!res)
- res = ast_register_application_xml(wait_moh, wait_moh_exec);
- if (!res)
- res = ast_register_application_xml(set_moh, set_moh_exec);
- if (!res)
res = ast_register_application_xml(start_moh, start_moh_exec);
if (!res)
res = ast_register_application_xml(stop_moh, stop_moh_exec);
@@ -2058,8 +1982,6 @@ static int unload_module(void)
ast_moh_destroy();
res = ast_unregister_application(play_moh);
- res |= ast_unregister_application(wait_moh);
- res |= ast_unregister_application(set_moh);
res |= ast_unregister_application(start_moh);
res |= ast_unregister_application(stop_moh);
ast_cli_unregister_multiple(cli_moh, ARRAY_LEN(cli_moh));