Disable auto call hangup and check for DB inconsistency in call channels

This commit is contained in:
2025-08-26 13:12:17 -03:00
parent eb057e0531
commit b442be08e2
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -220,6 +220,17 @@ impl OnMessageHandler<State, Extras> for CallMessageHandler {
return Ok(()); return Ok(());
}; };
if opposite_channel.call_id != Some(call.id) {
log::error!(
"Channel {} is listed as the opposite channel of channel {} in call {}, but its call ID is {}.",
opposite_channel.id,
channel.id,
call.id,
opposite_channel.call_id.map_or("None".into(), |i| i.to_string())
);
return Ok(());
}
let Some((webhook_id, webhook_token)) = opposite_channel let Some((webhook_id, webhook_token)) = opposite_channel
.webhook_id .webhook_id
.zip(opposite_channel.webhook_token.clone()) .zip(opposite_channel.webhook_token.clone())
+1 -1
View File
@@ -308,7 +308,7 @@ async fn start(
.cache_resource_type(ResourceType::CHANNEL) .cache_resource_type(ResourceType::CHANNEL)
.cache_resource_type(ResourceType::MEMBER) .cache_resource_type(ResourceType::MEMBER)
.cache_resource_type(ResourceType::ROLE) .cache_resource_type(ResourceType::ROLE)
.task(EndInactiveCallsTask::new(shard.number(), shard.total())) // .task(EndInactiveCallsTask::new(shard.number(), shard.total()))
.on_ready(ReadyHandler) .on_ready(ReadyHandler)
.on_reconnect(ReconnectHandler) .on_reconnect(ReconnectHandler)
.on_message(CallMessageHandler) .on_message(CallMessageHandler)