pub struct DialogManager { /* private fields */ }
Implementations§
Source§impl DialogManager
impl DialogManager
Sourcepub async fn new(
transaction_manager: Arc<TransactionManager>,
local_address: SocketAddr,
) -> DialogResult<Self>
pub async fn new( transaction_manager: Arc<TransactionManager>, local_address: SocketAddr, ) -> DialogResult<Self>
Create a new dialog manager
ARCHITECTURE: dialog-core receives TransactionManager via dependency injection. The application level is responsible for creating the transaction layer.
§Arguments
transaction_manager
- The transaction manager to use for SIP message reliabilitylocal_address
- The local address to use in Via headers and Contact headers
§Returns
A new DialogManager instance ready for use
Sourcepub async fn with_global_events(
transaction_manager: Arc<TransactionManager>,
transaction_events: Receiver<TransactionEvent>,
local_address: SocketAddr,
) -> DialogResult<Self>
pub async fn with_global_events( transaction_manager: Arc<TransactionManager>, transaction_events: Receiver<TransactionEvent>, local_address: SocketAddr, ) -> DialogResult<Self>
Create a new dialog manager with global transaction events (RECOMMENDED)
This constructor follows the working pattern from transaction-core examples by receiving global transaction events for proper event consumption.
§Arguments
transaction_manager
- The transaction manager to use for SIP message reliabilitytransaction_events
- Global transaction event receiverlocal_address
- The local address to use in Via headers and Contact headers
§Returns
A new DialogManager instance with proper event consumption
Sourcepub fn local_address(&self) -> SocketAddr
pub fn local_address(&self) -> SocketAddr
Get the configured local address
Returns the local address that this DialogManager uses for Via headers and Contact headers when creating SIP requests.
Sourcepub async fn set_session_coordinator(
&self,
sender: Sender<SessionCoordinationEvent>,
)
pub async fn set_session_coordinator( &self, sender: Sender<SessionCoordinationEvent>, )
Set the session coordinator for sending events to session-core
This establishes the communication channel between dialog-core and session-core, maintaining the proper architectural layer separation.
§Arguments
sender
- Channel sender for session coordination events
Sourcepub async fn set_dialog_event_sender(&self, sender: Sender<DialogEvent>)
pub async fn set_dialog_event_sender(&self, sender: Sender<DialogEvent>)
Set the dialog event sender for external consumers (session-core)
This establishes the dialog event communication channel that session-core can use to receive high-level dialog state changes and events.
§Arguments
sender
- Channel sender for dialog events
Sourcepub fn subscribe_to_dialog_events(&self) -> Receiver<DialogEvent>
pub fn subscribe_to_dialog_events(&self) -> Receiver<DialogEvent>
Subscribe to dialog events
Returns a receiver for dialog events that session-core can use to monitor dialog state changes and other dialog-level events.
§Returns
A receiver for dialog events
Sourcepub async fn emit_dialog_event(&self, event: DialogEvent)
pub async fn emit_dialog_event(&self, event: DialogEvent)
Emit a dialog event to external consumers
Sends dialog events to session-core for high-level dialog state management. This maintains the proper architectural separation where dialog-core handles SIP protocol details and session-core handles session logic.
Sourcepub async fn emit_session_coordination_event(
&self,
event: SessionCoordinationEvent,
)
pub async fn emit_session_coordination_event( &self, event: SessionCoordinationEvent, )
Emit a session coordination event
Sends session coordination events for legacy compatibility and specific session management operations.
Sourcepub async fn handle_message(
&self,
message: Message,
source: SocketAddr,
) -> DialogResult<()>
pub async fn handle_message( &self, message: Message, source: SocketAddr, ) -> DialogResult<()>
CENTRAL DISPATCHER: Handle incoming SIP messages
This is the main entry point for processing SIP messages in dialog-core. It routes messages to the appropriate method-specific handlers while maintaining RFC 3261 compliance for dialog state management.
§Arguments
message
- The SIP message (Request or Response)source
- Source address of the message
§Returns
Result indicating success or the specific error encountered
Sourcepub async fn start(&self) -> DialogResult<()>
pub async fn start(&self) -> DialogResult<()>
Start the dialog manager
Initializes the dialog manager for processing. This can include starting background tasks for dialog cleanup, recovery, and maintenance.
Sourcepub async fn stop(&self) -> DialogResult<()>
pub async fn stop(&self) -> DialogResult<()>
Stop the dialog manager
Gracefully shuts down the dialog manager, terminating all active dialogs and cleaning up resources according to RFC 3261 requirements.
Sourcepub fn transaction_manager(&self) -> &Arc<TransactionManager>
pub fn transaction_manager(&self) -> &Arc<TransactionManager>
Get the transaction manager reference
Provides access to the underlying transaction manager for cases where direct transaction operations are needed.
Sourcepub fn dialog_count(&self) -> usize
pub fn dialog_count(&self) -> usize
Get dialog count
Returns the current number of active dialogs.
Sourcepub fn has_dialog(&self, dialog_id: &DialogId) -> bool
pub fn has_dialog(&self, dialog_id: &DialogId) -> bool
Sourcepub fn cleanup_transaction_receiver(&self, transaction_id: &TransactionKey)
pub fn cleanup_transaction_receiver(&self, transaction_id: &TransactionKey)
Clean up completed transaction event receivers
This method removes transaction-to-dialog mappings for completed transactions.
§Arguments
transaction_id
- The transaction ID to clean up
Sourcepub fn find_invite_transaction_for_dialog(
&self,
dialog_id: &DialogId,
) -> Option<TransactionKey>
pub fn find_invite_transaction_for_dialog( &self, dialog_id: &DialogId, ) -> Option<TransactionKey>
Sourcepub fn set_config(&mut self, config: DialogManagerConfig)
pub fn set_config(&mut self, config: DialogManagerConfig)
Set the unified configuration for this DialogManager
Enables mode-specific behavior based on configuration. This method allows the UnifiedDialogManager to inject configuration.
§Arguments
config
- Unified configuration determining behavior mode
Sourcepub fn config(&self) -> Option<&DialogManagerConfig>
pub fn config(&self) -> Option<&DialogManagerConfig>
Get the current configuration (if any)
Returns the unified configuration if it was provided.
Sourcepub fn should_auto_respond_to_options(&self) -> bool
pub fn should_auto_respond_to_options(&self) -> bool
Check if auto-response to OPTIONS requests is enabled
Returns true if the unified configuration enables automatic OPTIONS responses. If no configuration is set, defaults to false (session layer handling).
Sourcepub fn should_auto_respond_to_register(&self) -> bool
pub fn should_auto_respond_to_register(&self) -> bool
Check if auto-response to REGISTER requests is enabled
Returns true if the unified configuration enables automatic REGISTER responses. If no configuration is set, defaults to false (session layer handling).
Sourcepub fn supports_outgoing_calls(&self) -> bool
pub fn supports_outgoing_calls(&self) -> bool
Check if outgoing calls are supported
Returns true if the configuration supports outgoing calls (Client/Hybrid modes). If no configuration is set, defaults to true for backward compatibility.
Sourcepub fn supports_incoming_calls(&self) -> bool
pub fn supports_incoming_calls(&self) -> bool
Check if incoming calls are supported
Returns true if the configuration supports incoming calls (Server/Hybrid modes). If no configuration is set, defaults to true for backward compatibility.
Source§impl DialogManager
impl DialogManager
pub async fn create_dialog(&self, request: &Request) -> DialogResult<DialogId>
pub async fn terminate_dialog(&self, dialog_id: &DialogId) -> DialogResult<()>
pub fn get_dialog(&self, dialog_id: &DialogId) -> DialogResult<Dialog>
pub fn get_dialog_mut( &self, dialog_id: &DialogId, ) -> DialogResult<RefMut<'_, DialogId, Dialog>>
pub async fn store_dialog(&self, dialog: Dialog) -> DialogResult<()>
pub fn list_dialogs(&self) -> Vec<DialogId>
pub fn get_dialog_state( &self, dialog_id: &DialogId, ) -> DialogResult<DialogState>
pub async fn update_dialog_state( &self, dialog_id: &DialogId, new_state: DialogState, ) -> DialogResult<()>
pub async fn create_outgoing_dialog( &self, local_uri: Uri, remote_uri: Uri, call_id: Option<String>, ) -> DialogResult<DialogId>
pub async fn handle_invite( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_bye(&self, request: Request) -> DialogResult<()>
pub async fn handle_cancel(&self, request: Request) -> DialogResult<()>
pub async fn handle_ack(&self, request: Request) -> DialogResult<()>
pub async fn handle_options( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_register( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_update(&self, request: Request) -> DialogResult<()>
pub async fn handle_info( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_refer( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_subscribe( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_notify( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
pub async fn handle_response( &self, response: Response, transaction_id: TransactionKey, ) -> DialogResult<()>
pub async fn find_dialog_for_request( &self, request: &Request, ) -> Option<DialogId>
pub fn find_dialog_for_transaction( &self, transaction_id: &TransactionKey, ) -> DialogResult<DialogId>
pub async fn send_request( &self, dialog_id: &DialogId, method: Method, body: Option<Bytes>, ) -> DialogResult<TransactionKey>
pub async fn send_response( &self, transaction_id: &TransactionKey, response: Response, ) -> DialogResult<()>
pub fn associate_transaction_with_dialog( &self, transaction_id: &TransactionKey, dialog_id: &DialogId, )
pub async fn send_ack_for_2xx_response( &self, dialog_id: &DialogId, original_invite_tx_id: &TransactionKey, response: &Response, ) -> DialogResult<()>
pub async fn create_ack_for_2xx_response( &self, original_invite_tx_id: &TransactionKey, response: &Response, ) -> DialogResult<Request>
pub async fn find_transaction_by_message( &self, message: &Message, ) -> DialogResult<Option<TransactionKey>>
Source§impl DialogManager
impl DialogManager
Sourcepub async fn process_transaction_event(
&self,
transaction_id: &TransactionKey,
dialog_id: &DialogId,
event: TransactionEvent,
) -> DialogResult<()>
pub async fn process_transaction_event( &self, transaction_id: &TransactionKey, dialog_id: &DialogId, event: TransactionEvent, ) -> DialogResult<()>
Process a transaction event and update dialog state accordingly
This is the core event-driven state management for dialogs based on transaction layer events. It implements proper RFC 3261 dialog state transitions.
Source§impl DialogManager
impl DialogManager
Sourcepub async fn create_server_transaction_for_request(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<TransactionKey>
pub async fn create_server_transaction_for_request( &self, request: Request, source: SocketAddr, ) -> DialogResult<TransactionKey>
Create server transaction for incoming request
Helper to create server transactions with proper error handling.
Sourcepub async fn create_client_transaction_for_request(
&self,
request: Request,
destination: SocketAddr,
method: &Method,
) -> DialogResult<TransactionKey>
pub async fn create_client_transaction_for_request( &self, request: Request, destination: SocketAddr, method: &Method, ) -> DialogResult<TransactionKey>
Create client transaction for outgoing request
Helper to create client transactions with method-specific handling.
Sourcepub async fn cancel_invite_transaction_with_dialog(
&self,
invite_tx_id: &TransactionKey,
) -> DialogResult<TransactionKey>
pub async fn cancel_invite_transaction_with_dialog( &self, invite_tx_id: &TransactionKey, ) -> DialogResult<TransactionKey>
Cancel an INVITE transaction using transaction-core
Properly cancels INVITE transactions while updating associated dialogs.
Sourcepub fn get_transaction_statistics(&self) -> (usize, usize)
pub fn get_transaction_statistics(&self) -> (usize, usize)
Get transaction statistics
Provides insight into transaction-dialog associations.
Sourcepub async fn cleanup_orphaned_transaction_mappings(&self) -> usize
pub async fn cleanup_orphaned_transaction_mappings(&self) -> usize
Cleanup orphaned transaction mappings
Removes transaction-dialog mappings for terminated dialogs.
Source§impl DialogManager
INVITE-specific helper methods for DialogManager
impl DialogManager
INVITE-specific helper methods for DialogManager
Sourcepub async fn handle_initial_invite(
&self,
transaction_id: TransactionKey,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
pub async fn handle_initial_invite( &self, transaction_id: TransactionKey, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle initial INVITE (dialog-creating)
Sourcepub async fn handle_reinvite(
&self,
transaction_id: TransactionKey,
request: Request,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn handle_reinvite( &self, transaction_id: TransactionKey, request: Request, dialog_id: DialogId, ) -> DialogResult<()>
Handle re-INVITE (session modification)
Sourcepub async fn process_ack_in_dialog(
&self,
request: Request,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn process_ack_in_dialog( &self, request: Request, dialog_id: DialogId, ) -> DialogResult<()>
Process ACK within a dialog (related to INVITE processing)
Source§impl DialogManager
BYE-specific helper methods for DialogManager
impl DialogManager
BYE-specific helper methods for DialogManager
Sourcepub async fn process_bye_in_dialog(
&self,
transaction_id: TransactionKey,
request: Request,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn process_bye_in_dialog( &self, transaction_id: TransactionKey, request: Request, dialog_id: DialogId, ) -> DialogResult<()>
Process BYE within a dialog
Source§impl DialogManager
REGISTER-specific helper methods for DialogManager
impl DialogManager
REGISTER-specific helper methods for DialogManager
Sourcepub fn extract_contact_uri(&self, request: &Request) -> Option<Uri>
pub fn extract_contact_uri(&self, request: &Request) -> Option<Uri>
Extract Contact URI from request
Sourcepub fn extract_expires(&self, request: &Request) -> u32
pub fn extract_expires(&self, request: &Request) -> u32
Extract Expires value from request
Sourcepub async fn send_basic_register_response(
&self,
transaction_id: &TransactionKey,
request: &Request,
expires: u32,
) -> DialogResult<()>
pub async fn send_basic_register_response( &self, transaction_id: &TransactionKey, request: &Request, expires: u32, ) -> DialogResult<()>
Send basic REGISTER response (for auto-response mode)
Source§impl DialogManager
UPDATE-specific helper methods for DialogManager
impl DialogManager
UPDATE-specific helper methods for DialogManager
Sourcepub async fn process_update_in_dialog(
&self,
request: Request,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn process_update_in_dialog( &self, request: Request, dialog_id: DialogId, ) -> DialogResult<()>
Process UPDATE within a dialog
Source§impl DialogManager
Response-specific helper methods for DialogManager
impl DialogManager
Response-specific helper methods for DialogManager
Sourcepub async fn process_response_in_dialog(
&self,
response: Response,
_transaction_id: TransactionKey,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn process_response_in_dialog( &self, response: Response, _transaction_id: TransactionKey, dialog_id: DialogId, ) -> DialogResult<()>
Process response within a dialog
Sourcepub async fn handle_provisional_response(
&self,
response: Response,
_transaction_id: TransactionKey,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn handle_provisional_response( &self, response: Response, _transaction_id: TransactionKey, dialog_id: DialogId, ) -> DialogResult<()>
Handle provisional responses (1xx)
Sourcepub async fn handle_success_response(
&self,
response: Response,
transaction_id: TransactionKey,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn handle_success_response( &self, response: Response, transaction_id: TransactionKey, dialog_id: DialogId, ) -> DialogResult<()>
Handle successful responses (2xx)
Sourcepub async fn handle_failure_response(
&self,
response: Response,
transaction_id: TransactionKey,
dialog_id: DialogId,
) -> DialogResult<()>
pub async fn handle_failure_response( &self, response: Response, transaction_id: TransactionKey, dialog_id: DialogId, ) -> DialogResult<()>
Handle failure responses (4xx, 5xx, 6xx)
Trait Implementations§
Source§impl ByeHandler for DialogManager
Implementation of BYE handling for DialogManager
impl ByeHandler for DialogManager
Implementation of BYE handling for DialogManager
Source§async fn handle_bye_method(&self, request: Request) -> DialogResult<()>
async fn handle_bye_method(&self, request: Request) -> DialogResult<()>
Handle BYE requests according to RFC 3261 Section 15
Terminates the dialog and sends appropriate responses.
Source§impl Clone for DialogManager
impl Clone for DialogManager
Source§fn clone(&self) -> DialogManager
fn clone(&self) -> DialogManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DialogManager
impl Debug for DialogManager
Source§impl DialogLookup for DialogManager
impl DialogLookup for DialogManager
Source§async fn find_dialog_for_request(&self, request: &Request) -> Option<DialogId>
async fn find_dialog_for_request(&self, request: &Request) -> Option<DialogId>
Find an existing dialog by request
Implements RFC 3261 Section 12.2 dialog identification rules. Uses Call-ID, From tag, and To tag for proper dialog matching.
FIXED: Added fallback lookup for early dialogs that don’t have both tags yet.
Source§async fn create_early_dialog_from_invite(
&self,
request: &Request,
) -> DialogResult<DialogId>
async fn create_early_dialog_from_invite( &self, request: &Request, ) -> DialogResult<DialogId>
Create an early dialog from an INVITE request
Implements RFC 3261 Section 12.1.1 for early dialog creation. Early dialogs are created when processing incoming INVITE requests.
Source§impl DialogMatcher for DialogManager
impl DialogMatcher for DialogManager
Source§fn match_transaction(
&self,
transaction_id: &TransactionKey,
) -> DialogResult<DialogId>
fn match_transaction( &self, transaction_id: &TransactionKey, ) -> DialogResult<DialogId>
Source§impl DialogStore for DialogManager
impl DialogStore for DialogManager
Source§async fn create_dialog(&self, request: &Request) -> DialogResult<DialogId>
async fn create_dialog(&self, request: &Request) -> DialogResult<DialogId>
Create a new dialog from an incoming request
Implements RFC 3261 Section 12.1.1 for UAS dialog creation. Creates an early dialog that can be confirmed later.
Source§async fn create_outgoing_dialog(
&self,
local_uri: Uri,
remote_uri: Uri,
call_id: Option<String>,
) -> DialogResult<DialogId>
async fn create_outgoing_dialog( &self, local_uri: Uri, remote_uri: Uri, call_id: Option<String>, ) -> DialogResult<DialogId>
Create an outgoing dialog for client-initiated requests
Implements RFC 3261 Section 12.1.2 for UAC dialog creation. Creates an early dialog that will be confirmed by the response.
Source§async fn store_dialog(&self, dialog: Dialog) -> DialogResult<()>
async fn store_dialog(&self, dialog: Dialog) -> DialogResult<()>
Store a dialog in the manager
Implements proper dialog storage with RFC 3261 compliant lookup keys.
Source§fn get_dialog(&self, dialog_id: &DialogId) -> DialogResult<Dialog>
fn get_dialog(&self, dialog_id: &DialogId) -> DialogResult<Dialog>
Get a dialog (read-only)
Source§fn get_dialog_mut(
&self,
dialog_id: &DialogId,
) -> DialogResult<RefMut<'_, DialogId, Dialog>>
fn get_dialog_mut( &self, dialog_id: &DialogId, ) -> DialogResult<RefMut<'_, DialogId, Dialog>>
Get a mutable reference to a dialog
Source§async fn terminate_dialog(&self, dialog_id: &DialogId) -> DialogResult<()>
async fn terminate_dialog(&self, dialog_id: &DialogId) -> DialogResult<()>
Terminate a dialog
Implements RFC 3261 Section 12.3 dialog termination. Properly cleans up all dialog state and lookup entries.
Source§fn list_dialogs(&self) -> Vec<DialogId>
fn list_dialogs(&self) -> Vec<DialogId>
List all active dialogs
Source§fn dialog_count(&self) -> usize
fn dialog_count(&self) -> usize
Get current dialog count
Source§fn has_dialog(&self, dialog_id: &DialogId) -> bool
fn has_dialog(&self, dialog_id: &DialogId) -> bool
Check if a dialog exists
Source§fn get_dialog_state(&self, dialog_id: &DialogId) -> DialogResult<DialogState>
fn get_dialog_state(&self, dialog_id: &DialogId) -> DialogResult<DialogState>
Get dialog state
Source§async fn update_dialog_state(
&self,
dialog_id: &DialogId,
new_state: DialogState,
) -> DialogResult<()>
async fn update_dialog_state( &self, dialog_id: &DialogId, new_state: DialogState, ) -> DialogResult<()>
Update dialog state with proper notifications
Updates dialog state and notifies session-core of the change. Implements proper RFC 3261 state transition validation.
Source§impl EventSender for DialogManager
impl EventSender for DialogManager
Source§async fn send_coordination_event(
&self,
event: SessionCoordinationEvent,
) -> DialogResult<()>
async fn send_coordination_event( &self, event: SessionCoordinationEvent, ) -> DialogResult<()>
Source§impl InviteHandler for DialogManager
Implementation of INVITE handling for DialogManager
impl InviteHandler for DialogManager
Implementation of INVITE handling for DialogManager
Source§async fn handle_invite_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_invite_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle INVITE requests according to RFC 3261 Section 14
Supports both initial INVITE (dialog-creating) and re-INVITE (session modification).
Source§impl MessageRouter for DialogManager
impl MessageRouter for DialogManager
Source§impl MethodHandler for DialogManager
Implementation of MethodHandler for DialogManager
impl MethodHandler for DialogManager
Implementation of MethodHandler for DialogManager
Source§async fn handle_register_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_register_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Delegate REGISTER handling to the specialized register_handler module
Source§async fn handle_info_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_info_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle INFO requests (simple forwarding to session layer)
Source§async fn handle_refer_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_refer_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle REFER requests (call transfer)
Source§async fn handle_subscribe_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_subscribe_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle SUBSCRIBE requests (simple forwarding to session layer)
Source§async fn handle_notify_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_notify_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle NOTIFY requests (simple forwarding to session layer)
Source§impl ProtocolHandlers for DialogManager
Implementation of ProtocolHandlers for DialogManager using specialized modules
impl ProtocolHandlers for DialogManager
Implementation of ProtocolHandlers for DialogManager using specialized modules
Source§async fn handle_invite_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_invite_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Delegate INVITE handling to the specialized invite_handler module
Source§async fn handle_bye_method(&self, request: Request) -> DialogResult<()>
async fn handle_bye_method(&self, request: Request) -> DialogResult<()>
Delegate BYE handling to the specialized bye_handler module
Source§async fn handle_cancel_method(&self, request: Request) -> DialogResult<()>
async fn handle_cancel_method(&self, request: Request) -> DialogResult<()>
Handle CANCEL requests (not yet moved to specialized module)
Source§async fn handle_ack_method(&self, request: Request) -> DialogResult<()>
async fn handle_ack_method(&self, request: Request) -> DialogResult<()>
Handle ACK requests (related to INVITE processing)
Source§async fn handle_options_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_options_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle OPTIONS requests with unified configuration support
Source§async fn handle_update_method(&self, request: Request) -> DialogResult<()>
async fn handle_update_method(&self, request: Request) -> DialogResult<()>
Delegate UPDATE handling to the specialized update_handler module
Source§async fn handle_response_message(
&self,
response: Response,
transaction_id: TransactionKey,
) -> DialogResult<()>
async fn handle_response_message( &self, response: Response, transaction_id: TransactionKey, ) -> DialogResult<()>
Delegate response handling to the specialized response_handler module
Source§impl RegisterHandler for DialogManager
Implementation of REGISTER handling for DialogManager
impl RegisterHandler for DialogManager
Implementation of REGISTER handling for DialogManager
Source§async fn handle_register_method(
&self,
request: Request,
source: SocketAddr,
) -> DialogResult<()>
async fn handle_register_method( &self, request: Request, source: SocketAddr, ) -> DialogResult<()>
Handle REGISTER requests according to RFC 3261 Section 10 with unified configuration support
REGISTER requests don’t create dialogs but are handled for completeness. Supports auto-response behavior based on unified configuration.
Source§impl ResponseHandler for DialogManager
Implementation of response handling for DialogManager
impl ResponseHandler for DialogManager
Implementation of response handling for DialogManager
Source§async fn handle_response_message(
&self,
response: Response,
transaction_id: TransactionKey,
) -> DialogResult<()>
async fn handle_response_message( &self, response: Response, transaction_id: TransactionKey, ) -> DialogResult<()>
Handle responses to client transactions
Processes responses and updates dialog state accordingly.
Source§impl SessionCoordinator for DialogManager
impl SessionCoordinator for DialogManager
Source§async fn configure_session_coordination(
&self,
sender: Sender<SessionCoordinationEvent>,
)
async fn configure_session_coordination( &self, sender: Sender<SessionCoordinationEvent>, )
Source§async fn notify_session_layer(
&self,
event: SessionCoordinationEvent,
) -> DialogResult<()>
async fn notify_session_layer( &self, event: SessionCoordinationEvent, ) -> DialogResult<()>
Source§impl TransactionHelpers for DialogManager
impl TransactionHelpers for DialogManager
Source§fn link_transaction_to_dialog(
&self,
transaction_id: &TransactionKey,
dialog_id: &DialogId,
)
fn link_transaction_to_dialog( &self, transaction_id: &TransactionKey, dialog_id: &DialogId, )
Associate a transaction with a dialog
Creates the mapping between transactions and dialogs for proper message routing.
Source§async fn create_ack_for_success_response(
&self,
original_invite_tx_id: &TransactionKey,
response: &Response,
) -> DialogResult<Request>
async fn create_ack_for_success_response( &self, original_invite_tx_id: &TransactionKey, response: &Response, ) -> DialogResult<Request>
Create ACK for 2xx response using transaction-core helpers
Uses transaction-core’s ACK creation helpers while maintaining dialog-core concerns.
Source§impl TransactionIntegration for DialogManager
impl TransactionIntegration for DialogManager
Source§async fn send_request_in_dialog(
&self,
dialog_id: &DialogId,
method: Method,
body: Option<Bytes>,
) -> DialogResult<TransactionKey>
async fn send_request_in_dialog( &self, dialog_id: &DialogId, method: Method, body: Option<Bytes>, ) -> DialogResult<TransactionKey>
Send a request within a dialog using transaction-core
Implements proper request creation within dialogs using Phase 3 dialog functions for significantly simplified and more maintainable code.
Source§async fn send_transaction_response(
&self,
transaction_id: &TransactionKey,
response: Response,
) -> DialogResult<()>
async fn send_transaction_response( &self, transaction_id: &TransactionKey, response: Response, ) -> DialogResult<()>
Send a response using transaction-core
Delegates response sending to transaction-core while maintaining dialog state.
Source§impl UpdateHandler for DialogManager
Implementation of UPDATE handling for DialogManager
impl UpdateHandler for DialogManager
Implementation of UPDATE handling for DialogManager
Source§async fn handle_update_method(&self, request: Request) -> DialogResult<()>
async fn handle_update_method(&self, request: Request) -> DialogResult<()>
Handle UPDATE requests according to RFC 3311
Provides session modification within dialogs.