diff --git a/plugins/janus_sip.c b/plugins/janus_sip.c index aa8154118e..41026131d9 100644 --- a/plugins/janus_sip.c +++ b/plugins/janus_sip.c @@ -5097,6 +5097,8 @@ void janus_sip_sofia_callback(nua_event_t event, int status, char const *phrase, json_t *headers = janus_sip_get_incoming_headers(sip, session); json_object_set_new(result, "headers", headers); } + if(session->callid) + json_object_set_new(info, "call_id", json_string(session->callid)); json_object_set_new(info, "result", result); int ret = gateway->push_event(session->handle, &janus_sip_plugin, session->transaction, info, NULL); JANUS_LOG(LOG_VERB, " >> Pushing event to peer: %d (%s)\n", ret, janus_get_api_error(ret)); @@ -5131,6 +5133,8 @@ void janus_sip_sofia_callback(nua_event_t event, int status, char const *phrase, json_t *headers = janus_sip_get_incoming_headers(sip, session); json_object_set_new(result, "headers", headers); } + if(session->callid) + json_object_set_new(message, "call_id", json_string(session->callid)); json_object_set_new(message, "result", result); int ret = gateway->push_event(session->handle, &janus_sip_plugin, session->transaction, message, NULL); JANUS_LOG(LOG_VERB, " >> Pushing event to peer: %d (%s)\n", ret, janus_get_api_error(ret));