From 830f24e8ea964efdf943c111cc9959cdc5e7ffaa Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 27 Aug 2010 16:54:37 -0500 Subject: [PATCH] pres tweak --- src/mod/endpoints/mod_sofia/sofia_presence.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 4acc83cc03..82e975c6dd 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -519,7 +519,11 @@ static void actual_sofia_presence_event_handler(switch_event_t *event) } if (zstr(alt_event_type)) { - alt_event_type = "presence"; + if (!strcasecmp(event_type, "presence")) { + alt_event_type = "dialog"; + } else { + alt_event_type = "presence"; + } } if (from && (user = strdup(from))) { @@ -2321,6 +2325,8 @@ void sofia_presence_handle_sip_i_subscribe(int status, switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, "to", "%s@%s", to_user, to_host); switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "proto-specific-event-name", event); switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "expires", exp_delta_str); + switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "event_type", "presence"); + switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, "alt_event_type", "dialog"); switch_event_fire(&sevent); } }