wip: implemented listen, transcribe, play

This commit is contained in:
Dave Horton
2020-01-17 09:15:23 -05:00
parent 1a656f3f0e
commit 0d4c1d9d8c
24 changed files with 688 additions and 108 deletions

View File

@@ -0,0 +1,55 @@
const Emitter = require('events');
const {CallStatus} = require('./constants');
class SingleDialer extends Emitter {
constructor(logger, opts) {
super();
this.logger = logger;
this.cs = opts.cs;
this.ms = opts.ms;
}
get callState() {
return this._callState;
}
/**
* launch the outdial
*/
exec() {
}
/**
* kill the call in progress, or stable dialog, whichever
*/
async kill() {
}
/**
* execute a jambones application on this call / endpoint
* @param {*} jambones document
*/
async runApp(document) {
}
async _createEndpoint() {
}
async _outdial() {
}
}
function placeOutdial(logger, opts) {
const singleDialer = new SingleDialer(logger, opts);
singleDialer.exec();
return singleDialer;
}
module.exports = placeOutdial;