pub struct ActiveCall {
pub call_state: ActiveCallStateRef,
pub cancel_token: CancellationToken,
pub call_type: ActiveCallType,
pub session_id: String,
pub media_stream: Arc<MediaStream>,
pub track_config: TrackConfig,
pub event_sender: EventSender,
pub app_state: AppState,
pub invitation: Invitation,
pub cmd_sender: CommandSender,
pub dump_events: bool,
pub server_side_track_id: TrackId,
}Fields§
§call_state: ActiveCallStateRef§cancel_token: CancellationToken§call_type: ActiveCallType§session_id: String§media_stream: Arc<MediaStream>§track_config: TrackConfig§event_sender: EventSender§app_state: AppState§invitation: Invitation§cmd_sender: CommandSender§dump_events: bool§server_side_track_id: TrackIdImplementations§
Source§impl ActiveCall
impl ActiveCall
pub fn new( call_type: ActiveCallType, cancel_token: CancellationToken, session_id: String, invitation: Invitation, app_state: AppState, track_config: TrackConfig, audio_receiver: Option<WebsocketBytesReceiver>, dump_events: bool, server_side_track_id: Option<TrackId>, extras: Option<HashMap<String, Value>>, sip_hangup_headers_template: Option<HashMap<String, String>>, ) -> Self
pub async fn enqueue_command(&self, command: Command) -> Result<()>
Sourcepub fn new_receiver(&self) -> ActiveCallReceiver
pub fn new_receiver(&self) -> ActiveCallReceiver
Create a new ActiveCallReceiver for this ActiveCall
tokio::sync::broadcast not cached messages, so need to early create receiver
before calling serve()
pub async fn serve(&self, receiver: ActiveCallReceiver) -> Result<()>
pub async fn cleanup(&self) -> Result<()>
pub fn get_callrecord(&self) -> Option<CallRecord>
pub async fn create_rtp_track( &self, track_id: TrackId, ssrc: u32, enable_srtp: Option<bool>, ) -> Result<RtcTrack>
pub async fn setup_track_with_stream( &self, option: &CallOption, track: Box<dyn Track>, ) -> Result<()>
pub async fn update_track_wrapper( &self, track: Box<dyn Track>, play_id: Option<String>, )
pub async fn create_websocket_track( &self, audio_receiver: WebsocketBytesReceiver, ) -> Result<Box<dyn Track>>
Sourcepub fn is_webrtc_sdp(sdp: &str) -> bool
pub fn is_webrtc_sdp(sdp: &str) -> bool
Detect if SDP is WebRTC format
pub async fn setup_answer_track( &self, ssrc: u32, option: &CallOption, offer: String, ) -> Result<(String, Box<dyn Track>)>
pub async fn prepare_incoming_sip_track( &self, cancel_token: CancellationToken, call_state_ref: ActiveCallStateRef, track_id: &String, pending_dialog: PendingDialog, hangup_headers: Option<Vec<Header>>, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActiveCall
impl !RefUnwindSafe for ActiveCall
impl Send for ActiveCall
impl Sync for ActiveCall
impl Unpin for ActiveCall
impl UnsafeUnpin for ActiveCall
impl !UnwindSafe for ActiveCall
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more