support restDial.referhook (#812)

* support restDial.referhook

* support restDial.referhook

* wip
This commit is contained in:
Hoan Luu Huu
2024-07-19 21:22:29 +07:00
committed by GitHub
parent 83191487cf
commit c9194168d2
4 changed files with 66 additions and 8 deletions

View File

@@ -17,6 +17,7 @@ class TaskRestDial extends Task {
this.call_hook = this.data.call_hook;
this.timeout = this.data.timeout || 60;
this.sipRequestWithinDialogHook = this.data.sipRequestWithinDialogHook;
this.referHook = this.data.referHook;
this.on('connect', this._onConnect.bind(this));
this.on('callStatus', this._onCallStatus.bind(this));
@@ -64,6 +65,7 @@ class TaskRestDial extends Task {
this.canCancel = false;
const cs = this.callSession;
cs.setDialog(dlg);
cs.referHook = this.referHook;
this.logger.debug('TaskRestDial:_onConnect - call connected');
if (this.sipRequestWithinDialogHook) this._initSipRequestWithinDialogHandler(cs, dlg);
try {