<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6286">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><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> Patch uploaded by Eelco Brolman (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;">diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c<br>index ed12f00..1714a78 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/6286">change 6286</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/6286"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe </div>
<div style="display:none"> Gerrit-Change-Number: 6286 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>