pub struct Config {Show 33 fields
pub http_addr: String,
pub addr: String,
pub udp_port: u16,
pub auto_learn_public_address: Option<bool>,
pub log_level: Option<String>,
pub log_file: Option<String>,
pub http_access_skip_paths: Vec<String>,
pub peers: Vec<String>,
pub useragent: Option<String>,
pub register_users: Option<Vec<RegisterOption>>,
pub graceful_shutdown: Option<bool>,
pub graceful_shutdown_timeout: Option<u64>,
pub handler: Option<InviteHandlerConfig>,
pub accept_timeout: Option<String>,
pub codecs: Option<Vec<String>>,
pub external_ip: Option<String>,
pub rtp_start_port: Option<u16>,
pub rtp_end_port: Option<u16>,
pub enable_rtp_latching: Option<bool>,
pub enable_ice_lite: Option<bool>,
pub rtp_bind_ip: Option<String>,
pub tls_port: Option<u16>,
pub tls_cert_file: Option<String>,
pub tls_key_file: Option<String>,
pub enable_srtp: Option<bool>,
pub callrecord: Option<CallRecordConfig>,
pub media_cache_path: String,
pub ambiance: Option<AmbianceOption>,
pub ice_servers: Option<Vec<IceServer>>,
pub recording: Option<RecordingPolicy>,
pub rewrites: Option<Vec<RewriteRule>>,
pub trunk_rules: Option<Vec<TrunkRule>>,
pub enable_options_response: Option<bool>,
}Fields§
§http_addr: String§addr: String§udp_port: u16§auto_learn_public_address: Option<bool>§log_level: Option<String>§log_file: Option<String>§http_access_skip_paths: Vec<String>§peers: Vec<String>Peer active-call nodes (“ip:port” of their HTTP/WS endpoint).
When a websocket client connects with a session id that is not hosted on
this node, the originator (empty forward) polls each peer once
(forward=true) and tunnels the websocket to the peer that hosts the
call. Any request whose forward is set must not hop further.
useragent: Option<String>§register_users: Option<Vec<RegisterOption>>§graceful_shutdown: Option<bool>§graceful_shutdown_timeout: Option<u64>Total seconds to wait during graceful shutdown before forcing exit. SIP de-registration and active call draining run in parallel, both with this timeout.
handler: Option<InviteHandlerConfig>§accept_timeout: Option<String>§codecs: Option<Vec<String>>§external_ip: Option<String>§rtp_start_port: Option<u16>§rtp_end_port: Option<u16>§enable_rtp_latching: Option<bool>§enable_ice_lite: Option<bool>§rtp_bind_ip: Option<String>§tls_port: Option<u16>§tls_cert_file: Option<String>§tls_key_file: Option<String>§enable_srtp: Option<bool>§callrecord: Option<CallRecordConfig>§media_cache_path: String§ambiance: Option<AmbianceOption>§ice_servers: Option<Vec<IceServer>>§recording: Option<RecordingPolicy>§rewrites: Option<Vec<RewriteRule>>§trunk_rules: Option<Vec<TrunkRule>>§enable_options_response: Option<bool>Implementations§
Source§impl Config
impl Config
pub fn load(path: &str) -> Result<Self, Error>
pub fn recorder_path(&self) -> String
pub fn recorder_format(&self) -> RecorderFormat
pub fn ensure_recording_defaults(&mut self) -> bool
Sourcepub fn apply_trunk_rules(&self, invite: &mut InviteOption)
pub fn apply_trunk_rules(&self, invite: &mut InviteOption)
Apply the first matching trunk rule to an outgoing SIP INVITE/REFER.
Rules are evaluated in declaration order; the first rule whose match
conditions (all AND) hold is applied and later rules are skipped
(first-match-wins). A rule with an empty match section always matches
and acts as a catch-all default. If no rule matches, the invite is left
untouched. Does nothing when Config::trunk_rules is not configured.
Sourcepub fn peer_ws_endpoint(peer: &str) -> Option<String>
pub fn peer_ws_endpoint(peer: &str) -> Option<String>
Normalize a configured peer to a ws:// (or wss://) base URL.
Accepts bare ip:port, or an explicit ws://, wss://, http:// or
https:// scheme. Returns None when the value is empty or unusable.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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> ⓘ
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> ⓘ
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