From c22104fbe271e4998a87fadb7f02701542836c88 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:05:25 +0700 Subject: [PATCH] allow outbound cdr has sip_parent_callid (#149) * allow outbound cdr has sip_parent_callid * update time series version --- lib/call-session.js | 1 + package-lock.json | 9 +++++---- package.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/call-session.js b/lib/call-session.js index 4c73814..7c8328c 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -71,6 +71,7 @@ const initCdr = (req, invite) => { account_sid: req.get('X-Account-Sid'), call_sid: req.get('X-Call-Sid'), sip_callid: invite.get('Call-ID'), + ...(req.has('X-CID') && {sip_parent_callid: req.get('X-CID')}), ...(applicationSid && {application_sid: applicationSid}), from, to, diff --git a/package-lock.json b/package-lock.json index c050b00..e211836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@jambonz/rtpengine-utils": "^0.4.4", "@jambonz/siprec-client-utils": "^0.2.7", "@jambonz/stats-collector": "^0.1.10", - "@jambonz/time-series": "^0.2.8", + "@jambonz/time-series": "^0.2.10", "cidr-matcher": "^2.1.1", "debug": "^4.3.4", "drachtio-fn-b2b-sugar": "^0.1.0", @@ -646,9 +646,10 @@ } }, "node_modules/@jambonz/time-series": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.8.tgz", - "integrity": "sha512-iFSKPAEElb3NXVAKYlr+2Q08zNhv8SlsS4I1Bwg4gFIj4Tku0vHzoXk6WTCzMRY1hE4YbBPbImNYLW9BfzMJjw==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.10.tgz", + "integrity": "sha512-Y7Ih2ej6SxK2kZzI1BRLL5ytaxicmIPI/uZB5Sf02kl1/O/ddJ45/xI7OipSu8SPkTuRLRJwkFgTmYekBiUHfw==", + "license": "MIT", "dependencies": { "debug": "^4.3.1", "influx": "^5.9.3" diff --git a/package.json b/package.json index 8ebac52..3af6baf 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@jambonz/rtpengine-utils": "^0.4.4", "@jambonz/siprec-client-utils": "^0.2.7", "@jambonz/stats-collector": "^0.1.10", - "@jambonz/time-series": "^0.2.8", + "@jambonz/time-series": "^0.2.10", "cidr-matcher": "^2.1.1", "debug": "^4.3.4", "drachtio-fn-b2b-sugar": "^0.1.0",