feat: siprect custom headers (#95)

* feat: siprect custom headers

* update siprec client utils

* wip
This commit is contained in:
Hoan Luu Huu
2023-07-20 20:02:44 +07:00
committed by GitHub
parent 7e13c5559f
commit 6200f2b50a
3 changed files with 11 additions and 9 deletions

View File

@@ -733,6 +733,7 @@ Duration=${payload.duration} `
const to = this.req.getParsedHeader('To');
const aorFrom = from.uri;
const aorTo = to.uri;
const headers = contentType === 'application/json' && req.body ? JSON.parse(req.body) : {};
this.logger.info({to, from}, 'startCallRecording request for an outbound call');
const srsUrl = req.get('X-Srs-Url');
@@ -771,7 +772,8 @@ Duration=${payload.duration} `
del: this.del,
blockMedia: this.blockMedia,
unblockMedia: this.unblockMedia,
unsubscribe: this.unsubscribe
unsubscribe: this.unsubscribe,
headers
}));
try {
succeeded = (await Promise.all(

14
package-lock.json generated
View File

@@ -14,7 +14,7 @@
"@jambonz/mw-registrar": "0.2.4",
"@jambonz/realtimedb-helpers": "^0.8.6",
"@jambonz/rtpengine-utils": "^0.4.3",
"@jambonz/siprec-client-utils": "^0.2.5",
"@jambonz/siprec-client-utils": "^0.2.6",
"@jambonz/stats-collector": "^0.1.8",
"@jambonz/time-series": "^0.2.5",
"cidr-matcher": "^2.1.1",
@@ -628,9 +628,9 @@
}
},
"node_modules/@jambonz/siprec-client-utils": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@jambonz/siprec-client-utils/-/siprec-client-utils-0.2.5.tgz",
"integrity": "sha512-Ib3M2ecFNxi80gZRG3hcCvxXLLImti1/0bVjAtglGjo1+qn3MyirIVYDchqdabzOC2nWl5aKBEcpG30c2saIDg==",
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/@jambonz/siprec-client-utils/-/siprec-client-utils-0.2.6.tgz",
"integrity": "sha512-z2x6nghLaCfOBPcr36f+1vxsV557X3z5JW1L1RxZg8YPWkTboNIHyHxtEcAua7V9g6EB4G1qv2KDwA+iE5n5Ww==",
"dependencies": {
"sdp-transform": "^2.14.1",
"uuid": "^8.3.2"
@@ -5293,9 +5293,9 @@
}
},
"@jambonz/siprec-client-utils": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@jambonz/siprec-client-utils/-/siprec-client-utils-0.2.5.tgz",
"integrity": "sha512-Ib3M2ecFNxi80gZRG3hcCvxXLLImti1/0bVjAtglGjo1+qn3MyirIVYDchqdabzOC2nWl5aKBEcpG30c2saIDg==",
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/@jambonz/siprec-client-utils/-/siprec-client-utils-0.2.6.tgz",
"integrity": "sha512-z2x6nghLaCfOBPcr36f+1vxsV557X3z5JW1L1RxZg8YPWkTboNIHyHxtEcAua7V9g6EB4G1qv2KDwA+iE5n5Ww==",
"requires": {
"sdp-transform": "^2.14.1",
"uuid": "^8.3.2"

View File

@@ -32,7 +32,7 @@
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/mw-registrar": "0.2.4",
"@jambonz/rtpengine-utils": "^0.4.3",
"@jambonz/siprec-client-utils": "^0.2.5",
"@jambonz/siprec-client-utils": "^0.2.6",
"@jambonz/stats-collector": "^0.1.8",
"@jambonz/time-series": "^0.2.5",
"cidr-matcher": "^2.1.1",