added initial support for dialogflow

This commit is contained in:
Dave Horton
2020-07-08 14:16:37 -04:00
parent c1112ea477
commit a4bcfca9e6
11 changed files with 579 additions and 6 deletions

View File

@@ -462,11 +462,11 @@ class CallSession extends Emitter {
* @param {Task} task - task to be executed
*/
async _evalEndpointPrecondition(task) {
this.logger.debug('_evalEndpointPrecondition');
this.logger.debug('CallSession:_evalEndpointPrecondition');
if (this.callGone) new Error(`${BADPRECONDITIONS}: call gone`);
if (this.ep) {
if (!task.earlyMedia || this.dlg) return this.ep;
if (task.earlyMedia === true || this.dlg) return this.ep;
// we are going from an early media connection to answer
await this.propagateAnswer();