Skip to main content

call_handler_core

Function call_handler_core 

Source
pub async fn call_handler_core(
    call_type: ActiveCallType,
    session_id: String,
    app_state: AppState,
    cancel_token: CancellationToken,
    audio_receiver: UnboundedReceiver<Bytes>,
    server_side_track: Option<String>,
    dump_events: bool,
    ping_interval: u64,
    command_receiver: UnboundedReceiver<Command>,
    event_sender_to_client: UnboundedSender<SessionEvent>,
    extras: Option<HashMap<String, Value>>,
    playbook_name: Option<String>,
) -> Option<HashMap<String, Value>>
Expand description

Core call handling logic that works with either WebSocket or mpsc channels

extras and playbook_name are session-scoped parameters passed directly by the caller (SIP handler, CLI, etc.) instead of through global maps. Returns the final call extras (including _hangup_headers if set) so the caller can use them for SIP BYE or other post-call processing.