TT#156052 add call->destroyed timestamp

Change-Id: I76e973faee5797c00b1f5a1e01a73df903874ccb
pull/1421/head
Richard Fuchs 4 years ago
parent f613cf6fb2
commit 45cb995b19

@ -4148,6 +4148,8 @@ del_all:
monologue_stop(ml);
}
c->destroyed = rtpe_now;
if (delete_delay > 0) {
ilog(LOG_INFO, "Scheduling deletion of entire call in %d seconds", delete_delay);
c->deleted = rtpe_now.tv_sec + delete_delay;

@ -1883,6 +1883,7 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
err = "missing 'created' timestamp";
if (redis_hash_get_timeval(&c->created, &call, "created"))
goto err8;
redis_hash_get_timeval(&c->destroyed, &call, "destroyed");
c->last_signal = last_signal;
if (redis_hash_get_int(&i, &call, "tos"))
c->tos = 184;
@ -2201,6 +2202,7 @@ char* redis_encode_json(struct call *c) {
{
JSON_SET_SIMPLE("created","%lli", timeval_us(&c->created));
JSON_SET_SIMPLE("destroyed","%lli", timeval_us(&c->destroyed));
JSON_SET_SIMPLE("last_signal","%ld",(long int) c->last_signal);
JSON_SET_SIMPLE("tos","%u",(int) c->tos);
JSON_SET_SIMPLE("deleted","%ld",(long int) c->deleted);

@ -520,6 +520,7 @@ struct call {
str callid;
struct timeval created;
struct timeval destroyed;
time_t last_signal;
time_t deleted;
time_t ml_deleted;

Loading…
Cancel
Save