Index: app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.91 diff -u -r1.91 app_voicemail.c --- apps/app_voicemail.c 12 May 2004 00:17:31 -0000 1.91 +++ apps/app_voicemail.c 20 May 2004 02:08:47 -0000 @@ -115,6 +115,7 @@ int saycid; int review; int operator; + int envelope; struct ast_vm_user *next; }; @@ -227,6 +228,7 @@ static int reviewvm; static int calloper; static int saycidinfo; +static int hearenv; static char dialcontext[80]; static char callcontext[80]; @@ -254,6 +256,8 @@ vmu->operator = 1; if (saycidinfo) vmu->saycid = 1; + if (hearenv) + vmu->envelope = 1; if (callcontext) strncpy(vmu->callback, callcontext, sizeof(vmu->callback) -1); if (dialcontext) @@ -294,6 +298,11 @@ vmu->operator = 1; else vmu->operator = 0; + } else if (!strcasecmp(var, "envelope")){ + if(ast_true(value)) + vmu->envelope = 1; + else + vmu->envelope = 0; } else if (!strcasecmp(var, "callback")) { strncpy(vmu->callback, value, sizeof(vmu->callback) -1); } else if (!strcasecmp(var, "dialout")) { @@ -2706,7 +2715,7 @@ if(!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */ context = ast_variable_retrieve(msg_cfg, "message","macrocontext"); - if (!res) + if ((!res)&&(vmu->envelope)) res = play_message_datetime(chan, vmu, origtime, filename); if ((!res)&&(vmu->saycid)) @@ -3588,6 +3597,7 @@ char *astsaycid; char *astcallop; char *astreview; + char *asthearenv; char *silencestr; char *thresholdstr; char *fmt; @@ -3739,6 +3749,13 @@ astsaycid = "no"; } saycidinfo = ast_true(astsaycid); + + hearenv = 1; + if (!(asthearenv = ast_variable_retrieve(cfg, "general", "envelope"))) { + ast_log(LOG_DEBUG,"ENVELOPE before msg enabled globally\n"); + asthearenv = "yes"; + } + hearenv = ast_true(asthearenv); if ((dialoutcxt = ast_variable_retrieve(cfg, "general", "dialout"))) { strncpy(dialcontext, dialoutcxt, sizeof(dialcontext) - 1); Index: voicemail.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/voicemail.conf.sample,v retrieving revision 1.30 diff -u -r1.30 voicemail.conf.sample --- configs/voicemail.conf.sample 10 May 2004 13:27:39 -0000 1.30 +++ configs/voicemail.conf.sample 20 May 2004 02:17:09 -0000 @@ -90,24 +90,30 @@ ; received, to the given mailbox. If pager is specified, a message will be sent there as well. ; ; Advanced options example is extension 4069 -; NOTE: All options can be expressed globally in the general section, and overriden in the per-mailbox settings. +; NOTE: All options can be expressed globally in the general section, and overriden in the per-mailbox +; settings. ; -; tz=central (timezone from zonemessages above) -; attach=yes (attach the voicemail to the notification email *NOT* the pager email) -; saycid=yes (say the caller id information before the message. If not described, or set to no, it will be in the envelope) -; dialout=fromvm (context to dial out from [option 4 from the advanced menu]; if not listed, dialing out will not be permitted) -; callback=fromvm (context to call back from; if not listed, calling the sender back will not be permitted) -; review=yes (allow sender to review/rerecord their message before saving it) -; operator=yes (allow sender to hit 0 after leaving a voicemail to reach an operator) -; - +; tz=central ; Timezone from zonemessages above +; attach=yes ; Attach the voicemail to the notification email *NOT* the pager email +; saycid=yes ; Say the caller id information before the message. If not described, + ; or set to no, it will be in the envelope +; dialout=fromvm ; Context to dial out from [option 4 from the advanced menu] + ; if not listed, dialing out will not be permitted +; callback=fromvm ; Context to call back from + ; if not listed, calling the sender back will not be permitted +; review=yes ; Allow sender to review/rerecord their message before saving it [OFF by default +; operator=yes ; Allow sender to hit 0 before/after/during leaving a voicemail to + ; reach an operator [OFF by default] +; envelope=no ; Turn on/off envelope playback before message playback. [ON by default] + ; This does NOT affect option 3,3 from the advanced options menu + [default] 1234 => 4242,Example Mailbox,root@localhost ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => 5432,Sales,sales@marko.net -;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes +;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envelope=yes ;4110 => 3443,Rob Flynn,rflynn@blueridge.net ;