Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 163006) +++ apps/app_voicemail.c (working copy) @@ -224,6 +224,7 @@ #define VM_TEMPGREETWARN (1 << 15) /*!< Remind user tempgreeting is set */ #define VM_MOVEHEARD (1 << 16) /*!< Move a "heard" message to Old after listening to it */ #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 ERROR_LOCK_PATH -100 @@ -6163,7 +6167,9 @@ char urgent_str[7] = ""; char tmptxtfile[PATH_MAX]; - ast_copy_string(urgent_str, urgent ? "Urgent" : "", sizeof(urgent_str)); + if (ast_test_flag((&globalflags), VM_FWDURGAUTO)) { + ast_copy_string(urgent_str, urgent ? "Urgent" : "", sizeof(urgent_str)); + } if (vms == NULL) return -1; dir = vms->curdir; @@ -10550,6 +10558,12 @@ } ast_set2_flag((&globalflags), ast_true(val), VM_MOVEHEARD); + if (!(val = ast_variable_retrieve(cfg, "general", "forward_urgent_auto"))) { + ast_debug(1,"Autoset of Urgent flag on forwarded Urgent messages disabled globally\n"); + val = "no"; + } + ast_set2_flag((&globalflags), ast_true(val), VM_FWDURGAUTO); + if (!(val = ast_variable_retrieve(cfg, "general", "sayduration"))) { ast_debug(1,"Duration info before msg enabled globally\n"); val = "yes"; Index: configs/voicemail.conf.sample =================================================================== --- configs/voicemail.conf.sample (revision 163006) +++ configs/voicemail.conf.sample (working copy) @@ -55,6 +55,10 @@ ; Move heard messages to the 'Old' folder automagically. Defaults to on. ;moveheard=yes ; +; Forward an urgent message as an urgent message. Defaults to no so +; sender can set the urgency on the envelope of the forwarded message. +;forward_urgent_auto=no +; ; User context is where entries from users.conf are registered. The ; default value is 'default' ;