pub async fn session_timer_loop<D: SessionDialogOps>(
dialog: &D,
timer: SessionTimer,
refresh_body: Option<Vec<u8>>,
peer_refreshed: Arc<Notify>,
cancel: CancellationToken,
) -> SessionTimerOutcomeExpand description
Drive RFC 4028 session keepalive for one confirmed dialog. Runs
until cancelled or the session dies; same shape as
crate::Registrar::keepalive_loop.
- When
timer.we_are_refresher, sends a refresh re-INVITE everyinterval / 2carryingrefresh_body(repeat the SDP you sent when the call was set up — an identical offer is a no-op per RFC 3264). A 2xx resets the clock (adopting anySession-Expiresthe peer granted); failure tears the call down with BYE. - Otherwise runs the expiry watchdog: every
peer_refreshed.notify_one()resets the deadline, and if the deadline lapses the call is torn down with BYE. The consumer pingspeer_refreshedafter answering the peer’s refresh re-INVITE — see the module docs for theDialogState::Updatedwiring.
All failures are folded into the returned SessionTimerOutcome;
the loop never panics and never returns early without standing the
session down.