Compare commits

...
3 Commits
Author SHA1 Message Date
Dave Horton 9ad7dc76c7 fix for #133 (#134) 2024-05-17 07:21:19 -04:00
Hoan Luu Huu 1baf7fa824 Feat/refer support conplex uri for refer-to refered-by header (#131)
* respond to reinvite request incase error

* support complex refer-to refer-by uri

* wip
2024-05-07 08:28:08 -04:00
Hoan Luu Huu d2807c69ed Feat/stats version (#132)
* respond to reinvite request incase error

* update stats colector version
2024-05-06 20:06:23 -04:00
3 changed files with 22 additions and 18 deletions
+6 -2
View File
@@ -188,6 +188,7 @@ class CallSession extends Emitter {
this.rtpEngineResource = {destroy: this.del.bind(null, this.rtpEngineOpts.common)};
let proxy, uris = [];
const mapGateways = new Map();
let encryptedMedia = false;
try {
// determine where to send the call
@@ -325,6 +326,7 @@ class CallSession extends Emitter {
*/
this.logger.info({u}, `using SRTP for outbound call, pad crypto: ${o.pad_crypto ? 'yes' : 'no'}`);
this.rtpEngineOpts = makeRtpEngineOpts(this.req, false, true, o.pad_crypto, true);
encryptedMedia = true;
}
});
// Check private network for each gw
@@ -530,6 +532,7 @@ class CallSession extends Emitter {
// these are all final failure scenarios
if (uris.length === 0 || // exhausted all targets
earlyMedia || // failure after early media
encryptedMedia || // cant crank back when using encrypted media as keys have been exchanged
!(err instanceof SipError) || // unexpected error
err.status === 487) { // caller hung up
@@ -1038,8 +1041,9 @@ Duration=${payload.duration} `
const response = await this.uac.request({
method: 'REFER',
headers: {
'Refer-To': stringifyUri(uri),
'Referred-By': stringifyUri(u),
// Make sure the uri is protected by <> if uri is complex form
'Refer-To': `<${stringifyUri(uri)}>`,
'Referred-By': `<${stringifyUri(u)}>`,
...customHeaders
}
});
+14 -14
View File
@@ -15,12 +15,12 @@
"@jambonz/realtimedb-helpers": "^0.8.8",
"@jambonz/rtpengine-utils": "^0.4.4",
"@jambonz/siprec-client-utils": "^0.2.7",
"@jambonz/stats-collector": "^0.1.9",
"@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.8",
"cidr-matcher": "^2.1.1",
"debug": "^4.3.4",
"drachtio-fn-b2b-sugar": "^0.1.0",
"drachtio-srf": "^4.5.31",
"drachtio-srf": "^4.5.35",
"express": "^4.19.2",
"pino": "^8.20.0",
"sdp-transform": "^2.14.2"
@@ -782,9 +782,9 @@
}
},
"node_modules/@jambonz/stats-collector": {
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/@jambonz/stats-collector/-/stats-collector-0.1.9.tgz",
"integrity": "sha512-JNRBaHQ47pWsXydj4gUp7zc64/0pM89a6E9pA8uQ15l1KxPGYYTrNRdone5aJqLTFOoPl3tYeF1kXj+3nU1nEA==",
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/@jambonz/stats-collector/-/stats-collector-0.1.10.tgz",
"integrity": "sha512-TTqE56/Mf0JDcR+JTB2aRheAYgiEqRWCeh1cxHKAXAuD3pvc9FKPt0TxZw797BZfkqMhK1inSPMe8HRUzm1wCQ==",
"dependencies": {
"debug": "^4.3.2",
"hot-shots": "^8.5.0"
@@ -1707,9 +1707,9 @@
}
},
"node_modules/drachtio-srf": {
"version": "4.5.31",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.31.tgz",
"integrity": "sha512-/M4J8h2aqHtMXWr8/UHngKQsY9sQQxjdd23jDTSpNVpCwgZ2/xZFhbg/B/UCjrarSRzbyDCvuluOAtaPRSw7Hw==",
"version": "4.5.35",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.35.tgz",
"integrity": "sha512-4LOb6Rjie8OHpUdqjhU8Zpkc6rquA4LBLqjH419bAJFKG/XqMYeIqPo7PF3GLy5TGghrx487RTP0DmFbH5B01g==",
"dependencies": {
"debug": "^3.2.7",
"delegates": "^0.1.0",
@@ -5993,9 +5993,9 @@
}
},
"@jambonz/stats-collector": {
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/@jambonz/stats-collector/-/stats-collector-0.1.9.tgz",
"integrity": "sha512-JNRBaHQ47pWsXydj4gUp7zc64/0pM89a6E9pA8uQ15l1KxPGYYTrNRdone5aJqLTFOoPl3tYeF1kXj+3nU1nEA==",
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/@jambonz/stats-collector/-/stats-collector-0.1.10.tgz",
"integrity": "sha512-TTqE56/Mf0JDcR+JTB2aRheAYgiEqRWCeh1cxHKAXAuD3pvc9FKPt0TxZw797BZfkqMhK1inSPMe8HRUzm1wCQ==",
"requires": {
"debug": "^4.3.2",
"hot-shots": "^8.5.0"
@@ -6659,9 +6659,9 @@
"requires": {}
},
"drachtio-srf": {
"version": "4.5.31",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.31.tgz",
"integrity": "sha512-/M4J8h2aqHtMXWr8/UHngKQsY9sQQxjdd23jDTSpNVpCwgZ2/xZFhbg/B/UCjrarSRzbyDCvuluOAtaPRSw7Hw==",
"version": "4.5.35",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.35.tgz",
"integrity": "sha512-4LOb6Rjie8OHpUdqjhU8Zpkc6rquA4LBLqjH419bAJFKG/XqMYeIqPo7PF3GLy5TGghrx487RTP0DmFbH5B01g==",
"requires": {
"debug": "^3.2.7",
"delegates": "^0.1.0",
+2 -2
View File
@@ -33,12 +33,12 @@
"@jambonz/mw-registrar": "0.2.7",
"@jambonz/rtpengine-utils": "^0.4.4",
"@jambonz/siprec-client-utils": "^0.2.7",
"@jambonz/stats-collector": "^0.1.9",
"@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.8",
"cidr-matcher": "^2.1.1",
"debug": "^4.3.4",
"drachtio-fn-b2b-sugar": "^0.1.0",
"drachtio-srf": "^4.5.31",
"drachtio-srf": "^4.5.35",
"express": "^4.19.2",
"pino": "^8.20.0",
"sdp-transform": "^2.14.2"