mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
* initial WIP to remove freeswitch from media path when not recording or transcribing dial calls * implement release-media and anchor-media operations * mute/unmute now handled by rtpengine * Dial: dtmf detection now based on SIP INFO events from sbcs and rtpengine * add reason to gather action, bugfixes for transcribe and say
45 lines
947 B
JavaScript
45 lines
947 B
JavaScript
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, accountInfo}) {
|
|
super({
|
|
logger,
|
|
application,
|
|
srf: singleDialer.dlg.srf,
|
|
tasks,
|
|
callInfo,
|
|
accountInfo
|
|
});
|
|
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;
|