mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
early media call termination log
This commit is contained in:
@@ -2006,7 +2006,7 @@ Duration=${duration} `
|
|||||||
if (task.earlyMedia && !this.req.finalResponseSent) {
|
if (task.earlyMedia && !this.req.finalResponseSent) {
|
||||||
this.res.send(183, {body: ep.local.sdp});
|
this.res.send(183, {body: ep.local.sdp});
|
||||||
this._notifyCallStatusChange({
|
this._notifyCallStatusChange({
|
||||||
callStatus: CallStatus.earlyMedia,
|
callStatus: CallStatus.EarlyMedia,
|
||||||
sipStatus: 183,
|
sipStatus: 183,
|
||||||
sipReason: 'Early Media'
|
sipReason: 'Early Media'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,13 +33,25 @@ class InboundCallSession extends CallSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onCancel() {
|
_onCancel() {
|
||||||
|
this.rootSpan.setAttributes({'call.termination': 'caller abandoned'});
|
||||||
this.rootSpan.setAttributes({'call.termination': 'caller abandoned'});
|
this.rootSpan.setAttributes({'call.termination': 'caller abandoned'});
|
||||||
this.callInfo.callTerminationBy = 'caller';
|
this.callInfo.callTerminationBy = 'caller';
|
||||||
|
const wasEarlyMedia = this.callInfo.callStatus === 'early-media';
|
||||||
this._notifyCallStatusChange({
|
this._notifyCallStatusChange({
|
||||||
callStatus: CallStatus.NoAnswer,
|
callStatus: CallStatus.NoAnswer,
|
||||||
sipStatus: 487,
|
sipStatus: 487,
|
||||||
sipReason: 'Request Terminated'
|
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();
|
this._callReleased();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user