rest:dial support timeLimit (#1024)

* rest:dial support timeLimit

* wip

* wip

* clear maxCallDuration timer
This commit is contained in:
Hoan Luu Huu authored and Quan HL committed 2025-02-26 20:39:15 +07:00
1 parent 380cd7f792
commit db3f7937e9
5 files changed
+98 -9

No files matched your search

+4
View File
@@ -12,6 +12,7 @@ class TaskRestDial extends Task {
this.from = this.data.from;
this.callerName = this.data.callerName;
this.timeLimit = this.data.timeLimit;
this.fromHost = this.data.fromHost;
this.to = this.data.to;
this.call_hook = this.data.call_hook;
@@ -66,6 +67,9 @@ class TaskRestDial extends Task {
const cs = this.callSession;
cs.setDialog(dlg);
cs.referHook = this.referHook;
if (this.timeLimit) {
cs.startMaxCallDurationTimer(this.timeLimit);
}
this.logger.debug('TaskRestDial:_onConnect - call connected');
if (this.sipRequestWithinDialogHook) this._initSipRequestWithinDialogHandler(cs, dlg);
try {