diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-09 19:39:34 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-09 19:39:34 +0000 |
commit | 387b32481c6954c37f00cc53be5365e0f0674169 (patch) | |
tree | 4169ce1c21e17cb11537c8b0573072d0b285d98f /apps/app_voicemail.c | |
parent | 6696957139da23fe15d16dc3df03115eb521d277 (diff) |
Merged revisions 147997 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r147997 | tilghman | 2008-10-09 14:38:33 -0500 (Thu, 09 Oct 2008) | 4 lines
When blank, callerid name and number should display "unknown caller" in voicemail
emails.
(Closes issue #13643)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148000 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index cde93b515..9f2c335e8 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3677,7 +3677,8 @@ static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu pbx_builtin_setvar_helper(ast, "VM_MSGNUM", passdata); pbx_builtin_setvar_helper(ast, "VM_CONTEXT", context); pbx_builtin_setvar_helper(ast, "VM_MAILBOX", mailbox); - pbx_builtin_setvar_helper(ast, "VM_CALLERID", ast_callerid_merge(callerid, sizeof(callerid), cidname, cidnum, "Unknown Caller")); + pbx_builtin_setvar_helper(ast, "VM_CALLERID", (!ast_strlen_zero(cidname) || !ast_strlen_zero(cidnum)) ? + ast_callerid_merge(callerid, sizeof(callerid), cidname, cidnum, NULL) : "an unknown caller"); pbx_builtin_setvar_helper(ast, "VM_CIDNAME", (!ast_strlen_zero(cidname) ? cidname : "an unknown caller")); pbx_builtin_setvar_helper(ast, "VM_CIDNUM", (!ast_strlen_zero(cidnum) ? cidnum : "an unknown caller")); pbx_builtin_setvar_helper(ast, "VM_DATE", date); |