TT#116555 new last_hih redis key managed

Implemented to store new redis key "last_hih" to mysql cdrs.

Change-Id: I796943bf6cc07c592a5ff26f05db1dad0ab08c44
mr9.4.1
Alessio Garzi 5 years ago
parent 8e1fa0d5dd
commit a4f96220ec

@ -532,6 +532,14 @@ static int cdr_parse_srcleg_json(json_object *json, cdr_entry_t *cdr)
goto ret;
}
// source_last_hih
if (!cdr_parse_json_get_strbuf(json, "last_hih", cdr->source_last_hih)) {
L_DEBUG("Call-Id '%s' does not contain 'last_hih' key (source last hih), '%s'", cdr->call_id, json_object_get_string(json));
/// Added in mr9.4, it should be changed to -1 in mr10.+
/// goto err;
goto ret;
}
ret:
json_object_put(json);
return 0;

@ -95,6 +95,7 @@ typedef struct {
char destination_concurrent_calls_quota[32];
char destination_concurrent_calls_count[32];
char destination_concurrent_calls_count_customer[32];
char source_last_hih[32];
char acc_ref[256];
unsigned int intermediate:1;

@ -1137,6 +1137,9 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, uint64_t count, struct medmysql_b
if (medmysql_tag_cdr(batch, medmysql_tag_provider_customer, medmysql_tag_direction_destination,
"concurrent_calls_count_customer", e->destination_concurrent_calls_count_customer, e))
return -1;
if (medmysql_tag_cdr(batch, medmysql_tag_provider_customer, medmysql_tag_direction_source,
"header=History-Info", e->source_last_hih, e))
return -1;
if (e->mos.filled && batch->mos.def) {
if (medmysql_mos_record(&batch->cdr_mos, batch->num_cdrs, e->mos.avg_score,

Loading…
Cancel
Save