mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 00:58:34 +00:00
fixes for confirm session (#663)
* fixes for confirm session * allow empty dialconfirm array
This commit is contained in:
@@ -7,7 +7,8 @@ const {
|
||||
TaskName,
|
||||
KillReason,
|
||||
RecordState,
|
||||
AllowedSipRecVerbs
|
||||
AllowedSipRecVerbs,
|
||||
AllowedConfirmSessionVerbs
|
||||
} = require('../utils/constants');
|
||||
const moment = require('moment');
|
||||
const assert = require('assert');
|
||||
@@ -1420,6 +1421,19 @@ Duration=${duration} `
|
||||
tasks = pruned;
|
||||
}
|
||||
}
|
||||
else if (this.isConfirmCallSession) {
|
||||
const pruned = tasks.filter((t) => AllowedConfirmSessionVerbs.includes(t.name));
|
||||
if (0 === pruned.length) {
|
||||
this.logger.info({tasks},
|
||||
'CallSession:replaceApplication - filtering verbs allowed on an confirmSession call');
|
||||
return;
|
||||
}
|
||||
if (pruned.length < tasks.length) {
|
||||
this.logger.info(
|
||||
'CallSession:replaceApplication - removing verbs that are not allowed for confirmSession call');
|
||||
tasks = pruned;
|
||||
}
|
||||
}
|
||||
this.tasks = tasks;
|
||||
this.taskIdx = 0;
|
||||
this.stackIdx++;
|
||||
|
||||
Reference in New Issue
Block a user