Skip to content

Commit

Permalink
add call_id in received sip message (meetecho#2563)
Browse files Browse the repository at this point in the history
Add call_id in received SIP MESSAGE and INFO
  • Loading branch information
tvildo committed Feb 22, 2021
1 parent 8246452 commit beb28be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/janus_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit beb28be

Please sign in to comment.