use crate::callrecord::CallRecordHangupReason;
use async_trait::async_trait;
#[derive(Debug, Clone)]
pub struct CallSessionContext {
pub session_id: String,
pub caller: String,
pub callee: String,
pub connected_callee: Option<String>,
pub queue_name: Option<String>,
pub direction: String,
pub started_at: Option<String>,
pub metadata: Option<std::collections::HashMap<String, String>>,
}
#[async_trait]
pub trait CallSessionHook: Send + Sync {
async fn on_call_ringing(&self, _ctx: &CallSessionContext) {}
async fn on_call_connected(&self, _ctx: &CallSessionContext) {}
async fn on_call_held(&self, _ctx: &CallSessionContext, _leg_id: &str) {}
async fn on_call_unheld(&self, _ctx: &CallSessionContext, _leg_id: &str) {}
async fn on_call_ended(
&self,
_ctx: &CallSessionContext,
_reason: Option<&CallRecordHangupReason>,
_duration_secs: u64,
) {
}
}