mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
Stay in admin menu until user wants out (bug #977)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1149,7 +1149,7 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco
|
||||
/* stop recording with any digit */
|
||||
if (option_verbose > 2)
|
||||
ast_verbose( VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
|
||||
res = f->subclass;
|
||||
res = 't';
|
||||
outmsg = 2;
|
||||
ast_frfree(f);
|
||||
break;
|
||||
@@ -1221,7 +1221,7 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco
|
||||
if (outmsg) {
|
||||
if (outmsg > 1) {
|
||||
/* Let them know it worked */
|
||||
ast_streamfile(chan, "vm-msgsaved", chan->language);
|
||||
ast_streamfile(chan, "auth-thankyou", chan->language);
|
||||
ast_waitstream(chan, "");
|
||||
}
|
||||
}
|
||||
@@ -1705,7 +1705,7 @@ static int count_messages(char *dir)
|
||||
static int say_and_wait(struct ast_channel *chan, int num)
|
||||
{
|
||||
int d;
|
||||
d = ast_say_number(chan, num, AST_DIGIT_ANY, chan->language, (char *) NULL);
|
||||
d = ast_say_number(chan, num, AST_DIGIT_ANY, chan->language);
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -2269,7 +2269,7 @@ static int get_folder(struct ast_channel *chan, int start)
|
||||
if (d)
|
||||
return d;
|
||||
for (x = start; x< 5; x++) {
|
||||
if ((d = ast_say_number(chan, x, AST_DIGIT_ANY, chan->language, (char *) NULL)))
|
||||
if ((d = ast_say_number(chan, x, AST_DIGIT_ANY, chan->language)))
|
||||
return d;
|
||||
d = play_and_wait(chan, "vm-for");
|
||||
if (d)
|
||||
@@ -2308,7 +2308,7 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
|
||||
int cmd = 0;
|
||||
int retries = 0;
|
||||
|
||||
while((cmd >= 0) && (cmd != 't') && (cmd != '#')) {
|
||||
while((cmd >= 0) && (cmd != 't') && (cmd != '*')) {
|
||||
if (cmd)
|
||||
retries = 0;
|
||||
switch (cmd) {
|
||||
@@ -2323,11 +2323,13 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
|
||||
case '2':
|
||||
cmd = 't';
|
||||
break;
|
||||
case '#':
|
||||
cmd = '#';
|
||||
case '*':
|
||||
cmd = '*';
|
||||
break;
|
||||
default:
|
||||
cmd = play_and_wait(chan,"vm-forwardoptions");
|
||||
if (!cmd)
|
||||
cmd = play_and_wait(chan,"vm-starmain");
|
||||
if (!cmd)
|
||||
cmd = ast_waitfordigit(chan,6000);
|
||||
if (!cmd)
|
||||
@@ -2398,7 +2400,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
|
||||
return res;
|
||||
vmtmp = extensions;
|
||||
cmd = vm_forwardoptions(chan, sender, dir, curmsg, vmfmts, context);
|
||||
|
||||
if (!cmd) {
|
||||
while(!res && vmtmp) {
|
||||
/* if (play_and_wait(chan, "vm-savedto"))
|
||||
break;
|
||||
@@ -2465,12 +2467,16 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
|
||||
}
|
||||
if (saved_messages > 0) {
|
||||
/* give confirmatopm that the message was saved */
|
||||
/* commented out since we can't forward batches yet
|
||||
if (saved_messages == 1)
|
||||
res = play_and_wait(chan, "vm-message");
|
||||
else
|
||||
res = play_and_wait(chan, "vm-messages");
|
||||
if (!res)
|
||||
res = play_and_wait(chan, "vm-saved");
|
||||
res = play_and_wait(chan, "vm-saved"); */
|
||||
if (!res)
|
||||
res = play_and_wait(chan, "vm-msgsaved");
|
||||
}
|
||||
}
|
||||
return res ? res : cmd;
|
||||
}
|
||||
@@ -2633,7 +2639,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
|
||||
res = wait_file2(chan, vms, "vm-message");
|
||||
if (msg && (msg != vms->lastmsg)) {
|
||||
if (!res)
|
||||
res = ast_say_number(chan, msg + 1, AST_DIGIT_ANY, chan->language, (char *) NULL);
|
||||
res = ast_say_number(chan, msg + 1, AST_DIGIT_ANY, chan->language);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user