summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2009-06-22 16:05:08 +0000
committerRussell Bryant <russell@russellbryant.com>2009-06-22 16:05:08 +0000
commite2bfdbac0a04544cf440577d937c3c888473fe96 (patch)
treeb23d6a87630a8ed57a0890c7dceaa2717ff1935e /channels
parent87c865891238c85a18918ee11272396ea5a6182c (diff)
Merged revisions 202414 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r202414 | russell | 2009-06-22 11:00:00 -0500 (Mon, 22 Jun 2009) | 2 lines Make Polycom subscription type override check more explicit. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2cc34c143..7dc5f735b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -21544,16 +21544,20 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
make_our_tag(p->tag, sizeof(p->tag));
if (!strcmp(event, "presence") || !strcmp(event, "dialog")) { /* Presence, RFC 3842 */
+ unsigned int pidf_xml;
+
if (authpeer) /* We do not need the authpeer any more */
unref_peer(authpeer, "unref_peer, from handle_request_subscribe (authpeer 2)");
/* Header from Xten Eye-beam Accept: multipart/related, application/rlmi+xml, application/pidf+xml, application/xpidf+xml */
- /* Polycom phones only handle xpidf+xml, even if they say they can
- handle pidf+xml as well
- */
- if (strstr(p->useragent, "Polycom")) {
+
+ pidf_xml = strstr(acceptheader, "application/pidf+xml") ? 1 : 0;
+
+ /* Older versions of Polycom firmware will claim pidf+xml, but really
+ * they only support xpidf+xml. */
+ if (pidf_xml && strstr(p->useragent, "Polycom")) {
p->subscribed = XPIDF_XML;
- } else if (strstr(acceptheader, "application/pidf+xml")) {
+ } else if (pidf_xml) {
p->subscribed = PIDF_XML; /* RFC 3863 format */
} else if (strstr(acceptheader, "application/dialog-info+xml")) {
p->subscribed = DIALOG_INFO_XML;