-static void send_conference_notify(conference_obj_t *conference, const char *status, switch_bool_t final)
+static void send_conference_notify(conference_obj_t *conference, const char *status, const char *call_id, switch_bool_t final)
{
switch_event_t *event;
char *name = NULL, *domain = NULL, *dup_domain = NULL;
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-name", name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-domain", domain);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-event", "refer");
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call_id", call_id);
if (final) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "final", "true");
switch_bool_t have_flags = SWITCH_FALSE;
const char *outcall_flags;
int track = 0;
+ const char *call_id;
if (var_event && switch_true(switch_event_get_header(var_event, "conference_track_status"))) {
track++;
+ call_id = switch_event_get_header(var_event, "conference_track_call_id");
}
*cause = SWITCH_CAUSE_NORMAL_CLEARING;
switch_mutex_unlock(conference->mutex);
if (track) {
- send_conference_notify(conference, "SIP/2.0 100 Trying\r\n", SWITCH_FALSE);
+ send_conference_notify(conference, "SIP/2.0 100 Trying\r\n", call_id, SWITCH_FALSE);
}
}
if (track) {
- send_conference_notify(conference, "SIP/2.0 481 Failure\r\n", SWITCH_TRUE);
+ send_conference_notify(conference, "SIP/2.0 481 Failure\r\n", call_id, SWITCH_TRUE);
}
goto done;
}
if (track) {
- send_conference_notify(conference, "SIP/2.0 200 OK\r\n", SWITCH_TRUE);
+ send_conference_notify(conference, "SIP/2.0 200 OK\r\n", call_id, SWITCH_TRUE);
}
rdlock = 1;
char *action = switch_event_get_header(event, "Request-Action");
char *ext = switch_event_get_header(event, "Request-Target-Extension");
char *full_url = switch_event_get_header(event, "full_url");
+ char *call_id = switch_event_get_header(event, "Request-Call-ID");
if (!ext) ext = dial_str;
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "conference_invite_uri", dial_uri);
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "conference_track_status", "true");
+ switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "conference_track_call_id", call_id);
if (!strncasecmp(ostr, "url+", 4)) {
ostr += 4;