aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-04 18:57:31 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-04 18:57:31 +0000
commit2745908f096e997e5f8572174e2e6c32c6fbd099 (patch)
tree8f8ae14c93da20fa8c035fc0913a710d08bad268
parent528c13fbf7c9b8850cd97cd2a782cfa4d8e52ab9 (diff)
Merged revisions 260924 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r260924 | jpeeler | 2010-05-04 13:51:28 -0500 (Tue, 04 May 2010) | 18 lines Merged revisions 260923 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r260923 | jpeeler | 2010-05-04 13:46:46 -0500 (Tue, 04 May 2010) | 12 lines Voicemail transfer to operator should occur immediately, not after main menu. There were two scenarios in the advanced options that while using the operator=yes and review=yes options, the transfer occurred only after exiting the main menu (after sending a reply or leaving a message for an extension). Now after the audio is processed for the reply or message the transfer occurs immediately as expected. ABE-2107 ABE-2108 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@260926 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_voicemail.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 7c7c6f976..803b1f815 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -243,6 +243,7 @@ static AST_LIST_HEAD_STATIC(vmstates, vmstate);
#define VM_MESSAGEWRAP (1 << 17) /*!< Wrap around from the last message to the first, and vice-versa */
#define VM_FWDURGAUTO (1 << 18) /*!< Autoset of Urgent flag on forwarded Urgent messages set globally */
#define ERROR_LOCK_PATH -100
+#define OPERATOR_EXIT 300
enum {
@@ -5279,7 +5280,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
pbx_builtin_setvar_helper(chan, "VMSTATUS", "USEREXIT");
}
ast_free(tmp);
- return 0;
+ return OPERATOR_EXIT;
}
/* Allow all other digits to exit Voicemail and return to the dialplan */
@@ -9314,7 +9315,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
case '1': /* Reply */
if (vms.lastmsg > -1 && !vms.starting) {
cmd = advanced_options(chan, vmu, &vms, vms.curmsg, 1, record_gain);
- if (cmd == ERROR_LOCK_PATH) {
+ if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) {
res = cmd;
goto out;
}
@@ -9364,9 +9365,8 @@ static int vm_execmain(struct ast_channel *chan, void *data)
case '5': /* Leave VoiceMail */
if (ast_test_flag(vmu, VM_SVMAIL)) {
cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain, 0);
- if (cmd == ERROR_LOCK_PATH) {
+ if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) {
res = cmd;
- ast_log(AST_LOG_WARNING, "forward_message failed to lock path.\n");
goto out;
}
} else
@@ -9675,13 +9675,14 @@ out:
if (res > -1) {
ast_stopstream(chan);
adsi_goodbye(chan);
- if (valid) {
+ if (valid && res != OPERATOR_EXIT) {
if (silentexit)
res = ast_play_and_wait(chan, "vm-dialout");
else
res = ast_play_and_wait(chan, "vm-goodbye");
- if (res > 0)
- res = 0;
+ }
+ if ((valid && res > 0) || res == OPERATOR_EXIT) {
+ res = 0;
}
if (useadsi)
ast_adsi_unload_session(chan);