mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
bugfix: _evalUnansweredCallPrecondition should be checking res.finalResponseSent
This commit is contained in:
@@ -475,7 +475,7 @@ class CallSession extends Emitter {
|
|||||||
_evalUnansweredCallPrecondition(task, callSid) {
|
_evalUnansweredCallPrecondition(task, callSid) {
|
||||||
if (!this.req) throw new Error('invalid precondition unanswered_call for outbound call');
|
if (!this.req) throw new Error('invalid precondition unanswered_call for outbound call');
|
||||||
if (this.callGone) new Error(`${BADPRECONDITIONS}: call gone`);
|
if (this.callGone) new Error(`${BADPRECONDITIONS}: call gone`);
|
||||||
if (this.req.finalResponseSent) {
|
if (this.res.finalResponseSent) {
|
||||||
throw new Error(`${BADPRECONDITIONS}: final sip status already sent`);
|
throw new Error(`${BADPRECONDITIONS}: final sip status already sent`);
|
||||||
}
|
}
|
||||||
return {req: this.req, res: this.res};
|
return {req: this.req, res: this.res};
|
||||||
|
|||||||
Reference in New Issue
Block a user