#[non_exhaustive]pub enum Endpoint {
Sofia(SofiaEndpoint),
SofiaGateway(SofiaGateway),
Loopback(LoopbackEndpoint),
User(UserEndpoint),
SofiaContact(SofiaContact),
GroupCall(GroupCall),
Error(ErrorEndpoint),
PortAudio(AudioEndpoint),
PulseAudio(AudioEndpoint),
Alsa(AudioEndpoint),
}Expand description
Polymorphic endpoint wrapping all concrete types.
Use this in Originate and
BridgeDialString where any endpoint type must be accepted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sofia(SofiaEndpoint)
sofia/{profile}/{destination}
SofiaGateway(SofiaGateway)
sofia/gateway/[{profile}::]{gateway}/{destination}
Loopback(LoopbackEndpoint)
loopback/{extension}[/{context}]
User(UserEndpoint)
user/{name}[@{domain}]
SofiaContact(SofiaContact)
${sofia_contact([profile/]user@domain)}
GroupCall(GroupCall)
${group_call(group@domain[+order])}
Error(ErrorEndpoint)
error/{cause}
PortAudio(AudioEndpoint)
portaudio[/{destination}]
PulseAudio(AudioEndpoint)
pulseaudio[/{destination}]
Alsa(AudioEndpoint)
alsa[/{destination}]
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn display_for(
&self,
target: impl Into<DialStringTarget>,
) -> EndpointDisplay<'_>
pub fn display_for( &self, target: impl Into<DialStringTarget>, ) -> EndpointDisplay<'_>
Render for a named carrier or DialStringTarget rather than the
DialStringCarrier::EslApi default of Display.
Sourcepub fn parse_for(
s: &str,
target: impl Into<DialStringTarget>,
) -> Result<Self, OriginateError>
pub fn parse_for( s: &str, target: impl Into<DialStringTarget>, ) -> Result<Self, OriginateError>
Parse a dial string written for a named carrier or DialStringTarget,
mirroring display_for. FromStr uses the
DialStringCarrier::EslApi default.
A sofia_contact or group_call expression parses at the dialplan carrier only.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Endpoint
impl<'de> Deserialize<'de> for Endpoint
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 DialString for Endpoint
impl DialString for Endpoint
impl Eq for Endpoint
Source§impl From<ErrorEndpoint> for Endpoint
impl From<ErrorEndpoint> for Endpoint
Source§fn from(ep: ErrorEndpoint) -> Self
fn from(ep: ErrorEndpoint) -> Self
Source§impl From<LoopbackEndpoint> for Endpoint
impl From<LoopbackEndpoint> for Endpoint
Source§fn from(ep: LoopbackEndpoint) -> Self
fn from(ep: LoopbackEndpoint) -> Self
Source§impl From<SofiaContact> for Endpoint
impl From<SofiaContact> for Endpoint
Source§fn from(ep: SofiaContact) -> Self
fn from(ep: SofiaContact) -> Self
Source§impl From<SofiaEndpoint> for Endpoint
impl From<SofiaEndpoint> for Endpoint
Source§fn from(ep: SofiaEndpoint) -> Self
fn from(ep: SofiaEndpoint) -> Self
Source§impl From<SofiaGateway> for Endpoint
impl From<SofiaGateway> for Endpoint
Source§fn from(ep: SofiaGateway) -> Self
fn from(ep: SofiaGateway) -> Self
Source§impl From<UserEndpoint> for Endpoint
impl From<UserEndpoint> for Endpoint
Source§fn from(ep: UserEndpoint) -> Self
fn from(ep: UserEndpoint) -> Self
impl StructuralPartialEq for Endpoint
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations§
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.