mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-01-25 02:07:56 +00:00
fix issue where call hangs up and actionhook delay triggered (#1497)
This commit is contained in:
@@ -118,6 +118,13 @@ class ActionHookDelayProcessor extends Emitter {
|
|||||||
this.logger.debug('ActionHookDelayProcessor#_onNoResponseTimer');
|
this.logger.debug('ActionHookDelayProcessor#_onNoResponseTimer');
|
||||||
this._noResponseTimer = null;
|
this._noResponseTimer = null;
|
||||||
|
|
||||||
|
/* check if endpoint is still available (call may have ended) */
|
||||||
|
if (!this.ep) {
|
||||||
|
this.logger.debug('ActionHookDelayProcessor#_onNoResponseTimer: endpoint is null, call may have ended');
|
||||||
|
this._active = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* get the next play or say action */
|
/* get the next play or say action */
|
||||||
const verb = this.actions[this._retryCount % this.actions.length];
|
const verb = this.actions[this._retryCount % this.actions.length];
|
||||||
|
|
||||||
@@ -129,8 +136,8 @@ class ActionHookDelayProcessor extends Emitter {
|
|||||||
this._taskInProgress.exec(this.cs, {ep: this.ep}).catch((err) => {
|
this._taskInProgress.exec(this.cs, {ep: this.ep}).catch((err) => {
|
||||||
this.logger.info(`ActionHookDelayProcessor#_onNoResponseTimer: error playing file: ${err.message}`);
|
this.logger.info(`ActionHookDelayProcessor#_onNoResponseTimer: error playing file: ${err.message}`);
|
||||||
this._taskInProgress = null;
|
this._taskInProgress = null;
|
||||||
this.ep.removeAllListeners('playback-start');
|
this.ep?.removeAllListeners('playback-start');
|
||||||
this.ep.removeAllListeners('playback-stop');
|
this.ep?.removeAllListeners('playback-stop');
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.logger.info(err, 'ActionHookDelayProcessor#_onNoResponseTimer: error starting action');
|
this.logger.info(err, 'ActionHookDelayProcessor#_onNoResponseTimer: error starting action');
|
||||||
|
|||||||
Reference in New Issue
Block a user