From: Matthew Jordan Date: Fri, 20 Feb 2015 15:45:35 +0000 (+0000) Subject: apps/app_voicemail: Fix IMAP header compatibility issue with Microsoft Exchange X-Git-Tag: 11.17.0-rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=991f979039f4ba6328cbe0b3e3434fde408891ac;p=thirdparty%2Fasterisk.git apps/app_voicemail: Fix IMAP header compatibility issue with Microsoft Exchange When interfacing with Microsoft Exchange, custom headers will be returned as all lower case. Currently, the IMAP header code will fail to parse the returned custom headers, as it will be performing a case sensitive comparison. This can cause playback of messages to fail, as needed information - such as origtime - will not be present. This patch updates app_voicemail's header parsing code to perform a case insensitive lookup for the requested custom headers. Since the headers are specific to Asterisk, e.g., 'x-asterisk-vm-orig-time', and headers should be unique in an IMAP message, this should cause no issues with other systems. ASTERISK-24787 #close Reported by: Graham Barnett patches: app_voicemail.c.patch_MSExchange uploaded by Graham Barnett (License 6685) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@432012 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 83527d7ef9..584729f534 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3234,7 +3234,7 @@ static char *get_header_by_tag(char *header, char *tag, char *buf, size_t len) if (taglen < 1) return NULL; - if (!(start = strstr(header, tag))) + if (!(start = strcasestr(header, tag))) return NULL; /* Since we can be called multiple times we should clear our buffer */