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(());
};
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
.webhook_id
.zip(opposite_channel.webhook_token.clone())