aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-09 23:30:47 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-09 23:30:47 +0000
commit865f95df1be4d4c1f2535b33ebee32ea66b29d9e (patch)
treec4bada6a34a7223c32030ce000b804764f5f4076 /apps/app_voicemail.c
parent27088848fa08254efee091645b82076a3db08bb2 (diff)
Read the callerid in the correct order and make sure to
read the Urgent flag value from the IMAP headers. (closes issue #13652) Reported by: jaroth Patches: imapheaders.patch uploaded by jaroth (license 50) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148144 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9f2c335e8..10b8d568b 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1520,9 +1520,9 @@ static int imap_retrieve_file(const char *dir, const int msgnum, const char *mai
fprintf(text_file_ptr, "%s\n", "[message]");
- get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:", buf, sizeof(buf));
- fprintf(text_file_ptr, "callerid=\"%s\" ", S_OR(buf, ""));
get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Name:", buf, sizeof(buf));
+ fprintf(text_file_ptr, "callerid=\"%s\" ", S_OR(buf, ""));
+ get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:", buf, sizeof(buf));
fprintf(text_file_ptr, "<%s>\n", S_OR(buf, ""));
get_header_by_tag(header_content, "X-Asterisk-VM-Context:", buf, sizeof(buf));
fprintf(text_file_ptr, "context=%s\n", S_OR(buf, ""));
@@ -1532,6 +1532,8 @@ static int imap_retrieve_file(const char *dir, const int msgnum, const char *mai
fprintf(text_file_ptr, "duration=%s\n", S_OR(buf, ""));
get_header_by_tag(header_content, "X-Asterisk-VM-Category:", buf, sizeof(buf));
fprintf(text_file_ptr, "category=%s\n", S_OR(buf, ""));
+ get_header_by_tag(header_content, "X-Asterisk-VM-Flag:", buf, sizeof(buf));
+ fprintf(text_file_ptr, "flag=%s\n", S_OR(buf, ""));
fclose(text_file_ptr);
exit: