mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-07-04 19:32:04 +00:00
include application_sid in cdr
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Generated
+7
-7
@@ -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
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user