aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-21 22:11:47 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-21 22:11:47 +0000
commit74705c61688c143654ee638ddfc252f4360785e6 (patch)
tree439f4fd23f2a59c81dd8175f77c7cde98d8f7f9b /apps
parenta91c554e37448664ed97f5bbea607b80e0d94544 (diff)
Merged revisions 258433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r258433 | jpeeler | 2010-04-21 16:56:09 -0500 (Wed, 21 Apr 2010) | 15 lines Merged revisions 258432 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r258432 | jpeeler | 2010-04-21 16:45:36 -0500 (Wed, 21 Apr 2010) | 8 lines Fix looping forever when no input received in certain voicemail menu scenarios. Specifically, prompting for an extension (when leaving or forwarding a message) or when prompting for a digit (when saving a message or changing folders). ABE-2122 SWP-1268 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@258436 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 49bf0d6bd..40b5293af 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6310,10 +6310,16 @@ static int get_folder(struct ast_channel *chan, int start)
static int get_folder2(struct ast_channel *chan, char *fn, int start)
{
int res = 0;
+ int loops = 0;
res = ast_play_and_wait(chan, fn); /* Folder name */
while (((res < '0') || (res > '9')) &&
- (res != '#') && (res >= 0)) {
+ (res != '#') && (res >= 0) &&
+ loops < 4) {
res = get_folder(chan, 0);
+ loops++;
+ }
+ if (loops == 4) { /* give up */
+ return '#';
}
return res;
}
@@ -6628,6 +6634,7 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
int curmsg;
char urgent_str[7] = "";
char tmptxtfile[PATH_MAX];
+ int prompt_played = 0;
#ifndef IMAP_STORAGE
char msgfile[PATH_MAX], textfile[PATH_MAX], backup[PATH_MAX], backup_textfile[PATH_MAX];
#endif
@@ -6713,7 +6720,8 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
} else {
/* Ask for an extension */
res = ast_streamfile(chan, "vm-extension", chan->language); /* "extension" */
- if (res)
+ prompt_played++;
+ if (res || prompt_played > 4)
break;
if ((res = ast_readstring(chan, username, sizeof(username) - 1, 2000, 10000, "#") < 0))
break;