<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6285">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_voicemail: Honor escape digits in "greeting only" mode<br><br>ASTERISK-21241 #close<br>Reported by: Eelco Brolman<br>Patches:<br>  maxmsg_voicemail_entry_fix.patch uploaded by Eelco Brolman<br>    (License 6442)<br><br>Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe<br>---<br>M apps/app_voicemail.c<br>1 file changed, 15 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/6285/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c<br>index 943a883..58b4e64 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -6490,6 +6490,7 @@<br>   int ausemacro = 0;<br>    int ousemacro = 0;<br>    int ouseexten = 0;<br>+   int greeting_only = 0;<br>        char tmpdur[16];<br>      char priority[16];<br>    char origtime[16];<br>@@ -6549,6 +6550,13 @@<br>            ast_free(tmp);<br>                return res;<br>   }<br>+<br>+ /* If maxmsg is zero, act as a "greetings only" voicemail: Exit successfully without recording */<br>+  if (vmu->maxmsg == 0) {<br>+           greeting_only = 1;<br>+           ast_set_flag(options, OPT_SILENT);<br>+   }<br>+<br>  /* Setup pre-file if appropriate */<br>   if (strcmp(vmu->context, "default"))<br>             snprintf(ext_context, sizeof(ext_context), "%s@%s", ext, vmu->context);<br>@@ -6673,12 +6681,6 @@<br>          ast_set_flag(options, OPT_SILENT);<br>            res = 0;<br>      }<br>-    /* If maxmsg is zero, act as a "greetings only" voicemail: Exit successfully without recording */<br>-  if (vmu->maxmsg == 0) {<br>-           ast_debug(3, "Greetings only VM (maxmsg=0), Skipping voicemail recording\n");<br>-              pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");<br>-          goto leave_vm_out;<br>-   }<br>     if (!res && !ast_test_flag(options, OPT_SILENT)) {<br>            res = ast_stream_and_wait(chan, INTRO, ecodes);<br>               if (res == '#') {<br>@@ -6734,6 +6736,13 @@<br>             return res;<br>   }<br> <br>+ if (greeting_only) {<br>+         ast_debug(3, "Greetings only VM (maxmsg=0), Skipping voicemail recording\n");<br>+              pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");<br>+          res = 0;<br>+             goto leave_vm_out;<br>+   }<br>+<br>  if (res < 0) {<br>             free_user(vmu);<br>               pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6285">change 6285</a>. To unsubscribe, 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/6285"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe </div>
<div style="display:none"> Gerrit-Change-Number: 6285 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>