From 273b7f59a51b601aef1fffe24c5a7c82456f44fc Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 10 Sep 2012 18:21:08 -0500 Subject: [PATCH] FS-4595 please test --- src/mod/endpoints/mod_sofia/sofia_presence.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 5445adae11..4eaf4ab4a1 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2478,6 +2478,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * char *full_to = NULL; char *ip = NULL; char *port = 0; + const char *call_state = NULL; if (mod_sofia_globals.debug_presence > 0) { int i; @@ -2593,8 +2594,10 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * is_dialog = !strcmp(event, "dialog"); - if (helper->hup && helper->calls_up > 0 && (!is_dialog || !user_agent || !switch_stristr("polycom", user_agent) || !switch_stristr("snom", user_agent))) { - goto end; + if (helper->hup && helper->calls_up > 0) { + call_state = "CS_EXECUTE"; + } else { + call_state = switch_event_get_header(helper->event, "channel-state"); } if (helper->event) { @@ -2614,7 +2617,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * char *clean_to_user = NULL; char *clean_from_user = NULL; int force_status = 0; - const char *call_state = switch_event_get_header(helper->event, "channel-state"); + char *call_info_state = switch_event_get_header(helper->event, "presence-call-info-state"); int term = 0;