}
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))) {
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);
}
}