[Home]

Summary:ASTERISK-01503: VM email refers to "message (number 0)"
Reporter:octothorpe (octothorpe)Labels:
Date Opened:2004-04-29 16:09:05Date Closed:2008-01-15 14:52:43.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:If you set the "emailbody" parameter in voicemail.conf the first message to a user will say "... long message (number 0) in mailbox ..." in the body of the message even though the subject line refers to "message 1".  The number in the subject will always be greater by one.

****** ADDITIONAL INFORMATION ******

Changed a few instances of "msgnum" to "msgnum + 1" to match the rest.

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.79
diff -u -r1.79 app_voicemail.c
--- app_voicemail.c 29 Apr 2004 13:34:54 -0000 1.79
+++ app_voicemail.c 29 Apr 2004 19:45:47 -0000
@@ -821,7 +821,7 @@

if( *emailtitle)
{
- fprintf(p, emailtitle, msgnum, mailbox) ;
+ fprintf(p, emailtitle, msgnum + 1, mailbox) ;
fprintf(p,"\n") ;
}
else
@@ -850,7 +850,7 @@
memset(passdata, 0, vmlen);
pbx_builtin_setvar_helper(ast, "VM_NAME", vmu->fullname);
pbx_builtin_setvar_helper(ast, "VM_DUR", dur);
- sprintf(passdata,"%d",msgnum);
+ sprintf(passdata,"%d",msgnum + 1);
pbx_builtin_setvar_helper(ast, "VM_MSGNUM", passdata);
pbx_builtin_setvar_helper(ast, "VM_MAILBOX", mailbox);
pbx_builtin_setvar_helper(ast, "VM_CALLERID", (callerid ? callerid : "an unknown caller"));
Comments:By: octothorpe (octothorpe) 2004-04-29 16:18:24

Oops.  Shouldn't be in category "SIP" but I don't know how to change it.

By: Brian West (bkw918) 2004-04-29 16:50:06

Was fixed along time ago.  If you aren't using 0.9.0 or above please update.

By: octothorpe (octothorpe) 2004-04-29 19:46:44

This bug is present in the head of the CVS tree for this module, version 1.79 which I checked out this morning:

----------------------------
revision 1.79
date: 2004/04/29 13:34:54;  author: jeremy;  state: Exp;  lines: +14 -15
populate global options correctly. ASTERISK-1497
----------------------------

Note that the problem occurs *if* you specify "emailbody" or "emailtitle" in the general section of voicemail.conf, not if you omit them.

By: Mark Spencer (markster) 2004-04-29 20:18:32

Fixed but only in the title.  Won't touch the rest for backwards compatibility in any scripts.

By: Digium Subversion (svnbot) 2008-01-15 14:52:43.000-0600

Repository: asterisk
Revision: 2825

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r2825 | markster | 2008-01-15 14:52:42 -0600 (Tue, 15 Jan 2008) | 2 lines

Say "message 1" in title (bug ASTERISK-1503)

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

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