Index: app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.129 diff -u -r1.129 app_voicemail.c --- apps/app_voicemail.c 8 Jul 2004 07:31:09 -0000 1.129 +++ apps/app_voicemail.c 8 Jul 2004 22:26:39 -0000 @@ -263,6 +263,7 @@ static int calloper; static int saycidinfo; static int hearenv; +static int skipaftercmd; static char dialcontext[80]; static char callcontext[80]; static char exitcontext[80]; @@ -3772,7 +3773,16 @@ cmd = play_and_wait(chan, "vm-deleted"); else cmd = play_and_wait(chan, "vm-undeleted"); + if (skipaftercmd) { + if (vms.curmsg < vms.lastmsg) { + vms.curmsg++; + cmd = play_message(chan, vmu, &vms); + } else { + cmd = play_and_wait(chan, "vm-nomore"); + } + } break; + case '8': if(vms.lastmsg > -1) cmd = forward_message(chan, context, vms.curdir, vms.curmsg, vmu, vmfmts); @@ -3816,7 +3826,16 @@ if (!cmd) cmd = play_and_wait(chan, "vm-messages"); } - break; + if (skipaftercmd) { + if (vms.curmsg < vms.lastmsg) { + vms.curmsg++; + cmd = play_message(chan, vmu, &vms); + } else { + cmd = play_and_wait(chan, "vm-nomore"); + } + } + break; + case '*': if (!vms.starting) { cmd = play_and_wait(chan, "vm-onefor"); @@ -4132,6 +4151,7 @@ char *astsaycid; char *astcallop; char *astreview; + char *astskipcmd; char *asthearenv; char *silencestr; char *thresholdstr; @@ -4292,7 +4312,14 @@ asthearenv = "yes"; } hearenv = ast_true(asthearenv); - + + skipaftercmd = 0; + if (!(astskipcmd = ast_variable_retrieve(cfg, "general", "nextaftercmd"))) { + ast_log(LOG_DEBUG,"We are not going to skip to the next msg after save/delete\n"); + astskipcmd = "no"; + } + skipaftercmd = ast_true(astskipcmd); + if ((dialoutcxt = ast_variable_retrieve(cfg, "general", "dialout"))) { strncpy(dialcontext, dialoutcxt, sizeof(dialcontext) - 1); ast_log(LOG_DEBUG, "found dialout context: %s\n", dialcontext); Index: voicemail.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/voicemail.conf.sample,v retrieving revision 1.33 diff -u -r1.33 voicemail.conf.sample --- configs/voicemail.conf.sample 23 Jun 2004 18:00:50 -0000 1.33 +++ configs/voicemail.conf.sample 8 Jul 2004 22:27:39 -0000 @@ -104,6 +104,8 @@ ; This does NOT affect option 3,3 from the advanced options menu ; delete=yes ; After notification, the voicemail is deleted from the server. [per-mailbox only] ; This is intended for use with users who wish to receive their voicemail ONLY by email. +; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message. + ; [global option only at this time] [zonemessages] eastern=America/New_York|'vm-received' Q 'digits/at' IMp