mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
56 lines
816 B
JavaScript
56 lines
816 B
JavaScript
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;
|
|
|