Merged revisions 143404 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 17 Sep 2008 20:57:58 +0000 (20:57 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 17 Sep 2008 20:57:58 +0000 (20:57 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r143404 | tilghman | 2008-09-17 15:55:47 -0500 (Wed, 17 Sep 2008) | 6 lines

  When callerid is blank, we want to use "unknown caller" in those cases, too.
  (closes issue #13486)
   Reported by: tomo1657
   Patches:
         20080917__bug13486.diff.txt uploaded by Corydon76 (license 14)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143405 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 90e0795..1e67996 100644 (file)
@@ -3676,8 +3676,8 @@ static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu
        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_CIDNAME", (cidname ? cidname : "an unknown caller"));
-       pbx_builtin_setvar_helper(ast, "VM_CIDNUM", (cidnum ? cidnum : "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);
        pbx_builtin_setvar_helper(ast, "VM_CATEGORY", category ? ast_strdupa(category) : "no category");
        pbx_builtin_setvar_helper(ast, "VM_FLAG", flag);