mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 00:58:34 +00:00
early media call termination log
This commit is contained in:
@@ -33,13 +33,25 @@ class InboundCallSession extends CallSession {
|
||||
}
|
||||
|
||||
_onCancel() {
|
||||
this.rootSpan.setAttributes({'call.termination': 'caller abandoned'});
|
||||
this.rootSpan.setAttributes({'call.termination': 'caller abandoned'});
|
||||
this.callInfo.callTerminationBy = 'caller';
|
||||
const wasEarlyMedia = this.callInfo.callStatus === 'early-media';
|
||||
this._notifyCallStatusChange({
|
||||
callStatus: CallStatus.NoAnswer,
|
||||
sipStatus: 487,
|
||||
sipReason: 'Request Terminated'
|
||||
});
|
||||
if (wasEarlyMedia) {
|
||||
console.log('Call ended during early media');
|
||||
const duration = 0; // Set duration to 0 for early media termination, required param
|
||||
this._notifyCallStatusChange({
|
||||
callStatus: CallStatus.Completed,
|
||||
sipStatus: 487,
|
||||
sipReason: 'Call Terminated During Early Media',
|
||||
duration: duration
|
||||
});
|
||||
}
|
||||
this._callReleased();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user