diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index cf944fd159..1b607e495b 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -246,38 +246,6 @@
[VoiceMail]
-
-
- Check to see if Voicemail mailbox exists.
-
-
-
-
-
-
-
- None options.
-
-
-
- DEPRECATED. Use VM_INFO(mailbox[@context],exists) instead.
- Check to see if the specified mailbox exists. If no voicemail
- context is specified, the default context
- will be used.
- This application will set the following channel variable upon completion:
-
-
- This will contain the status of the execution of the MailboxExists application.
- Possible values include:
-
-
-
-
-
-
- [VM_INFO]
-
-
Authenticate with Voicemail passwords.
@@ -349,24 +317,6 @@
argument to this application. If no context is provided, default is assumed.
-
-
- Tell if a mailbox is configured.
-
-
-
-
-
-
- DEPRECATED. Use VM_INFO(mailbox[@context],exists) instead.
- Returns a boolean of whether the corresponding mailbox exists.
- If context is not specified, defaults to the default
- context.
-
-
- [VM_INFO]
-
-
Returns the selected attribute from a mailbox.
@@ -934,13 +884,12 @@ static char userscontext[AST_MAX_EXTENSION] = "default";
static char *addesc = "Comedian Mail";
/* Leave a message */
-static char *app = "VoiceMail";
+static char *voicemail_app = "VoiceMail";
/* Check mail, control, etc */
-static char *app2 = "VoiceMailMain";
+static char *voicemailmain_app = "VoiceMailMain";
-static char *app3 = "MailboxExists";
-static char *app4 = "VMAuthenticate";
+static char *vmauthenticate_app = "VMAuthenticate";
static char *playmsg_app = "VoiceMailPlayMsg";
@@ -12691,78 +12640,6 @@ AST_TEST_DEFINE(test_voicemail_vmuser)
}
#endif
-static int vm_box_exists(struct ast_channel *chan, const char *data)
-{
- struct ast_vm_user svm, *vmu;
- char *context, *box;
- AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(mbox);
- AST_APP_ARG(options);
- );
- static int dep_warning = 0;
-
- if (ast_strlen_zero(data)) {
- ast_log(AST_LOG_ERROR, "MailboxExists requires an argument: (vmbox[@context][|options])\n");
- return -1;
- }
-
- if (!dep_warning) {
- dep_warning = 1;
- ast_log(AST_LOG_WARNING, "MailboxExists is deprecated. Please use ${VM_INFO(%s,exists)} instead.\n", data);
- }
-
- box = ast_strdupa(data);
-
- AST_STANDARD_APP_ARGS(args, box);
-
- if (args.options) {
- }
-
- if ((context = strchr(args.mbox, '@'))) {
- *context = '\0';
- context++;
- }
-
- memset(&svm, 0, sizeof(svm));
- vmu = find_user(&svm, context, args.mbox);
- if (vmu) {
- pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
- free_user(vmu);
- } else
- pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "FAILED");
-
- return 0;
-}
-
-static int acf_mailbox_exists(struct ast_channel *chan, const char *cmd, char *args, char *buf, size_t len)
-{
- struct ast_vm_user svm, *vmu;
- AST_DECLARE_APP_ARGS(arg,
- AST_APP_ARG(mbox);
- AST_APP_ARG(context);
- );
- static int dep_warning = 0;
-
- AST_NONSTANDARD_APP_ARGS(arg, args, '@');
-
- if (ast_strlen_zero(arg.mbox)) {
- ast_log(LOG_ERROR, "MAILBOX_EXISTS requires an argument ([@])\n");
- return -1;
- }
-
- if (!dep_warning) {
- dep_warning = 1;
- ast_log(AST_LOG_WARNING, "MAILBOX_EXISTS is deprecated. Please use ${VM_INFO(%s,exists)} instead.\n", args);
- }
-
- memset(&svm, 0, sizeof(svm));
- vmu = find_user(&svm, ast_strlen_zero(arg.context) ? "default" : arg.context, arg.mbox);
- ast_copy_string(buf, vmu ? "1" : "0", len);
- free_user(vmu);
-
- return 0;
-}
-
static int acf_vm_info(struct ast_channel *chan, const char *cmd, char *args, char *buf, size_t len)
{
struct ast_vm_user svm;
@@ -12844,11 +12721,6 @@ static int acf_vm_info(struct ast_channel *chan, const char *cmd, char *args, ch
return 0;
}
-static struct ast_custom_function mailbox_exists_acf = {
- .name = "MAILBOX_EXISTS",
- .read = acf_mailbox_exists,
-};
-
static struct ast_custom_function vm_info_acf = {
.name = "VM_INFO",
.read = acf_vm_info,
@@ -15140,13 +15012,11 @@ static int unload_module(void)
{
int res;
- res = ast_unregister_application(app);
- res |= ast_unregister_application(app2);
- res |= ast_unregister_application(app3);
- res |= ast_unregister_application(app4);
+ res = ast_unregister_application(voicemail_app);
+ res |= ast_unregister_application(voicemailmain_app);
+ res |= ast_unregister_application(vmauthenticate_app);
res |= ast_unregister_application(playmsg_app);
res |= ast_unregister_application(sayname_app);
- res |= ast_custom_function_unregister(&mailbox_exists_acf);
res |= ast_custom_function_unregister(&vm_info_acf);
res |= ast_manager_unregister("VoicemailUsersList");
res |= ast_manager_unregister("VoicemailUserStatus");
@@ -15269,13 +15139,11 @@ static int load_module(void)
return AST_MODULE_LOAD_DECLINE;
}
- res = ast_register_application_xml(app, vm_exec);
- res |= ast_register_application_xml(app2, vm_execmain);
- res |= ast_register_application_xml(app3, vm_box_exists);
- res |= ast_register_application_xml(app4, vmauthenticate);
+ res = ast_register_application_xml(voicemail_app, vm_exec);
+ res |= ast_register_application_xml(voicemailmain_app, vm_execmain);
+ res |= ast_register_application_xml(vmauthenticate_app, vmauthenticate);
res |= ast_register_application_xml(playmsg_app, vm_playmsgexec);
res |= ast_register_application_xml(sayname_app, vmsayname_exec);
- res |= ast_custom_function_register(&mailbox_exists_acf);
res |= ast_custom_function_register(&vm_info_acf);
res |= ast_manager_register_xml("VoicemailUsersList", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, manager_list_voicemail_users);
res |= ast_manager_register_xml("VoicemailUserStatus", EVENT_FLAG_CALL | EVENT_FLAG_REPORTING, manager_status_voicemail_user);
diff --git a/doc/UPGRADE-staging/vm_deprecated_removals.txt b/doc/UPGRADE-staging/vm_deprecated_removals.txt
new file mode 100644
index 0000000000..684a012b61
--- /dev/null
+++ b/doc/UPGRADE-staging/vm_deprecated_removals.txt
@@ -0,0 +1,7 @@
+Subject: app_voicemail
+Master-Only: True
+
+The MessageExists dialplan application and the MESSAGE_EXISTS dialplan
+function were removed. The were deprecated in Asterisk 1.6.0 and
+Asterisk 11.0.0 respectively. The VM_INFO() dialplan function is the
+supported mechanism to query the status of a given mailbox.