address general case of sending completed status when we hangup the call

This commit is contained in:
Dave Horton
2020-03-09 21:55:41 +00:00
parent f3926d2c9c
commit 673eebcb2f
3 changed files with 20 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ class InboundCallSession extends CallSession {
if (!this.dlg) {
assert(this.ep);
this.dlg = await this.srf.createUAS(this.req, this.res, {localSdp: this.ep.local.sdp});
this.dlg.connectTime = moment();
this.wrapDialog(this.dlg);
this.dlg.on('destroy', this._callerHungup.bind(this));
this.emit('callStatusChange', {sipStatus: 200, callStatus: CallStatus.InProgress});
this.logger.debug(`CallSession:propagateAnswer - answered callSid ${this.callSid}`);