@ -688,6 +688,7 @@ static AST_LIST_HEAD_STATIC(vmstates, vmstate);
# 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
@ -1426,6 +1427,8 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
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 " ) ) {
@ -12952,7 +12955,7 @@ AST_TEST_DEFINE(test_voicemail_vmuser)
/* 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| "
@ -13028,6 +13031,10 @@ AST_TEST_DEFINE(test_voicemail_vmuser)
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 ;
@ -13758,6 +13765,7 @@ static int append_vmu_info_astman(
" 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 "
@ -13795,6 +13803,7 @@ static int append_vmu_info_astman(
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 ,
@ -14759,6 +14768,14 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
}
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 " ) ;
@ -16328,7 +16345,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
}
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 " ) ;
@ -16405,7 +16422,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
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 ) {