From 16e044cabfecf8800a62c73c47f289810551979a Mon Sep 17 00:00:00 2001 From: rammohan-y <37395033+rammohan-y@users.noreply.github.com> Date: Wed, 22 Jan 2025 17:46:44 +0530 Subject: [PATCH] feat/1053: added empty check on this.currentTask (#1054) --- lib/session/call-session.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/session/call-session.js b/lib/session/call-session.js index b141f123..43a73bfe 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -2484,7 +2484,7 @@ Duration=${duration} ` res.send(200, {body: this.ep.local.sdp}); } else { - if (this.currentTask.name === TaskName.Dial && this.currentTask.isOnHoldEnabled) { + if (this.currentTask && this.currentTask.name === TaskName.Dial && this.currentTask.isOnHoldEnabled) { this.logger.info('onholdMusic reINVITE after media has been released'); await this.currentTask.handleReinviteAfterMediaReleased(req, res); } else {