[asterisk-commits] jpeeler: branch 1.6.0 r260925 - in /branches/1.6.0: ./ apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 4 13:53:29 CDT 2010


Author: jpeeler
Date: Tue May  4 13:53:25 2010
New Revision: 260925

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=260925
Log:
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
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_voicemail.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/apps/app_voicemail.c?view=diff&rev=260925&r1=260924&r2=260925
==============================================================================
--- branches/1.6.0/apps/app_voicemail.c (original)
+++ branches/1.6.0/apps/app_voicemail.c Tue May  4 13:53:25 2010
@@ -236,8 +236,9 @@
 #define VM_SEARCH        (1 << 14)
 #define VM_TEMPGREETWARN (1 << 15)  /*!< Remind user tempgreeting is set */
 #define VM_MOVEHEARD     (1 << 16)  /*!< Move a "heard" message to Old after listening to it */
-#define ERROR_LOCK_PATH  -100
+#define ERROR_LOCK_PATH     -100
 #define ERROR_MAILBOX_FULL	-200
+#define OPERATOR_EXIT        300
 
 
 enum {
@@ -4624,7 +4625,7 @@
 			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 */
@@ -8371,7 +8372,7 @@
 				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;
 						}
@@ -8421,9 +8422,8 @@
 				case '5': /* Leave VoiceMail */
 					if (ast_test_flag(vmu, VM_SVMAIL)) {
 						cmd = forward_message(chan, context, &vms, vmu, vmfmts, 1, record_gain);
-						if (cmd == ERROR_LOCK_PATH) {
+						if (cmd == ERROR_LOCK_PATH || cmd == OPERATOR_EXIT) {
 							res = cmd;
-							ast_log(LOG_WARNING, "forward_message failed to lock path.\n");
 							goto out;
 						}
 					} else
@@ -8614,13 +8614,14 @@
 	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);




More information about the asterisk-commits mailing list