Disable auto call hangup and check for DB inconsistency in call channels
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user