[asterisk-commits] oej: branch oej/minivoicemail r58738 - in /team/oej/minivoicemail: apps/ conf...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Mar 10 12:53:09 MST 2007


Author: oej
Date: Sat Mar 10 13:53:09 2007
New Revision: 58738

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58738
Log:
Debugging

Modified:
    team/oej/minivoicemail/apps/app_minivm.c
    team/oej/minivoicemail/configs/extensions_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=58738&r1=58737&r2=58738
==============================================================================
--- team/oej/minivoicemail/apps/app_minivm.c (original)
+++ team/oej/minivoicemail/apps/app_minivm.c Sat Mar 10 13:53:09 2007
@@ -1468,6 +1468,12 @@
 
 	/* Read counter if available */
 	counter = pbx_builtin_getvar_helper(chan, "MVM_COUNTER");
+	if (option_debug > 1) {
+		if (ast_strlen_zero(counter))
+			ast_log(LOG_DEBUG, "-_-_- MVM_COUNTER not found\n");
+		else
+			ast_log(LOG_DEBUG, "-_-_- MVM_COUNTER found - will use it with value %s\n", counter);
+	}
 
 	res = sendmail(etemplate, vmu, cidnum, cidname, filename, messageformat, duration, etemplate->attachment, MVM_MESSAGE_EMAIL, counter);
 
@@ -1484,7 +1490,7 @@
 		res = sendmail(etemplate, vmu, cidnum, cidname, filename, messageformat, duration, etemplate->attachment, MVM_MESSAGE_PAGE, counter);
 	}
 
-	manager_event(EVENT_FLAG_CALL, "MiniVoiceMail", "Action: SentNotification\rn\nMailbox: %s@%s\r\n", vmu->username, vmu->domain);
+	manager_event(EVENT_FLAG_CALL, "MiniVoiceMail", "Action: SentNotification\rn\nMailbox: %s@%s\r\nCounter: %s\r\n", vmu->username, vmu->domain, counter);
 
 	run_externnotify(chan, vmu);		/* Run external notification */
 

Modified: team/oej/minivoicemail/configs/extensions_minivm.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/minivoicemail/configs/extensions_minivm.conf.sample?view=diff&rev=58738&r1=58737&r2=58738
==============================================================================
--- team/oej/minivoicemail/configs/extensions_minivm.conf.sample (original)
+++ team/oej/minivoicemail/configs/extensions_minivm.conf.sample Sat Mar 10 13:53:09 2007
@@ -59,7 +59,8 @@
 ;Increment voicemail counter with 1. The counter will be used in the e-mail message
 ;and in the filename
 exten => minivmcleanup,n,gotoif($[${MINIVM_RECORD_STATUS} != SUCCESS]?minivmrecordfailure,1)
-exten => minivmcleanup,n,set(MWM_COUNTER = ${SET(MINIVMCOUNTER(${account}:voicemailcounter:inc)=1)})
+exten => minivmcleanup,n,set(MINIVMCOUNTER(${account}:voicemailcounter:inc)=1)
+exten => minivmcleanup,n,set(MVM_COUNTER = ${MINIVMCOUNTER(${account}:voicemailcounter)})
 exten => minivmcleanup,n,minivmNotify(${account})
 exten => minivmcleanup,n,verbose(1,-- MINIVM_NOTIFY_STATUS = ${MINIVM_NOTIFY_STATUS} )
 ; Now, clean up after sending voicemail
@@ -138,9 +139,9 @@
 exten => sendvmcleanup,1,gotoif($[${MINIVM_RECORD_STATUS} != SUCCESS]?done)
 ; The counter is set in the domain directory, so we don't create one directory per user
 ; The counter has the email in the name of the counter, increase it
-exten => sendvmcleanup,n,set(MINIVMCOUNTER(${domain}:${account}-voicemailcounter:inc) = 1)
 ; Set the MVM_COUNTER variable that we use in the template
-exten => sendvmcleanup,n,set(MWM_COUNTER = ${MINIVMCOUNTER(${domain}:${account}-voicemailcounter)}
+exten => sendvmcleanup,n,set(MINIVMCOUNTER(${account}:voicemailcounter:inc)=1)
+exten => sendvmcleanup,n,set(MVM_COUNTER = ${MINIVMCOUNTER(${account}:voicemailcounter)})
 ; Increase a domain counter too, to see how many voicemails are sent to this domain
 ; This is just for statistics
 exten => sendvmcleanup,n,set(MINIVMCOUNTER(${domain}:${domain}-all:inc) = 1)



More information about the asterisk-commits mailing list