|
|
@ -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));
|
|
|
|
make_our_tag(p->tag, sizeof(p->tag));
|
|
|
|
|
|
|
|
|
|
|
|
if (!strcmp(event, "presence") || !strcmp(event, "dialog")) { /* Presence, RFC 3842 */
|
|
|
|
if (!strcmp(event, "presence") || !strcmp(event, "dialog")) { /* Presence, RFC 3842 */
|
|
|
|
|
|
|
|
unsigned int pidf_xml;
|
|
|
|
|
|
|
|
|
|
|
|
if (authpeer) /* We do not need the authpeer any more */
|
|
|
|
if (authpeer) /* We do not need the authpeer any more */
|
|
|
|
unref_peer(authpeer, "unref_peer, from handle_request_subscribe (authpeer 2)");
|
|
|
|
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 */
|
|
|
|
/* 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
|
|
|
|
pidf_xml = strstr(acceptheader, "application/pidf+xml") ? 1 : 0;
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (strstr(p->useragent, "Polycom")) {
|
|
|
|
/* 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;
|
|
|
|
p->subscribed = XPIDF_XML;
|
|
|
|
} else if (strstr(acceptheader, "application/pidf+xml")) {
|
|
|
|
} else if (pidf_xml) {
|
|
|
|
p->subscribed = PIDF_XML; /* RFC 3863 format */
|
|
|
|
p->subscribed = PIDF_XML; /* RFC 3863 format */
|
|
|
|
} else if (strstr(acceptheader, "application/dialog-info+xml")) {
|
|
|
|
} else if (strstr(acceptheader, "application/dialog-info+xml")) {
|
|
|
|
p->subscribed = DIALOG_INFO_XML;
|
|
|
|
p->subscribed = DIALOG_INFO_XML;
|
|
|
|