Browse Source

TT#156052 add call->destroyed timestamp

Change-Id: I76e973faee5797c00b1f5a1e01a73df903874ccb
pull/1421/head
Richard Fuchs 4 years ago
parent
commit
45cb995b19
3 changed files with 5 additions and 0 deletions
  1. +2
    -0
      daemon/call.c
  2. +2
    -0
      daemon/redis.c
  3. +1
    -0
      include/call.h

+ 2
- 0
daemon/call.c View File

@ -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;


+ 2
- 0
daemon/redis.c View File

@ -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);


+ 1
- 0
include/call.h View File

@ -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