mod_sofia: Add a quick fix for basic Polycom presence support. A more sane…

mod_sofia: Add a quick fix for basic Polycom presence support.  A more sane solution need to be implemented
上级 b5205c0b
...@@ -1064,11 +1064,17 @@ static char *gen_pidf(char *user_agent, char *id, char *url, char *open, char *r ...@@ -1064,11 +1064,17 @@ static char *gen_pidf(char *user_agent, char *id, char *url, char *open, char *r
if (switch_stristr("polycom", user_agent)) { if (switch_stristr("polycom", user_agent)) {
*ct = "application/xpidf+xml"; *ct = "application/xpidf+xml";
/* of course!, lets make a big deal over dashes. Now the stupidity is complete. */ /* If unknown/none prpid is provided, just show the user as online. */
if (!prpid) { if (!prpid) {
prpid = "unknown"; prpid = "online";
}
/* FS currently send prpid closed on register, this force it to online */
if (!strncasecmp(status, "Registered", 10) && !strcasecmp(prpid, "closed")) {
prpid = "online";
} }
/* of course!, lets make a big deal over dashes. Now the stupidity is complete. */
if (!strcmp(prpid, "on-the-phone")) { if (!strcmp(prpid, "on-the-phone")) {
prpid = "onthephone"; prpid = "onthephone";
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论