[Home]

Summary:ASTERISK-01283: [patch] configure emailsubject= in same manner of emailbody=
Reporter:swell (swell)Labels:
Date Opened:2004-03-24 14:49:47.000-0600Date Closed:2008-01-15 14:53:04.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_voicemail.c.conf-subj-with-varsub.patch
( 1) app_voicemail.c.conf-subj-with-varsub-fix.patch
( 2) app_voicemail.c.conf-subj-with-varsub-func.patch
( 3) subj-with-varsub-func2.patch.txt
( 4) voicemail.conf.sample_emailsubject.diff.txt
Description:Configure the email subject line for voicemails in the voicemail.conf file in the same way the body can be configured.
Comments:By: dant (dant) 2004-03-28 11:39:04.000-0600

I've attached a patch for app_voicemail.c that includes the configurable subject with variable substitution that was requested...

example config line...
emailsubject=New VM (${VM_MSGNUM}) - ${VM_DUR} long in mailbox ${VM_MAILBOX} from ${VM_CALLERID}

example email subject...
Subject: New VM (0) - 0:05 long in mailbox 1234 from "Dan Tucny" <7177>

Hope that helps...

By: James Golovich (jamesgolovich) 2004-03-28 13:42:05.000-0600

dant: What do you think about moving the important pieces of code (that is now duplicated twice) into a seperate function that can be called from both places.  That way if we add a new var to be susbtituted then it only have to be added in one place.

Good job though, just trying to think about the best way to implement this

By: dant (dant) 2004-03-28 14:39:42.000-0600

Sounds like a good idea... I generally try to keep changes I make as simple as possible, but doing that would make any future changes in this area more simple, so sounds good to me... I'll look at knocking up an alternative patch this evening with the bits in a function, then at least there's a choice :)

edited on: 03-28-04 13:30

By: dant (dant) 2004-03-28 18:34:46.000-0600

Couple more patches there...

First one (appearing in Mantis as subj-with-varsub-fix.patch) is the original patch, but with a fix for the setting of msgnum, it appears there is a bug in that the value is set + 1 for the standard content, but not set + 1 when variable substitution is used.

Second on (appearing in Mantis as subj-with-varsub-func.patch) does the same thing as the previous patch, but shifts the handling of the variables into a function.

By: Olle Johansson (oej) 2004-04-15 08:33:24

Dant: Have you sent in a disclaimer to Digium?

By: dant (dant) 2004-04-16 13:33:10

oej, I have not, I really should have done, this isn't the first bit of code I've supplied... I'll send myself a note to get it sorted out when I'm back in the office on Monday...

By: twisted (twisted) 2004-04-29 10:13:08

Please verify that this still works against latest cvs.  app_voicemail underwent a quite extensive update to enable enhanced featureset, which may require an update to this patch.  If needed, please update the patch.  Also, what about that disclaimer?

By: Mark Spencer (markster) 2004-05-01 19:00:43

Doesn't apply....

By: sbingner (sbingner) 2004-05-01 19:01:30

fixed the function version to apply to CVS for him... non-function already applies

By: Mark Spencer (markster) 2004-05-01 19:21:40

Added to CVS

By: Digium Subversion (svnbot) 2008-01-15 14:53:04.000-0600

Repository: asterisk
Revision: 2850

U   trunk/apps/app_voicemail.c
U   trunk/configs/voicemail.conf.sample

------------------------------------------------------------------------
r2850 | markster | 2008-01-15 14:53:04 -0600 (Tue, 15 Jan 2008) | 2 lines

Add ability to specify custom e-mail subject line (bug ASTERISK-1283)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=2850