]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
apps/app_voicemail: Fix IMAP header compatibility issue with Microsoft Exchange
authorMatthew Jordan <mjordan@digium.com>
Fri, 20 Feb 2015 15:45:35 +0000 (15:45 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 20 Feb 2015 15:45:35 +0000 (15:45 +0000)
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

apps/app_voicemail.c

index 83527d7ef98912327bbf131290e3fb6ae52ac4cd..584729f53425a3c8ecf53af0a56a3c7ecef9e135 100644 (file)
@@ -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 */