mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
more queue fixes
This commit is contained in:
@@ -686,7 +686,13 @@ class CallSession extends Emitter {
|
||||
'X-Retain-Call-Sid': this.callSid
|
||||
}
|
||||
});
|
||||
return [200, 202].includes(res.status);
|
||||
if ([200, 202].includes(res.status)) {
|
||||
this.tasks = [];
|
||||
this.taskIdx = 0;
|
||||
this.callMoved = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
getRemainingTaskData() {
|
||||
@@ -732,6 +738,8 @@ class CallSession extends Emitter {
|
||||
* @param {number} [duration] - duration of a completed call, in seconds
|
||||
*/
|
||||
_notifyCallStatusChange({callStatus, sipStatus, duration}) {
|
||||
if (this.callMoved) return;
|
||||
|
||||
assert((typeof duration === 'number' && callStatus === CallStatus.Completed) ||
|
||||
(!duration && callStatus !== CallStatus.Completed),
|
||||
'duration MUST be supplied when call completed AND ONLY when call completed');
|
||||
|
||||
Reference in New Issue
Block a user