Add more logs for call disposition
This commit is contained in:
parent
81e1357723
commit
81fc9ff94d
4 changed files with 25 additions and 2 deletions
|
@ -3227,6 +3227,9 @@ export class ConversationModel extends window.Backbone
|
||||||
|
|
||||||
switch (callHistoryDetails.callMode) {
|
switch (callHistoryDetails.callMode) {
|
||||||
case CallMode.Direct: {
|
case CallMode.Direct: {
|
||||||
|
log.info(
|
||||||
|
`addCallHistory: Adding direct call to history (Call ID ${callHistoryDetails.callId})`
|
||||||
|
);
|
||||||
const resolvedTime =
|
const resolvedTime =
|
||||||
callHistoryDetails.acceptedTime ?? callHistoryDetails.endedTime;
|
callHistoryDetails.acceptedTime ?? callHistoryDetails.endedTime;
|
||||||
assertDev(resolvedTime, 'Direct call must have accepted or ended time');
|
assertDev(resolvedTime, 'Direct call must have accepted or ended time');
|
||||||
|
@ -3267,6 +3270,9 @@ export class ConversationModel extends window.Backbone
|
||||||
callHistoryDetails.callId
|
callHistoryDetails.callId
|
||||||
);
|
);
|
||||||
if (messageId != null) {
|
if (messageId != null) {
|
||||||
|
log.info(
|
||||||
|
`addCallHistory: Found existing call history message (Call ID ${callHistoryDetails.callId}, Message ID: ${messageId})`
|
||||||
|
);
|
||||||
message.id = messageId;
|
message.id = messageId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1942,7 +1942,18 @@ export class CallingClass {
|
||||||
if (call.state === CallState.Accepted) {
|
if (call.state === CallState.Accepted) {
|
||||||
acceptedTime = acceptedTime || Date.now();
|
acceptedTime = acceptedTime || Date.now();
|
||||||
} else if (call.state === CallState.Ended) {
|
} else if (call.state === CallState.Ended) {
|
||||||
await this.addCallHistoryForEndedCall(conversation, call, acceptedTime);
|
try {
|
||||||
|
await this.addCallHistoryForEndedCall(
|
||||||
|
conversation,
|
||||||
|
call,
|
||||||
|
acceptedTime
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
log.error(
|
||||||
|
'Failed to add call history for ended call',
|
||||||
|
Errors.toLogFormat(error)
|
||||||
|
);
|
||||||
|
}
|
||||||
this.stopDeviceReselectionTimer();
|
this.stopDeviceReselectionTimer();
|
||||||
this.lastMediaDeviceSettings = undefined;
|
this.lastMediaDeviceSettings = undefined;
|
||||||
delete this.callsByConversation[conversation.id];
|
delete this.callsByConversation[conversation.id];
|
||||||
|
|
|
@ -727,7 +727,9 @@ function callStateChange(
|
||||||
|
|
||||||
if (isIncomingRemoteHangup) {
|
if (isIncomingRemoteHangup) {
|
||||||
// This is considered just another "missed" event
|
// This is considered just another "missed" event
|
||||||
log.info('callStateChange: not syncing hangup from self');
|
log.info(
|
||||||
|
`callStateChange: not syncing hangup from self (Call ID: ${callId}))`
|
||||||
|
);
|
||||||
} else if (
|
} else if (
|
||||||
isOutgoingRemoteAccept ||
|
isOutgoingRemoteAccept ||
|
||||||
isIncomingLocalAccept ||
|
isIncomingLocalAccept ||
|
||||||
|
@ -735,6 +737,7 @@ function callStateChange(
|
||||||
isIncomingLocalHangup ||
|
isIncomingLocalHangup ||
|
||||||
isOutgoingRemoteHangup
|
isOutgoingRemoteHangup
|
||||||
) {
|
) {
|
||||||
|
log.info(`callStateChange: syncing call event (Call ID: ${callId})`);
|
||||||
try {
|
try {
|
||||||
await singleProtoJobQueue.add(
|
await singleProtoJobQueue.add(
|
||||||
MessageSender.getCallEventSync(
|
MessageSender.getCallEventSync(
|
||||||
|
|
|
@ -27,6 +27,9 @@ export async function onCallEventSync(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info(
|
||||||
|
`onCallEventSync: Queuing job to add call history (Call ID: ${callId})`
|
||||||
|
);
|
||||||
await conversation.queueJob('onCallEventSync', async () => {
|
await conversation.queueJob('onCallEventSync', async () => {
|
||||||
await conversation.addCallHistory(
|
await conversation.addCallHistory(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue