#define VM_MESSAGEWRAP (1 << 17) /*!< Wrap around from the last message to the first, and vice-versa */
#define VM_FWDURGAUTO (1 << 18) /*!< Autoset of Urgent flag on forwarded Urgent messages set globally */
#define VM_EMAIL_EXT_RECS (1 << 19) /*!< Send voicemail emails when an external recording is added to a mailbox */
+#define VM_MARK_URGENT (1 << 20) /*!< After recording, permit the caller to mark the message as urgent */
#define ERROR_LOCK_PATH -100
#define ERROR_MAX_MSGS -101
#define OPERATOR_EXIT 300
ast_set2_flag(vmu, ast_true(value), VM_SVMAIL);
} else if (!strcasecmp(var, "review")){
ast_set2_flag(vmu, ast_true(value), VM_REVIEW);
+ } else if (!strcasecmp(var, "leaveurgent")){
+ ast_set2_flag(vmu, ast_true(value), VM_MARK_URGENT);
} else if (!strcasecmp(var, "tempgreetwarn")){
ast_set2_flag(vmu, ast_true(value), VM_TEMPGREETWARN);
} else if (!strcasecmp(var, "messagewrap")){
/* language parameter seems to only be used for display in manager action */
static const char options_string[] = "attach=yes|attachfmt=wav49|"
"serveremail=someguy@digium.com|fromstring=Voicemail System|tz=central|delete=yes|saycid=yes|"
- "sendvoicemail=yes|review=yes|tempgreetwarn=yes|messagewrap=yes|operator=yes|"
+ "sendvoicemail=yes|review=yes|tempgreetwarn=yes|messagewrap=yes|operator=yes|leaveurgent=yes|"
"envelope=yes|moveheard=yes|sayduration=yes|saydurationm=5|forcename=yes|"
"forcegreetings=yes|callback=somecontext|dialout=somecontext2|"
"exitcontext=somecontext3|minsecs=10|maxsecs=100|nextaftercmd=yes|"
ast_test_status_update(test, "Parse failure for review option\n");
res = 1;
}
+ if (!ast_test_flag(vmu, VM_MARK_URGENT)) {
+ ast_test_status_update(test, "Parse failure for leaveurgent option\n");
+ res = 1;
+ }
if (!ast_test_flag(vmu, VM_TEMPGREETWARN)) {
ast_test_status_update(test, "Parse failure for tempgreetwarm option\n");
res = 1;
"DeleteMessage: %s\r\n"
"VolumeGain: %.2f\r\n"
"CanReview: %s\r\n"
+ "CanMarkUrgent: %s\r\n"
"CallOperator: %s\r\n"
"MaxMessageCount: %d\r\n"
"MaxMessageLength: %d\r\n"
ast_test_flag(vmu, VM_DELETE) ? "Yes" : "No",
vmu->volgain,
ast_test_flag(vmu, VM_REVIEW) ? "Yes" : "No",
+ ast_test_flag(vmu, VM_MARK_URGENT) ? "Yes" : "No",
ast_test_flag(vmu, VM_OPERATOR) ? "Yes" : "No",
vmu->maxmsg,
vmu->maxsecs,
}
ast_set2_flag((&globalflags), ast_true(val), VM_REVIEW);
+ if (!(val = ast_variable_retrieve(cfg, "general", "leaveurgent"))){
+ val = "yes";
+ } else if (ast_false(val)) {
+ ast_debug(1, "VM leave urgent messages disabled globally\n");
+ val = "no";
+ }
+ ast_set2_flag((&globalflags), ast_true(val), VM_MARK_URGENT);
+
/* Temporary greeting reminder */
if (!(val = ast_variable_retrieve(cfg, "general", "tempgreetwarn"))) {
ast_debug(1, "VM Temporary Greeting Reminder Option disabled globally\n");
}
break;
case '4':
- if (outsidecaller) { /* only mark vm messages */
+ if (outsidecaller && ast_test_flag(vmu, VM_MARK_URGENT)) { /* only mark vm messages */
/* Mark Urgent */
if ((flag && ast_strlen_zero(flag)) || (!ast_strlen_zero(flag) && strcmp(flag, "Urgent"))) {
ast_verb(3, "marking message as Urgent\n");
return cmd;
if (msg_exists) {
cmd = ast_play_and_wait(chan, "vm-review");
- if (!cmd && outsidecaller) {
+ if (!cmd && outsidecaller && ast_test_flag(vmu, VM_MARK_URGENT)) {
if ((flag && ast_strlen_zero(flag)) || (!ast_strlen_zero(flag) && strcmp(flag, "Urgent"))) {
cmd = ast_play_and_wait(chan, "vm-review-urgent");
} else if (flag) {