aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-22 16:06:43 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-22 16:06:43 +0000
commit42145b0084a99324a121e2a1b26187e46bb84a13 (patch)
treebf3373924a11867e559d22eea743e860771ae5c6
parent5c31a80bd797fec3aef06a088ff99103d5f8a026 (diff)
Merged revisions 202415 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r202415 | russell | 2009-06-22 11:05:08 -0500 (Mon, 22 Jun 2009) | 9 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@202416 f38db490-d61c-443f-a65b-d21fe96a405b
-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 8f1d0462b..38e447720 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18696,16 +18696,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);
/* 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(accept, "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(accept, "application/pidf+xml")) {
+ } else if (pidf_xml) {
p->subscribed = PIDF_XML; /* RFC 3863 format */
} else if (strstr(accept, "application/dialog-info+xml")) {
p->subscribed = DIALOG_INFO_XML;