pub struct OptionsResponseConfig {
pub enabled: Option<bool>,
pub allow: Vec<String>,
pub allow_registered_servers: Option<bool>,
pub auto_learn: Option<bool>,
pub learn_ttl: Option<String>,
pub extra_headers: Vec<(String, String)>,
}Expand description
[options_response] — customizes the 200 OK answers to out-of-dialog
OPTIONS keep-alive probes and restricts which sources are answered.
A probe is answered only when its source (top Via header) matches the
static allow ACL, a register_users[].server host, or a peer address
learned from call traffic (auto_learn). Everything else is dropped
silently.
Fields§
§enabled: Option<bool>Answer out-of-dialog OPTIONS probes; falls back to the legacy
enable_options_response field, defaulting to true.
allow: Vec<String>Static ACL entries: exact IP (139.224.72.64), CIDR (10.0.0.0/8),
or hostname (sip.ccc.aliyuncs.com).
allow_registered_servers: Option<bool>Also answer probes coming from the hosts of register_users[].server.
auto_learn: Option<bool>Learn peer addresses from call traffic — inbound INVITEs and responses
to our outbound INVITEs — and answer probes from those sources within
learn_ttl (strict mode: until the first peer is learned, only the
static ACL and registered hosts apply).
learn_ttl: Option<String>How long a learned peer address stays valid, e.g. "7d" (default).
extra_headers: Vec<(String, String)>Extra headers appended to the OPTIONS 200 OK response.
Trait Implementations§
Source§impl Clone for OptionsResponseConfig
impl Clone for OptionsResponseConfig
Source§fn clone(&self) -> OptionsResponseConfig
fn clone(&self) -> OptionsResponseConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OptionsResponseConfig
impl Debug for OptionsResponseConfig
Source§impl Default for OptionsResponseConfig
impl Default for OptionsResponseConfig
Source§fn default() -> OptionsResponseConfig
fn default() -> OptionsResponseConfig
Source§impl<'de> Deserialize<'de> for OptionsResponseConfig
impl<'de> Deserialize<'de> for OptionsResponseConfig
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>,
Source§impl PartialEq for OptionsResponseConfig
impl PartialEq for OptionsResponseConfig
Source§impl Serialize for OptionsResponseConfig
impl Serialize for OptionsResponseConfig
impl StructuralPartialEq for OptionsResponseConfig
Auto Trait Implementations§
impl Freeze for OptionsResponseConfig
impl RefUnwindSafe for OptionsResponseConfig
impl Send for OptionsResponseConfig
impl Sync for OptionsResponseConfig
impl Unpin for OptionsResponseConfig
impl UnsafeUnpin for OptionsResponseConfig
impl UnwindSafe for OptionsResponseConfig
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