pub struct ExecuteOn { /* private fields */ }Expand description
An application for an execute_on_* hook such as
ChannelVariable::ExecuteOnOriginate.
The switch splits the value at the first space or lone colon, expands what follows and runs the
application on the channel; a name opening perl in any case, or one carrying ::, is queued
on the session instead of run where the hook fires. Only a name and argument the application
receives as written are representable. Set as execute_on_originate in an originate’s block,
the hook runs on the new channel before that channel’s session thread starts, so a variable it
sets is on the channel before a SIP leg builds its INVITE. That is how a large or free-text
value reaches a leg without crossing the dial string’s tokenizer: the block carries paths, and
the application reads the value from where they point. Not on a loopback leg, which the hook
wedges in CS_INIT. docs/dial-string-format.md has the measurements and the traps.
Implementations§
Source§impl ExecuteOn
impl ExecuteOn
Sourcepub fn new(
app: impl Into<String>,
arg: Option<impl Into<String>>,
) -> Result<Self, OriginateError>
pub fn new( app: impl Into<String>, arg: Option<impl Into<String>>, ) -> Result<Self, OriginateError>
Refuses a name or argument the switch cuts, expands or reads as a block of scope variables, and a line break the wire cannot carry.
Sourcepub fn lua(
script: impl AsRef<str>,
args: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<Self, OriginateError>
pub fn lua( script: impl AsRef<str>, args: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<Self, OriginateError>
lua <script> <args…>. mod_lua splits its argument on spaces, so a
script path or argument carrying one is refused.
Trait Implementations§
impl Eq for ExecuteOn
impl StructuralPartialEq for ExecuteOn
Auto Trait Implementations§
impl Freeze for ExecuteOn
impl RefUnwindSafe for ExecuteOn
impl Send for ExecuteOn
impl Sync for ExecuteOn
impl Unpin for ExecuteOn
impl UnsafeUnpin for ExecuteOn
impl UnwindSafe for ExecuteOn
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,
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.