[asterisk-commits] app voicemail: Honor escape digits in "greeting only" mode (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 25 08:12:27 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6285 )
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:
Patch uploaded by Eelco Brolman (License 6442)
Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
---
M apps/app_voicemail.c
1 file changed, 15 insertions(+), 6 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 943a883..58b4e64 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/6285
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
Gerrit-Change-Number: 6285
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170825/04b5cce8/attachment-0001.html>
More information about the asterisk-commits
mailing list