Difference between revisions of "Voicemail Emails Missing Attachment"

From Baranoski.ca
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
 
The issue here is the '''\n.''' at the end of the line.  It should be '''.\n'''
 
The issue here is the '''\n.''' at the end of the line.  It should be '''.\n'''
  
What is the difference?  The correct form puts a period at the end of the sentence.  The incorrect form starts a new line with just a period on it.  Anyone who has sent an email via a Linux command line will recognize that a line with just a period indicates the end of the message, and sends it out for delivery.  In the case of Asterisk, this happens before the audio file can be attached.
+
What is the difference?  The correct form puts a period at the end of the sentence.  The incorrect form starts a new line with just a period on it.  Anyone who has sent an email via a Linux command line will recognize that a line with just a period indicates the end of the message, and sends it out for delivery.  In the case of Asterisk, this causes the system to send the message before the audio file can be attached.
  
So the correct line is:
+
The correct line is:
 
<PRE>
 
<PRE>
 
emailbody=You have a ${VM_DUR} long new voicemail message from ${VM_CIDNAME} (${VM_CIDNUM}), on ${VM_DATE}.\n
 
emailbody=You have a ${VM_DUR} long new voicemail message from ${VM_CIDNAME} (${VM_CIDNUM}), on ${VM_DATE}.\n
 
</PRE>
 
</PRE>

Latest revision as of 01:46, 31 January 2015

For some reason, I cannot find anyone else who has stumbled upon this issue.

Asterisk can send a voicemail audio file as an email attachment to the mailbox user. If you have customized your voicemail.conf file, these attachments may start disappearing. The message goes though, but the audio file is no longer attached.

I had customized my voicemail.conf file to include a more brief, but still informative, email body:

emailbody=You have a ${VM_DUR} long new voicemail message from ${VM_CIDNAME} (${VM_CIDNUM}), on ${VM_DATE}\n.

The issue here is the \n. at the end of the line. It should be .\n

What is the difference? The correct form puts a period at the end of the sentence. The incorrect form starts a new line with just a period on it. Anyone who has sent an email via a Linux command line will recognize that a line with just a period indicates the end of the message, and sends it out for delivery. In the case of Asterisk, this causes the system to send the message before the audio file can be attached.

The correct line is:

emailbody=You have a ${VM_DUR} long new voicemail message from ${VM_CIDNAME} (${VM_CIDNUM}), on ${VM_DATE}.\n