snake case REST payloads, support for LCC with child_call_hook, handle 302 on outdial

This commit is contained in:
Dave Horton
2021-04-22 14:39:54 -04:00
parent 8eb0cd1520
commit 576f645489
11 changed files with 340 additions and 179 deletions

View File

@@ -0,0 +1,43 @@
const CallSession = require('./call-session');
/**
* @classdesc Subclass of CallSession. Represents a CallSession
* that was initially a child call leg; i.e. established via a Dial verb.
* Now it is all grown up and filling out its own CallSession. Yoo-hoo!
* @extends CallSession
*/
class AdultingCallSession extends CallSession {
constructor({logger, application, singleDialer, tasks, callInfo}) {
super({
logger,
application,
srf: singleDialer.dlg.srf,
tasks,
callInfo
});
this.sd = singleDialer;
this.sd.dlg.on('destroy', () => {
this.logger.info('AdultingCallSession: called party hung up');
this._callReleased();
});
this.sd.emit('adulting');
}
get dlg() {
return this.sd.dlg;
}
get ep() {
return this.sd.ep;
}
get callSid() {
return this.callInfo.callSid;
}
}
module.exports = AdultingCallSession;