include application_sid in cdr

This commit is contained in:
Dave Horton
2022-09-20 14:00:33 +02:00
parent fffa2748d1
commit 806cb89c37
4 changed files with 14 additions and 8 deletions
+5
View File
@@ -88,6 +88,10 @@ class CallSession extends Emitter {
return this.req.locals.account_sid;
}
get application_sid() {
return this.req.locals.application_sid;
}
get privateSipAddress() {
return this.srf.locals.privateSipAddress;
}
@@ -364,6 +368,7 @@ class CallSession extends Emitter {
...initCdr(this.req.srf, inv),
service_provider_sid: this.req.locals.service_provider_sid,
account_sid: this.req.locals.account_sid,
...(this.req.locals.application_sid && {application_sid: this.req.locals.application_sid}),
trunk
};
}
+1
View File
@@ -18,6 +18,7 @@ module.exports = (srf, logger, opts) => {
req.locals = req.locals || {};
const callId = req.get('Call-ID');
req.locals.account_sid = req.get('X-Account-Sid');
req.locals.application_sid = req.get('X-Application-Sid');
const traceId = req.locals.trace_id = req.get('X-Trace-ID');
req.locals.logger = logger.child({
callId,
+7 -7
View File
@@ -16,7 +16,7 @@
"@jambonz/rtpengine-utils": "^0.3.1",
"@jambonz/siprec-client-utils": "^0.1.4",
"@jambonz/stats-collector": "^0.1.6",
"@jambonz/time-series": "^0.2.1",
"@jambonz/time-series": "^0.2.2",
"cidr-matcher": "^2.1.1",
"debug": "^4.3.4",
"drachtio-fn-b2b-sugar": "^0.0.12",
@@ -644,9 +644,9 @@
}
},
"node_modules/@jambonz/time-series": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.1.tgz",
"integrity": "sha512-uAoeZ3ibS7kEOGdT+vaY8BB8hOV4q38eEaF+d5OvLQaHCrPonNiwB8tWhhXDwtYdDompfqVRUy/plNA9fyS7Vw==",
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.2.tgz",
"integrity": "sha512-QGljKP25R93nDenkuX7bXr7tZfsrRpHTK4ygUWzpRWIe44trY2wUcaTc+HevBSjCSshbOkB/Nn9Tzz19JTzO3w==",
"dependencies": {
"debug": "^4.3.1",
"influx": "^5.9.3"
@@ -5598,9 +5598,9 @@
}
},
"@jambonz/time-series": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.1.tgz",
"integrity": "sha512-uAoeZ3ibS7kEOGdT+vaY8BB8hOV4q38eEaF+d5OvLQaHCrPonNiwB8tWhhXDwtYdDompfqVRUy/plNA9fyS7Vw==",
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.2.tgz",
"integrity": "sha512-QGljKP25R93nDenkuX7bXr7tZfsrRpHTK4ygUWzpRWIe44trY2wUcaTc+HevBSjCSshbOkB/Nn9Tzz19JTzO3w==",
"requires": {
"debug": "^4.3.1",
"influx": "^5.9.3"
+1 -1
View File
@@ -34,7 +34,7 @@
"@jambonz/rtpengine-utils": "^0.3.1",
"@jambonz/siprec-client-utils": "^0.1.4",
"@jambonz/stats-collector": "^0.1.6",
"@jambonz/time-series": "^0.2.1",
"@jambonz/time-series": "^0.2.2",
"cidr-matcher": "^2.1.1",
"debug": "^4.3.4",
"drachtio-fn-b2b-sugar": "^0.0.12",