From ef24ef8db9ba35cb2205edebdeb6179669789a1a Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthony.minessale@gmail.com>
Date: Tue, 21 Oct 2008 20:01:52 +0000
Subject: [PATCH] alternate fix for MODENDP-144 that does not break
 eyebeam/x-lite

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10102 d0543943-73ff-0310-b7d9-9358b9ac24b2
---
 src/mod/endpoints/mod_sofia/sofia_presence.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c
index 0da7ee7809..d0beebec30 100644
--- a/src/mod/endpoints/mod_sofia/sofia_presence.c
+++ b/src/mod/endpoints/mod_sofia/sofia_presence.c
@@ -791,6 +791,13 @@ static char *gen_pidf(char *user_agent, char *id, char *url, char *open, char *r
 {
 	if (switch_stristr("polycom", user_agent)) {
 		*ct = "application/xpidf+xml";
+
+		/* of course!, lets make a big deal over dashes. Now the stupidity is complete. */
+
+		if (!strcmp(prpid, "on-the-phone")) {
+			prpid = "onthephone";
+		}
+
 		return switch_mprintf(
 							  "<?xml version=\"1.0\"?>\n"
 							  "<!DOCTYPE presence PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n"