Feature/recent calls enhancement with sp (#47)

* write cdrs and alerts with service_provider_sid

* update to latest @jambonz/http-authenticator which sends sip headers

* add call_sid to cdr when call is connected

* write call counts by SP as well as account, bugfix to allow digit '0' in dtmf-relay
This commit is contained in:
Dave Horton
2022-09-16 11:49:42 +02:00
committed by GitHub
parent 996519404e
commit ca0c9c157c
8 changed files with 156 additions and 133 deletions
+4
View File
@@ -15,6 +15,7 @@ const opts = Object.assign({
const logger = require('pino')(opts);
const {
writeCallCount,
writeCallCountSP,
queryCdrs,
writeCdrs,
writeAlerts,
@@ -71,6 +72,7 @@ const {getRtpEngine, setRtpEngines} = require('@jambonz/rtpengine-utils')([], lo
srf.locals = {...srf.locals,
stats,
writeCallCount,
writeCallCountSP,
queryCdrs,
writeCdrs,
writeAlerts,
@@ -96,12 +98,14 @@ srf.locals = {...srf.locals,
}
};
const {
getSPForAccount,
wasOriginatedFromCarrier,
getApplicationForDidAndCarrier,
getOutboundGatewayForRefer
} = require('./lib/db-utils')(srf, logger);
srf.locals = {
...srf.locals,
getSPForAccount,
wasOriginatedFromCarrier,
getApplicationForDidAndCarrier,
getOutboundGatewayForRefer,