[asterisk-bugs] [Asterisk 0013486]: [patch] ${VM_CALLERID} string content varies between email subject and body when callidname is NULL
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Sep 17 15:46:12 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13486
======================================================================
Reported By: tomo1657
Assigned To: Corydon76
======================================================================
Project: Asterisk
Issue ID: 13486
Category: Applications/app_voicemail
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: 1.6.0-rc6
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0
SVN Revision (number only!): 143199
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-09-15 17:49 CDT
Last Modified: 2008-09-17 15:46 CDT
======================================================================
Summary: [patch] ${VM_CALLERID} string content varies between
email subject and body when callidname is NULL
Description:
When the calleridname is null in make_email_file(), the resulting string in
the email's custom subject and the custom body replaced by the
${VM_CALLERID} in voicemail.conf ends up different.
Conditions:
cidname: NULL
cidnum: 1234567890
Results:
In subject, ${VM_CALLERID} becomes: "" <123456890>
In body, ${VM_CALLERID} becomes: 1234567890
This is because the subject uses "enc_cidname" variable instead of tbe
"cidname" variable.
The value of "enc_cidname" is initialized to an empty string and remains
so even when "cidname" is NULL.
Meanwhile ast_callerid_merge() function returns different values depending
on whether the "cidname" is NULL or empty string, so the ${VM_CALLERID}
replaced by it ends up being different in the subject and the body.
Fix Suggestion:
We could Pass NULL instead of "enc_cidname" to prep_email_sub_vars() when
"cidname" is also null.
This avoides changing any of the subfunctions or altering "enc_cidname"
type or value.
Line 3333 Before:
prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, enc_cidnum,
enc_cidname, dur, date, passdata, vmlen, cat\
egory, flag);
Line 3333 After:
prep_email_sub_vars(ast, vmu, msgnum + 1, context, mailbox, enc_cidnum,
cidname?enc_cidname:NULL, dur, date, passdata, vmlen, cat\
egory, flag);
The same change applies to Line 3355.
A patch with these two changes is included.
======================================================================
----------------------------------------------------------------------
(0092640) svnbot (reporter) - 2008-09-17 15:46
http://bugs.digium.com/view.php?id=13486#c92640
----------------------------------------------------------------------
Repository: asterisk
Revision: 143404
U branches/1.4/apps/app_voicemail.c
------------------------------------------------------------------------
r143404 | tilghman | 2008-09-17 15:46:11 -0500 (Wed, 17 Sep 2008) | 6
lines
When callerid is blank, we want to use "unknown caller" in those cases,
too.
(closes issue http://bugs.digium.com/view.php?id=13486)
Reported by: tomo1657
Patches:
20080917__bug13486.diff.txt uploaded by Corydon76 (license 14)
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=143404
Issue History
Date Modified Username Field Change
======================================================================
2008-09-17 15:46 svnbot Checkin
2008-09-17 15:46 svnbot Note Added: 0092640
======================================================================
More information about the asterisk-bugs
mailing list