|
|
@ -254,7 +254,7 @@ struct baseio {
|
|
|
|
/*! Structure for linked list of users */
|
|
|
|
/*! Structure for linked list of users */
|
|
|
|
struct ast_vm_user {
|
|
|
|
struct ast_vm_user {
|
|
|
|
char context[AST_MAX_CONTEXT]; /*!< Voicemail context */
|
|
|
|
char context[AST_MAX_CONTEXT]; /*!< Voicemail context */
|
|
|
|
char mailbox[AST_MAX_EXTENSION];/*!< Mailbox id, unique within vm context */
|
|
|
|
char mailbox[AST_MAX_EXTENSION]; /*!< Mailbox id, unique within vm context */
|
|
|
|
char password[80]; /*!< Secret pin code, numbers only */
|
|
|
|
char password[80]; /*!< Secret pin code, numbers only */
|
|
|
|
char fullname[80]; /*!< Full name, for directory app */
|
|
|
|
char fullname[80]; /*!< Full name, for directory app */
|
|
|
|
char email[80]; /*!< E-mail address */
|
|
|
|
char email[80]; /*!< E-mail address */
|
|
|
@ -297,8 +297,7 @@ struct vm_state {
|
|
|
|
int starting;
|
|
|
|
int starting;
|
|
|
|
int repeats;
|
|
|
|
int repeats;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msg,
|
|
|
|
static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msg, int option, signed char record_gain);
|
|
|
|
int option, signed char record_gain);
|
|
|
|
|
|
|
|
static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context);
|
|
|
|
static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context);
|
|
|
|
static int play_record_review(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime,
|
|
|
|
static int play_record_review(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime,
|
|
|
|
char *fmt, int outsidecaller, struct ast_vm_user *vmu, int *duration, const char *unlockdir,
|
|
|
|
char *fmt, int outsidecaller, struct ast_vm_user *vmu, int *duration, const char *unlockdir,
|
|
|
@ -583,7 +582,7 @@ static struct ast_vm_user *find_user_realtime(struct ast_vm_user *ivm, const cha
|
|
|
|
var = ast_load_realtime("voicemail", "mailbox", mailbox, "context", context, NULL);
|
|
|
|
var = ast_load_realtime("voicemail", "mailbox", mailbox, "context", context, NULL);
|
|
|
|
if (var) {
|
|
|
|
if (var) {
|
|
|
|
tmp = var;
|
|
|
|
tmp = var;
|
|
|
|
while(tmp) {
|
|
|
|
while (tmp) {
|
|
|
|
printf("%s => %s\n", tmp->name, tmp->value);
|
|
|
|
printf("%s => %s\n", tmp->name, tmp->value);
|
|
|
|
if (!strcasecmp(tmp->name, "password")) {
|
|
|
|
if (!strcasecmp(tmp->name, "password")) {
|
|
|
|
ast_copy_string(retval->password, tmp->value, sizeof(retval->password));
|
|
|
|
ast_copy_string(retval->password, tmp->value, sizeof(retval->password));
|
|
|
@ -823,21 +822,21 @@ static int create_dirpath(char *dest, int len, const char *context, const char *
|
|
|
|
|
|
|
|
|
|
|
|
if (!ast_strlen_zero(context)) {
|
|
|
|
if (!ast_strlen_zero(context)) {
|
|
|
|
make_dir(dest, len, context, "", "");
|
|
|
|
make_dir(dest, len, context, "", "");
|
|
|
|
if(mkdir(dest, mode) && errno != EEXIST) {
|
|
|
|
if (mkdir(dest, mode) && errno != EEXIST) {
|
|
|
|
ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
|
|
|
|
ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!ast_strlen_zero(ext)) {
|
|
|
|
if (!ast_strlen_zero(ext)) {
|
|
|
|
make_dir(dest, len, context, ext, "");
|
|
|
|
make_dir(dest, len, context, ext, "");
|
|
|
|
if(mkdir(dest, mode) && errno != EEXIST) {
|
|
|
|
if (mkdir(dest, mode) && errno != EEXIST) {
|
|
|
|
ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
|
|
|
|
ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!ast_strlen_zero(folder)) {
|
|
|
|
if (!ast_strlen_zero(folder)) {
|
|
|
|
make_dir(dest, len, context, ext, folder);
|
|
|
|
make_dir(dest, len, context, ext, folder);
|
|
|
|
if(mkdir(dest, mode) && errno != EEXIST) {
|
|
|
|
if (mkdir(dest, mode) && errno != EEXIST) {
|
|
|
|
ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
|
|
|
|
ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2294,7 +2293,7 @@ static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
|
|
|
|
|
|
|
|
|
|
|
|
ast_copy_string(tmp, mailbox, sizeof(tmp));
|
|
|
|
ast_copy_string(tmp, mailbox, sizeof(tmp));
|
|
|
|
mb = tmp;
|
|
|
|
mb = tmp;
|
|
|
|
while((cur = strsep(&mb, ", "))) {
|
|
|
|
while ((cur = strsep(&mb, ", "))) {
|
|
|
|
if (!ast_strlen_zero(cur)) {
|
|
|
|
if (!ast_strlen_zero(cur)) {
|
|
|
|
if (inboxcount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
|
|
|
|
if (inboxcount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
@ -2549,7 +2548,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
|
|
|
|
/* Check for a '0' here */
|
|
|
|
/* Check for a '0' here */
|
|
|
|
if (res == '0') {
|
|
|
|
if (res == '0') {
|
|
|
|
transfer:
|
|
|
|
transfer:
|
|
|
|
if(ouseexten || ousemacro) {
|
|
|
|
if (ouseexten || ousemacro) {
|
|
|
|
chan->exten[0] = 'o';
|
|
|
|
chan->exten[0] = 'o';
|
|
|
|
chan->exten[1] = '\0';
|
|
|
|
chan->exten[1] = '\0';
|
|
|
|
if (!ast_strlen_zero(vmu->exit)) {
|
|
|
|
if (!ast_strlen_zero(vmu->exit)) {
|
|
|
@ -2706,7 +2705,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
|
|
|
|
pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
|
|
|
|
pbx_builtin_setvar_helper(chan, "VMSTATUS", "SUCCESS");
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
ast_log(LOG_WARNING, "No format for saving voicemail?\n");
|
|
|
|
ast_log(LOG_WARNING, "No format for saving voicemail?\n");
|
|
|
|
leave_vm_out:
|
|
|
|
leave_vm_out:
|
|
|
|
free_user(vmu);
|
|
|
|
free_user(vmu);
|
|
|
|
|
|
|
|
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
@ -2727,7 +2726,7 @@ static int resequence_mailbox(struct ast_vm_user *vmu, char *dir)
|
|
|
|
make_file(sfn, sizeof(sfn), dir, x);
|
|
|
|
make_file(sfn, sizeof(sfn), dir, x);
|
|
|
|
if (EXISTS(dir, x, sfn, NULL)) {
|
|
|
|
if (EXISTS(dir, x, sfn, NULL)) {
|
|
|
|
|
|
|
|
|
|
|
|
if(x != dest) {
|
|
|
|
if (x != dest) {
|
|
|
|
make_file(dfn, sizeof(dfn), dir, dest);
|
|
|
|
make_file(dfn, sizeof(dfn), dir, dest);
|
|
|
|
RENAME(dir, x, vmu->mailbox, vmu->context, dir, dest, sfn, dfn);
|
|
|
|
RENAME(dir, x, vmu->mailbox, vmu->context, dir, dest, sfn, dfn);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3310,8 +3309,7 @@ static int get_folder2(struct ast_channel *chan, char *fn, int start)
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, char *curdir, int curmsg, char *vmfts,
|
|
|
|
static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, char *curdir, int curmsg, char *vmfts, char *context, signed char record_gain)
|
|
|
|
char *context, signed char record_gain)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int cmd = 0;
|
|
|
|
int cmd = 0;
|
|
|
|
int retries = 0;
|
|
|
|
int retries = 0;
|
|
|
@ -3411,8 +3409,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int forward_message(struct ast_channel *chan, char *context, char *dir, int curmsg, struct ast_vm_user *sender,
|
|
|
|
static int forward_message(struct ast_channel *chan, char *context, char *dir, int curmsg, struct ast_vm_user *sender, char *fmt, int flag, signed char record_gain)
|
|
|
|
char *fmt, int flag, signed char record_gain)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char username[70]="";
|
|
|
|
char username[70]="";
|
|
|
|
char sys[256];
|
|
|
|
char sys[256];
|
|
|
@ -3434,11 +3431,11 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
|
|
|
|
|
|
|
|
|
|
|
|
while (!res && !valid_extensions) {
|
|
|
|
while (!res && !valid_extensions) {
|
|
|
|
int use_directory = 0;
|
|
|
|
int use_directory = 0;
|
|
|
|
if(ast_test_flag((&globalflags), VM_DIRECFORWARD)) {
|
|
|
|
if (ast_test_flag((&globalflags), VM_DIRECFORWARD)) {
|
|
|
|
int done = 0;
|
|
|
|
int done = 0;
|
|
|
|
int retries = 0;
|
|
|
|
int retries = 0;
|
|
|
|
cmd=0;
|
|
|
|
cmd=0;
|
|
|
|
while((cmd >= 0) && !done ){
|
|
|
|
while ((cmd >= 0) && !done ){
|
|
|
|
if (cmd)
|
|
|
|
if (cmd)
|
|
|
|
retries = 0;
|
|
|
|
retries = 0;
|
|
|
|
switch (cmd) {
|
|
|
|
switch (cmd) {
|
|
|
@ -3469,7 +3466,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( cmd<0 || cmd=='t' )
|
|
|
|
if (cmd < 0 || cmd == 't')
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3720,13 +3717,13 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
if (the_zone)
|
|
|
|
if (the_zone)
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, the_zone->msg_format, the_zone->timezone);
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, the_zone->msg_format, the_zone->timezone);
|
|
|
|
else if(!strcasecmp(chan->language,"pl")) /* POLISH syntax */
|
|
|
|
else if (!strcasecmp(chan->language,"pl")) /* POLISH syntax */
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Q HM", NULL);
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Q HM", NULL);
|
|
|
|
else if(!strcasecmp(chan->language,"se")) /* SWEDISH syntax */
|
|
|
|
else if (!strcasecmp(chan->language,"se")) /* SWEDISH syntax */
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' dB 'digits/at' k 'and' M", NULL);
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' dB 'digits/at' k 'and' M", NULL);
|
|
|
|
else if(!strcasecmp(chan->language,"no")) /* NORWEGIAN syntax */
|
|
|
|
else if (!strcasecmp(chan->language,"no")) /* NORWEGIAN syntax */
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Q 'digits/at' HM", NULL);
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Q 'digits/at' HM", NULL);
|
|
|
|
else if(!strcasecmp(chan->language,"de")) /* GERMAN syntax */
|
|
|
|
else if (!strcasecmp(chan->language,"de")) /* GERMAN syntax */
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Q 'digits/at' HM", NULL);
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' Q 'digits/at' HM", NULL);
|
|
|
|
else if (!strcasecmp(chan->language,"nl")) /* DUTCH syntax */
|
|
|
|
else if (!strcasecmp(chan->language,"nl")) /* DUTCH syntax */
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/nl-om' HM", NULL);
|
|
|
|
res = ast_say_date_with_format(chan, t, AST_DIGIT_ANY, chan->language, "'vm-received' q 'digits/nl-om' HM", NULL);
|
|
|
@ -3813,7 +3810,7 @@ static int play_message_duration(struct ast_channel *chan, struct vm_state *vms,
|
|
|
|
int durationm;
|
|
|
|
int durationm;
|
|
|
|
int durations;
|
|
|
|
int durations;
|
|
|
|
/* Verify that we have a duration for the message */
|
|
|
|
/* Verify that we have a duration for the message */
|
|
|
|
if((duration == NULL))
|
|
|
|
if (duration == NULL)
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
|
|
|
|
|
|
|
|
/* Convert from seconds to minutes */
|
|
|
|
/* Convert from seconds to minutes */
|
|
|
@ -3984,7 +3981,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box)
|
|
|
|
last_msg = last_message_index(vmu, vms->curdir);
|
|
|
|
last_msg = last_message_index(vmu, vms->curdir);
|
|
|
|
if (last_msg < 0)
|
|
|
|
if (last_msg < 0)
|
|
|
|
return last_msg;
|
|
|
|
return last_msg;
|
|
|
|
else if(vms->lastmsg != last_msg)
|
|
|
|
else if (vms->lastmsg != last_msg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ast_log(LOG_NOTICE, "Resequencing Mailbox: %s\n", vms->curdir);
|
|
|
|
ast_log(LOG_NOTICE, "Resequencing Mailbox: %s\n", vms->curdir);
|
|
|
|
res = resequence_mailbox(vmu, vms->curdir);
|
|
|
|
res = resequence_mailbox(vmu, vms->curdir);
|
|
|
@ -4053,7 +4050,7 @@ done:
|
|
|
|
* ("filika mynhmata") it is not elegant. This also goes for "work/family messages"
|
|
|
|
* ("filika mynhmata") it is not elegant. This also goes for "work/family messages"
|
|
|
|
* ("ergasiaka/oikogeniaka mynhmata"). Therefore it is better to use a reversed
|
|
|
|
* ("ergasiaka/oikogeniaka mynhmata"). Therefore it is better to use a reversed
|
|
|
|
* syntax for the above three categories which is more elegant.
|
|
|
|
* syntax for the above three categories which is more elegant.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static int vm_play_folder_name_gr(struct ast_channel *chan, char *mbox)
|
|
|
|
static int vm_play_folder_name_gr(struct ast_channel *chan, char *mbox)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -4106,7 +4103,7 @@ static int vm_play_folder_name(struct ast_channel *chan, char *mbox)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* GREEK SYNTAX
|
|
|
|
/* GREEK SYNTAX
|
|
|
|
In greek the plural for old/new is
|
|
|
|
In greek the plural for old/new is
|
|
|
|
different so we need the following files
|
|
|
|
different so we need the following files
|
|
|
|
We also need vm-denExeteMynhmata because
|
|
|
|
We also need vm-denExeteMynhmata because
|
|
|
@ -4115,7 +4112,7 @@ static int vm_play_folder_name(struct ast_channel *chan, char *mbox)
|
|
|
|
-> vm-Olds.wav : "Palia"
|
|
|
|
-> vm-Olds.wav : "Palia"
|
|
|
|
-> vm-INBOXs.wav : "Nea"
|
|
|
|
-> vm-INBOXs.wav : "Nea"
|
|
|
|
-> vm-denExeteMynhmata : "den exete mynhmata"
|
|
|
|
-> vm-denExeteMynhmata : "den exete mynhmata"
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int vm_intro_gr(struct ast_channel *chan, struct vm_state *vms)
|
|
|
|
static int vm_intro_gr(struct ast_channel *chan, struct vm_state *vms)
|
|
|
@ -4767,7 +4764,7 @@ static int vm_intro_ru(struct ast_channel *chan,struct vm_state *vms)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!res) {
|
|
|
|
if (!res) {
|
|
|
|
switch(lastnum) {
|
|
|
|
switch (lastnum) {
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
res = ast_play_and_wait(chan, "vm-soobshenie");
|
|
|
|
res = ast_play_and_wait(chan, "vm-soobshenie");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -5381,7 +5378,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
|
|
|
|
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
|
|
|
|
int gain;
|
|
|
|
int gain;
|
|
|
|
if(opts[OPT_ARG_RECORDGAIN]) {
|
|
|
|
if (opts[OPT_ARG_RECORDGAIN]) {
|
|
|
|
if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
|
|
|
|
if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
|
|
|
|
ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
|
|
|
|
ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
|
|
|
|
LOCAL_USER_REMOVE(u);
|
|
|
|
LOCAL_USER_REMOVE(u);
|
|
|
@ -5395,7 +5392,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ast_test_flag(&flags, OPT_AUTOPLAY) ) {
|
|
|
|
if (ast_test_flag(&flags, OPT_AUTOPLAY) ) {
|
|
|
|
play_auto = 1;
|
|
|
|
play_auto = 1;
|
|
|
|
if(opts[OPT_ARG_PLAYFOLDER]) {
|
|
|
|
if (opts[OPT_ARG_PLAYFOLDER]) {
|
|
|
|
if (sscanf(opts[OPT_ARG_PLAYFOLDER], "%d", &play_folder) != 1) {
|
|
|
|
if (sscanf(opts[OPT_ARG_PLAYFOLDER], "%d", &play_folder) != 1) {
|
|
|
|
ast_log(LOG_WARNING, "Invalid value '%s' provided for folder autoplay option\n", opts[OPT_ARG_PLAYFOLDER]);
|
|
|
|
ast_log(LOG_WARNING, "Invalid value '%s' provided for folder autoplay option\n", opts[OPT_ARG_PLAYFOLDER]);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -5528,7 +5525,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
|
|
|
|
vms.starting = 1;
|
|
|
|
vms.starting = 1;
|
|
|
|
while ((cmd > -1) && (cmd != 't') && (cmd != '#')) {
|
|
|
|
while ((cmd > -1) && (cmd != 't') && (cmd != '#')) {
|
|
|
|
/* Run main menu */
|
|
|
|
/* Run main menu */
|
|
|
|
switch(cmd) {
|
|
|
|
switch (cmd) {
|
|
|
|
case '1':
|
|
|
|
case '1':
|
|
|
|
vms.curmsg = 0;
|
|
|
|
vms.curmsg = 0;
|
|
|
|
/* Fall through */
|
|
|
|
/* Fall through */
|
|
|
@ -5563,7 +5560,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
|
|
|
|
cmd = 0;
|
|
|
|
cmd = 0;
|
|
|
|
vms.repeats = 0;
|
|
|
|
vms.repeats = 0;
|
|
|
|
while ((cmd > -1) && (cmd != 't') && (cmd != '#')) {
|
|
|
|
while ((cmd > -1) && (cmd != 't') && (cmd != '#')) {
|
|
|
|
switch(cmd) {
|
|
|
|
switch (cmd) {
|
|
|
|
case '1': /* Reply */
|
|
|
|
case '1': /* Reply */
|
|
|
|
if (vms.lastmsg > -1 && !vms.starting) {
|
|
|
|
if (vms.lastmsg > -1 && !vms.starting) {
|
|
|
|
cmd = advanced_options(chan, vmu, &vms, vms.curmsg, 1, record_gain);
|
|
|
|
cmd = advanced_options(chan, vmu, &vms, vms.curmsg, 1, record_gain);
|
|
|
@ -6717,8 +6714,7 @@ static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num,
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msg,
|
|
|
|
static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, int msg, int option, signed char record_gain)
|
|
|
|
int option, signed char record_gain)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int res = 0;
|
|
|
|
int res = 0;
|
|
|
|
char filename[256],*origtime, *cid, *context, *name, *num;
|
|
|
|
char filename[256],*origtime, *cid, *context, *name, *num;
|
|
|
@ -6770,7 +6766,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
|
|
|
|
|
|
|
|
|
|
|
|
ast_callerid_parse(cid, &name, &num);
|
|
|
|
ast_callerid_parse(cid, &name, &num);
|
|
|
|
while ((res > -1) && (res != 't')) {
|
|
|
|
while ((res > -1) && (res != 't')) {
|
|
|
|
switch(res) {
|
|
|
|
switch (res) {
|
|
|
|
case '1':
|
|
|
|
case '1':
|
|
|
|
if (num) {
|
|
|
|
if (num) {
|
|
|
|
/* Dial the CID number */
|
|
|
|
/* Dial the CID number */
|
|
|
@ -7029,7 +7025,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
case '0':
|
|
|
|
case '0':
|
|
|
|
if(!ast_test_flag(vmu, VM_OPERATOR)) {
|
|
|
|
if (!ast_test_flag(vmu, VM_OPERATOR)) {
|
|
|
|
cmd = ast_play_and_wait(chan, "vm-sorry");
|
|
|
|
cmd = ast_play_and_wait(chan, "vm-sorry");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|