diff --git a/lib/session/call-session.js b/lib/session/call-session.js index dbe2e53d..beec54d9 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -1793,14 +1793,14 @@ class CallSession extends Emitter { this.updateCallStatus(Object.assign({}, this.callInfo.toJSON()), this.serviceUrl) .catch((err) => this.logger.error(err, 'redis error')); - if (this.wakeupResolver && !this.dlg && this.isCurrentCallHigherThan(CallStatus.Failed)) { + if (this.wakeupResolver && !this.dlg && this.isCurrentCallStatusHigherThan(CallStatus.Failed)) { // Someone is waiting for call to be final this.wakeupResolver({reason: 'session ended'}); this.wakeupResolver = null; } } - isCurrentCallHigherThan(target) { + isCurrentCallStatusHigherThan(target) { const obj = Object.values(CallStatus); return obj.indexOf(this.callStatus) >= obj.indexOf(target); }