[Asterisk-code-review] app voicemail: Honor escape digits in "greeting only" mode (asterisk[14])
Sean Bright
asteriskteam at digium.com
Wed Aug 23 09:24:34 CDT 2017
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/6286
Change subject: app_voicemail: Honor escape digits in "greeting only" mode
......................................................................
app_voicemail: Honor escape digits in "greeting only" mode
ASTERISK-21241 #close
Reported by: Eelco Brolman
Patches:
maxmsg_voicemail_entry_fix.patch uploaded by Eelco Brolman
(License 6442)
Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
---
M apps/app_voicemail.c
1 file changed, 15 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/86/6286/1
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ed12f00..1714a78 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6490,6 +6490,7 @@
int ausemacro = 0;
int ousemacro = 0;
int ouseexten = 0;
+ int greeting_only = 0;
char tmpdur[16];
char priority[16];
char origtime[16];
@@ -6549,6 +6550,13 @@
ast_free(tmp);
return res;
}
+
+ /* If maxmsg is zero, act as a "greetings only" voicemail: Exit successfully without recording */
+ if (vmu->maxmsg == 0) {
+ greeting_only = 1;
+ ast_set_flag(options, OPT_SILENT);
+ }
+
/* Setup pre-file if appropriate */
if (strcmp(vmu->context, "default"))
snprintf(ext_context, sizeof(ext_context), "%s@%s", ext, vmu->context);
@@ -6673,12 +6681,6 @@
ast_set_flag(options, OPT_SILENT);
res = 0;
}
- /* If maxmsg is zero, act as a "greetings only" voicemail: Exit successfully without recording */
- if (vmu->maxmsg == 0) {
- ast_debug(3, "Greetings only VM (maxmsg=0), Skipping voicemail recording\n");
- pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
- goto leave_vm_out;
- }
if (!res && !ast_test_flag(options, OPT_SILENT)) {
res = ast_stream_and_wait(chan, INTRO, ecodes);
if (res == '#') {
@@ -6734,6 +6736,13 @@
return res;
}
+ if (greeting_only) {
+ ast_debug(3, "Greetings only VM (maxmsg=0), Skipping voicemail recording\n");
+ pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
+ res = 0;
+ goto leave_vm_out;
+ }
+
if (res < 0) {
free_user(vmu);
pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
--
To view, visit https://gerrit.asterisk.org/6286
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
Gerrit-Change-Number: 6286
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170823/90557ce0/attachment.html>
More information about the asterisk-code-review
mailing list