mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
update call_uuid stuff
This commit is contained in:
@@ -1221,6 +1221,11 @@ static void core_event_handler(switch_event_t *event)
|
||||
switch_event_get_header_nil(event, "unique-id"),
|
||||
switch_event_get_header_nil(event, "old-unique-id")
|
||||
);
|
||||
|
||||
new_sql() = switch_mprintf("update channels set call_uuid='%q' where call_uuid='%q'",
|
||||
switch_event_get_header_nil(event, "unique-id"),
|
||||
switch_event_get_header_nil(event, "old-unique-id")
|
||||
);
|
||||
break;
|
||||
}
|
||||
case SWITCH_EVENT_CHANNEL_CREATE:
|
||||
@@ -1402,9 +1407,9 @@ static void core_event_handler(switch_event_t *event)
|
||||
b_uuid = switch_event_get_header_nil(event, "other-leg-unique-id");
|
||||
}
|
||||
|
||||
new_sql() = switch_mprintf("update channels set call_uuid='%q' where uuid='%s'",
|
||||
switch_event_get_header_nil(event, "channel-call-uuid"),
|
||||
switch_event_get_header_nil(event, "unique-id"));
|
||||
new_sql() = switch_mprintf("update channels set call_uuid='%q' where uuid='%s' or uuid='%s'",
|
||||
switch_event_get_header_nil(event, "channel-call-uuid"), a_uuid, b_uuid);
|
||||
|
||||
|
||||
new_sql() = switch_mprintf("insert into calls (call_uuid,call_created,call_created_epoch,"
|
||||
"caller_uuid,callee_uuid,hostname) "
|
||||
@@ -1422,6 +1427,9 @@ static void core_event_handler(switch_event_t *event)
|
||||
{
|
||||
char *uuid = switch_event_get_header_nil(event, "caller-unique-id");
|
||||
|
||||
new_sql() = switch_mprintf("update channels set call_uuid=uuid where call_uuid='%s'",
|
||||
switch_event_get_header_nil(event, "channel-call-uuid"));
|
||||
|
||||
new_sql() = switch_mprintf("delete from calls where (caller_uuid='%q' or callee_uuid='%q')",
|
||||
uuid, uuid);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user