[svn-commits] oej: branch oej/minivoicemail r58577 - in /team/oej/minivoicemail: apps/ conf...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Mar 9 12:35:52 MST 2007


Author: oej
Date: Fri Mar  9 13:35:51 2007
New Revision: 58577

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58577
Log:
Fixing some issues with the notify application

Modified:
    team/oej/minivoicemail/apps/app_minivm.c
    team/oej/minivoicemail/configs/minivm.conf.sample

Modified: team/oej/minivoicemail/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/oej/minivoicemail/apps/app_minivm.c?view=diff&rev=58577&r1=58576&r2=58577
==============================================================================
--- team/oej/minivoicemail/apps/app_minivm.c (original)
+++ team/oej/minivoicemail/apps/app_minivm.c Fri Mar  9 13:35:51 2007
@@ -1431,7 +1431,7 @@
 }
 
 /*! \brief Send message to voicemail account owner */
-static int notify_new_message(struct ast_channel *chan, struct minivm_account *vmu, const char *filename, long duration, const char *format, char *cidnum, char *cidname)
+static int notify_new_message(struct ast_channel *chan, const char *templatename, struct minivm_account *vmu, const char *filename, long duration, const char *format, char *cidnum, char *cidname)
 {
 	char ext_context[PATH_MAX], *stringp;
 	struct minivm_template *etemplate;
@@ -1449,6 +1449,8 @@
 	}
 
 	etemplate = message_template_find(vmu->etemplate);
+	if (!etemplate)
+		etemplate = message_template_find(templatename);
 	if (!etemplate)
 		etemplate = message_template_find("email-default");
 
@@ -1675,7 +1677,7 @@
 	char *tmpptr;
 	struct minivm_account *vmu;
 	char *username = argv[0];
-	const char *template;
+	const char *template = "";
 	const char *filename;
 	const char *format;
 	const char *duration_string;
@@ -1725,7 +1727,7 @@
 	duration_string = pbx_builtin_getvar_helper(chan, "MVM_DURATION");
 	/* Notify of new message to e-mail and pager */
 	if (!ast_strlen_zero(filename)) {
-		res = notify_new_message(chan, vmu, filename, atoi(duration_string), format, chan->cid.cid_num, chan->cid.cid_name);
+		res = notify_new_message(chan, template, vmu, filename, atoi(duration_string), format, chan->cid.cid_num, chan->cid.cid_name);
 	};
 
 	pbx_builtin_setvar_helper(chan, "MINIVM_NOTIFY_STATUS", res == 0 ? "SUCCESS" : "FAILED");

Modified: team/oej/minivoicemail/configs/minivm.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/minivoicemail/configs/minivm.conf.sample?view=diff&rev=58577&r1=58576&r2=58577
==============================================================================
--- team/oej/minivoicemail/configs/minivm.conf.sample (original)
+++ team/oej/minivoicemail/configs/minivm.conf.sample Fri Mar  9 13:35:51 2007
@@ -20,7 +20,7 @@
 ;
 ; Who the e-mail notification should appear to come from
 serveremail=asterisk
-;serveremail=asterisk at linux-support.net
+;serveremail=asterisk at asterisk.example.com
 ; Minimum length of a voicemail message in seconds for the message to be kept
 ; The default is no minimum.
 ;minmessage=3
@@ -137,7 +137,7 @@
 [template-sv_SE_email] 
 messagebody=Hej ${VM_NAME}:\n\n\tDu har fått ett röstbrevlåde-meddelande från ${VM_CALLERID}.\nLängd: ${VM_DUR}\nMailbox ${VM_MAILBOX}\nDatum:  ${VM_DATE}. \nMeddelandet bifogas det här brevet. Om du inte kan läsa det, kontakta intern support. \nHälsningar\n\n\t\t\t\t--Asterisk\n
 subject = Du har fått röstmeddelande (se bilaga)
-fromemail = swedish-voicemail-service at digium.com
+fromemail = swedish-voicemail-service at stockholm.example.com
 fromaddress = Asterisk Röstbrevlåda
 charset=iso-8859-1
 attachmedia=yes 
@@ -194,11 +194,12 @@
 
 ; Remember that you can use Asterisk Configuration Templates (ACT)
 
-;	[template at domain](!)		; Declare template
-;	fromaddress = pbx at domain
-;	etemplate = sv_se
-; 	serveremail = voicemail at voop.net
-
-;	[user2 at domain](template at domain)	; Declare user2 account using template
+;	[template at example.com](!)		; Declare template
+;	setvar=customerdomain=example.com
+;	setvar=customerclass=gold
+;	etemplate = sv_se_email
+; 	serveremail = voicemail at example.com
+
+;	[user2 at example.com](template at example.com)	; Declare user2 account using template
 ;	fullname = Olle E. Johansson
 ;					; User inherits everything from template



More information about the svn-commits mailing list