mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2025-12-19 04:37:43 +00:00
wip
This commit is contained in:
18
lib/utils.js
18
lib/utils.js
@@ -154,17 +154,17 @@ const nudgeCallCounts = async(logger, sids, nudgeOperator, writers, direction) =
|
||||
service_provider_sid, account_sid, application_sid
|
||||
}, `call counts after ${direction > 0 ? 'increment' : 'decrement'}`);
|
||||
|
||||
if (process.env.JAMBONES_DEBUG_CALL_COUNTS) {
|
||||
const {srf} = require('..');
|
||||
const {addKey, deleteKey} = srf.locals.realtimeDbHelpers;
|
||||
//if (process.env.JAMBONES_DEBUG_CALL_COUNTS) {
|
||||
const {srf} = require('..');
|
||||
const {addKey, deleteKey} = srf.locals.realtimeDbHelpers;
|
||||
|
||||
if (direction > 0) {
|
||||
await addKey(`debug:incalls:${account_sid}:${callId}`, Date.now());
|
||||
}
|
||||
else {
|
||||
await deleteKey(`debug:incalls:${account_sid}:${callId}`);
|
||||
}
|
||||
if (direction > 0) {
|
||||
await addKey(`debug:incalls:${account_sid}:${callId}`, Date.now());
|
||||
}
|
||||
else {
|
||||
await deleteKey(`debug:incalls:${account_sid}:${callId}`);
|
||||
}
|
||||
//}
|
||||
|
||||
if (process.env.JAMBONES_TRACK_SP_CALLS) {
|
||||
writes.push(writeCallCountSP({ service_provider_sid, calls_in_progress: callsSP }));
|
||||
|
||||
Reference in New Issue
Block a user