diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 39b495d392..d548683c9d 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1317,11 +1317,16 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * } if (is_dialog) { + char *version = switch_event_get_header(helper->event, "event_count"); + if (!version) { + version = "0"; + } + stream.write_function(&stream, "\n" "\n", - switch_str_nil(switch_event_get_header(helper->event, "event_count")), + version, !strcasecmp(answer_state, "resubscribe") ? "partial" : "full", clean_id); }