rest:dial support timeLimit (#1024)

* rest:dial support timeLimit

* wip

* wip

* clear maxCallDuration timer
This commit is contained in:
Quan HL
2025-02-26 20:39:40 +07:00
parent db3f7937e9
commit 4dd3a4a4e7
2 changed files with 9 additions and 8 deletions

View File

@@ -2685,7 +2685,6 @@ Duration=${duration} `
this.verbHookSpan = null; this.verbHookSpan = null;
} }
} }
}
async startMaxCallDurationTimer(timeLimit) { async startMaxCallDurationTimer(timeLimit) {
if (!this._maxCallDurationTimer && timeLimit > 0) { if (!this._maxCallDurationTimer && timeLimit > 0) {
@@ -2706,6 +2705,7 @@ Duration=${duration} `
} }
this._jambonzHangup('Max Call Duration'); this._jambonzHangup('Max Call Duration');
this._maxCallDurationTimer = null; this._maxCallDurationTimer = null;
}
} }
module.exports = CallSession; module.exports = CallSession;

15
package-lock.json generated
View File

@@ -17,7 +17,7 @@
"@jambonz/realtimedb-helpers": "^0.8.8", "@jambonz/realtimedb-helpers": "^0.8.8",
"@jambonz/speech-utils": "^0.1.20", "@jambonz/speech-utils": "^0.1.20",
"@jambonz/stats-collector": "^0.1.10", "@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.9", "@jambonz/time-series": "^0.2.13",
"@jambonz/verb-specifications": "^0.0.91", "@jambonz/verb-specifications": "^0.0.91",
"@opentelemetry/api": "^1.8.0", "@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-jaeger": "^1.23.0", "@opentelemetry/exporter-jaeger": "^1.23.0",
@@ -1568,9 +1568,10 @@
} }
}, },
"node_modules/@jambonz/time-series": { "node_modules/@jambonz/time-series": {
"version": "0.2.9", "version": "0.2.13",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.9.tgz", "resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.13.tgz",
"integrity": "sha512-+/Oal0mjjV4iQ8q0ymtvVJP+GqgGpYUb2bc/FD/xDxOzKtl340l9yoM3oczREJg5IvEkpExz6NogJzUiCSeVnQ==", "integrity": "sha512-Kj+l+YUnI27zZA4qoPRzjN7L82W7GuMXYq9ttDjXQ0ZBIdOLAzJjB6R3jJ3b+mvoNEQ6qG5MUtfoc6CpTFH5lw==",
"license": "MIT",
"dependencies": { "dependencies": {
"debug": "^4.3.1", "debug": "^4.3.1",
"influx": "^5.9.3" "influx": "^5.9.3"
@@ -10665,9 +10666,9 @@
} }
}, },
"@jambonz/time-series": { "@jambonz/time-series": {
"version": "0.2.9", "version": "0.2.13",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.9.tgz", "resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.13.tgz",
"integrity": "sha512-+/Oal0mjjV4iQ8q0ymtvVJP+GqgGpYUb2bc/FD/xDxOzKtl340l9yoM3oczREJg5IvEkpExz6NogJzUiCSeVnQ==", "integrity": "sha512-Kj+l+YUnI27zZA4qoPRzjN7L82W7GuMXYq9ttDjXQ0ZBIdOLAzJjB6R3jJ3b+mvoNEQ6qG5MUtfoc6CpTFH5lw==",
"requires": { "requires": {
"debug": "^4.3.1", "debug": "^4.3.1",
"influx": "^5.9.3" "influx": "^5.9.3"