mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fix hangup headers (#583)
* fix hangup headers * no need for callback * fix test failure --------- Co-authored-by: Dave Horton <daveh@beachdognet.com>
This commit is contained in:
@@ -1883,7 +1883,7 @@ Duration=${duration} `
|
||||
wrapDialog(dlg) {
|
||||
dlg.connectTime = moment();
|
||||
const origDestroy = dlg.destroy.bind(dlg);
|
||||
dlg.destroy = () => {
|
||||
dlg.destroy = (opts) => {
|
||||
if (dlg.connected) {
|
||||
dlg.connected = false;
|
||||
dlg.destroy = origDestroy;
|
||||
@@ -1892,7 +1892,7 @@ Duration=${duration} `
|
||||
this.emit('callStatusChange', {callStatus: CallStatus.Completed, duration});
|
||||
this.logger.debug('CallSession: call terminated by jambonz');
|
||||
this.rootSpan.setAttributes({'call.termination': 'hangup by jambonz'});
|
||||
origDestroy().catch((err) => this.logger.info({err}, 'CallSession - error destroying dialog'));
|
||||
origDestroy(opts).catch((err) => this.logger.info({err}, 'CallSession - error destroying dialog'));
|
||||
if (this.wakeupResolver) {
|
||||
this.wakeupResolver({reason: 'session ended'});
|
||||
this.wakeupResolver = null;
|
||||
|
||||
Reference in New Issue
Block a user