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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Mar 10 11:59:31 MST 2007


Author: oej
Date: Sat Mar 10 12:59:30 2007
New Revision: 58733

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58733
Log:
Documentation updates

Modified:
    team/oej/minivoicemail/apps/app_minivm.c
    team/oej/minivoicemail/configs/extensions_minivm.conf.sample
    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=58733&r1=58732&r2=58733
==============================================================================
--- team/oej/minivoicemail/apps/app_minivm.c (original)
+++ team/oej/minivoicemail/apps/app_minivm.c Sat Mar 10 12:59:30 2007
@@ -265,7 +265,7 @@
 	"be used with default options (set in minivm.conf).\n"
 	"The recorded file name and path will be read from MVM_FILENAME and the \n"
 	"duration of the message will be accessed from MVM_DURATION (set by MinivmRecord() )\n"
-	"If the channel variable MWM_COUNTER is set, this will be used in the\n"
+	"If the channel variable MVM_COUNTER is set, this will be used in the\n"
 	"message file name and available in the template for the message.\n"
 	"If not template is given, the default email template will be used to send email and\n"
 	"default pager template to send paging message (if the user account is configured with\n"

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=58733&r1=58732&r2=58733
==============================================================================
--- team/oej/minivoicemail/configs/extensions_minivm.conf.sample (original)
+++ team/oej/minivoicemail/configs/extensions_minivm.conf.sample Sat Mar 10 12:59:30 2007
@@ -47,29 +47,20 @@
 exten => minivm,1,answer
 exten => minivm,n,wait(0.5)	; Wait for Voip channels to settle
 exten => minivm,n,set(account=oej at example.com)
-exten => minivm,n,set(MWM_COUNTER = ${MINIVMCOUNTER(${account}:voicemailcounter)}
 exten => minivm,n,noop(------------------------------------------- Minivm Greet   -------------)
 exten => minivm,n,minivmgreet(${account})
 exten => minivm,n,verbose(1,-- MINIVM_GREET_STATUS = ${MINIVM_GREET_STATUS} )
 exten => minivm,n,noop(------------------------------------------- Minivm Record  -------------)
 exten => minivm,n,minivmRecord(${account},b)
-exten => minivm,n,verbose(1,-- MINIVM_RECORD_STATUS = ${MINIVM_RECORD_STATUS} )
-exten => minivm,n,gotoif($[${MINIVM_RECORD_STATUS} != SUCCESS]?minivmrecordfailure,1)
+exten => minivm,n,goto(minivmcleanup,1)
 
+; Cleanup after recording or hangup
+exten => minivmcleanup,1,noop(------------------------------------------- Minivm Notify  -------------)
 ;Increment voicemail counter with 1. The counter will be used in the e-mail message
 ;and in the filename
-exten => minivm,n,set(MINIVMCOUNTER(${account}:voicemailcounter:inc) = 1)
-exten => minivm,n,set(MWM_COUNTER = ${MINIVMCOUNTER(${account}:voicemailcounter)}
-exten => minivm,n,noop(------------------------------------------- Minivm Notify  -------------)
-exten => minivm,n,minivmNotify(${account})
-exten => minivm,n,verbose(1,-- MINIVM_NOTIFY_STATUS = ${MINIVM_NOTIFY_STATUS} )
-; Now, clean up after sending voicemail
-exten => minivm,n,noop(------------------------------------------- Minivm Delete  -------------)
-exten => minivm,n,minivmdelete()
-exten => minivm,n,verbose(1,-- MINIVM_DELETE_STATUS = ${MINIVM_DELETE_STATUS} )
-exten => minivm,n,hangup
-
-exten => minivmcleanup,1,noop(------------------------------------------- Minivm Notify  -------------)
+exten => minivmcleanup,n,gotoif($[${MINIVM_RECORD_STATUS} != SUCCESS]?minivmrecordfailure,1)
+exten => minivmcleanup,n,set(MINIVMCOUNTER(${account}:voicemailcounter:inc) = 1)
+exten => minivmcleanup,n,set(MWM_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
@@ -78,7 +69,7 @@
 exten => minivmcleanup,n,verbose(1,-- MINIVM_DELETE_STATUS = ${MINIVM_DELETE_STATUS} )
 
 ;Recording failed
-exten => minivmrecordfailure,1,play(vm-sorry)
+exten => minivmrecordfailure,1,playback(vm-sorry)
 exten => minivmrecordfailure,n,wait(1)
 exten => minivmrecordfailure,n,hangup
 
@@ -129,3 +120,40 @@
 exten => record,1,minivmappmess(${ARGV1},${ARGV2})
 exten => record,n,noop(Recording status: ${MINIVM_APPMESS_STATUS})
 exten => record,n,macroreturn
+
+;.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
+; To set a counter and use a template for voicemail to users without acounts
+; use something like this
+;
+; email address is in the "account" channel variable. Set from ast_db or a script
+; based on called ID
+
+exten => sendvoicemail,1,answer
+exten => sendvoicemail,n,wait(0.5)
+exten => sendvoicemail,n,set(domain=${CUT(account,@,2)})
+exten => sendvoicemail,n,set(country=${CUT(domain,.,2)})
+exten => sendvoicemail,n,minivmgreet(${account})
+exten => sendvoicemail,n,minivmRecord(${account},b)
+exten => sendvoicemail,n,goto(sendvmcleanup)
+
+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)}
+; 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)
+
+; Send voicemail in e-mail with country-specific template
+; The template need to be defined in minivm.conf
+;
+exten => sendvmcleanup,n,minivmNotify(${account}, ${country}_email)
+exten => sendvmcleanup,n,minivmDelete()
+
+exten => sendvmcleanup,n(done),wait(0.5)
+exten => sendvmcleanup,n,hangup
+
+exten => h,1,gotoif($[${MINIVM_RECORD_STATUS} = SUCCESS]?sendvmcleanup,1))
+

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=58733&r1=58732&r2=58733
==============================================================================
--- team/oej/minivoicemail/configs/minivm.conf.sample (original)
+++ team/oej/minivoicemail/configs/minivm.conf.sample Sat Mar 10 12:59:30 2007
@@ -11,6 +11,20 @@
 ; MiniVM works without accounts (just give e-mail address as argument) or with accounts in
 ; this configuration file or realtime. The idea is to build voicemail as building blocks so that
 ; a complete and adaptive voicemail system can be built in the dialplan
+;
+;------------------------------ Variables to use in subject, from and message body ------------------
+; Change the from, body and/or subject, variables:
+;     MVM_NAME, MVM_DUR, MVM_MSGNUM, VM_MAILBOX, MVM_CALLERID, MVM_CIDNUM,
+;     MVM_CIDNAME, MVM_DATE
+; 
+; In addition to these, you can set the MVM_COUNTER channel variable in the
+; dial plan and use that as a counter. It will also be used in the file name
+; of the media file attached to the message
+;
+; Note: The emailbody config row can only be up to 512 characters due to a
+;       limitation in the Asterisk configuration subsystem.
+;	To create longer mails, use the templatefile option when creating the template
+;----------------------------------------------------------------------------------------------------
 
 [general]
 ; Default format for storing and sending voicemail
@@ -53,17 +67,12 @@
 ;--------------Default e-mail message template (used if no templates are used) ------
 ;fromstring=The Asterisk PBX
 ;
-; Change the from, body and/or subject, variables:
-;     VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM,
-;     VM_CIDNAME, VM_DATE
-;
-; Note: The emailbody config row can only be up to 512 characters due to a
-;       limitation in the Asterisk configuration subsystem.
-;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}
+
+;emailsubject=[PBX]: New message ${MVM_COUNER} in mailbox ${VM_MAILBOX}
 ; The following definition is very close to the default, but the default shows
 ; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown
 ; caller", if they are both null.
-;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n
+;emailbody=Dear ${MVM_NAME}:\n\n\tjust wanted to let you know you were just left a ${MVM_DUR} long message (number ${MVM_COUNTER})\nin mailbox ${MVM_MAILBOX} from ${MVM_CALLERID}, on ${MVM_DATE}, so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n
 ;
 ; Set the date format on outgoing mails. Valid arguments can be found on the
 ; strftime(3) man page
@@ -77,7 +86,7 @@
 ; You can also change the Pager From: string, the pager body and/or subject.
 ; The above defined variables also can be used here
 ;pagerfromstring=The Asterisk PBX
-;pagersubject=New VM
+;pagersubject=New VM ${MVM_COUNTER}
 ;pagerbody=New ${MVM_DUR} long msg in box ${MVM_MAILBOX}\nfrom ${MVM_CALLERID}, on ${MVM_DATE}
 ;
 ; 
@@ -139,7 +148,7 @@
 ; messagebody = Format		; Message body definition with variables
 ;
 [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
+messagebody=Hej ${MVM_NAME}:\n\n\tDu har fått ett röstbrevlåde-meddelande från ${MVM_CALLERID}.\nLängd: ${MVM_DUR}\nMailbox ${MVM_MAILBOX}\nDatum:  ${MVM_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 stockholm.example.com
 fromaddress = Asterisk Röstbrevlåda
@@ -149,7 +158,7 @@
 locale=sv_SE
 
 [template-en_US_email] 
-messagebody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n
+messagebody=Dear ${MVM_NAME}:\n\n\tjust wanted to let you know you were just left a ${MVM_DUR} long message \nin mailbox ${MVM_MAILBOX} from ${MVM_CALLERID}, on ${MVM_DATE}, so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n
 subject = New voicemail
 charset=ascii
 attachmedia=yes 



More information about the asterisk-commits mailing list