Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 71637) +++ apps/app_voicemail.c (working copy) @@ -2033,8 +2033,8 @@ fprintf(p, "X-Asterisk-VM-Extension: %s" ENDL, mailbox); fprintf(p, "X-Asterisk-VM-Priority: %d" ENDL, chan->priority); fprintf(p, "X-Asterisk-VM-Caller-channel: %s" ENDL, chan->name); - fprintf(p, "X-Asterisk-VM-Caller-ID-Num: %s" ENDL, cidnum); - fprintf(p, "X-Asterisk-VM-Caller-ID-Name: %s" ENDL, cidname); + /* JAR - changed to combine name and ID */ + fprintf(p, "X-Asterisk-VM-Caller-ID: \"%s\" <%s>" ENDL, cidname, cidnum); fprintf(p, "X-Asterisk-VM-Duration: %d" ENDL, duration); if (!ast_strlen_zero(category)) fprintf(p, "X-Asterisk-VM-Category: %s" ENDL, category); @@ -4596,27 +4596,37 @@ } /* Get info from headers!! */ - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:", buf, sizeof(buf)))) + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID:"); + + if (temp) ast_copy_string(cid, temp, sizeof(cid)); else cid[0] = '\0'; - - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Context:", buf, sizeof(buf)))) + + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Context:"); + + if (temp) ast_copy_string(context, temp, sizeof(context)); else context[0] = '\0'; - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:", buf, sizeof(buf)))) + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:"); + + if (temp) ast_copy_string(origtime, temp, sizeof(origtime)); else origtime[0] = '\0'; - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Duration:", buf, sizeof(buf)))) + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Duration:"); + + if (temp) ast_copy_string(duration,temp, sizeof(duration)); else duration[0] = '\0'; - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Category:", buf, sizeof(buf)))) + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Category:"); + + if (temp) ast_copy_string(category,temp, sizeof(category)); else category[0] = '\0'; @@ -8348,21 +8358,29 @@ } /* Get info from headers!! */ - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:", buf, sizeof(buf)))) - ast_copy_string(cidS, temp, sizeof(cidS)); - else + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID:"); + if (temp) { + ast_copy_string(cidS,temp, sizeof(cidS)); + if(option_debug > 2) + ast_log (LOG_DEBUG,"header X-Asterisk-VM-Caller-ID is %s\n",temp); + } else { cidS[0] = '\0'; + if(option_debug > 2) + ast_log (LOG_DEBUG,"header X-Asterisk-VM-Caller-ID is NOT SET\n"); + } cid = &cidS[0]; - - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Context:", buf, sizeof(buf)))) + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Context:"); + + if (temp) ast_copy_string(contextS,temp, sizeof(contextS)); else contextS[0] = '\0'; context = &contextS[0]; - - if ((temp = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:", buf, sizeof(buf)))) + temp = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:"); + + if (temp) ast_copy_string(origtimeS,temp, sizeof(origtimeS)); else origtimeS[0] = '\0';