Skip to content

Commit

Permalink
Merge branch 'vladpaiu-rtpengine_async'
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jan 8, 2025
2 parents d92acaa + 6291cff commit 68f5d78
Show file tree
Hide file tree
Showing 3 changed files with 632 additions and 94 deletions.
66 changes: 66 additions & 0 deletions modules/rtpengine/doc/rtpengine_admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,72 @@ rtpengine_play_dtmf("0"); # send the 0 code upstream

</section>

<section>
<title>Exported Asyncronous Functions</title>
<section id="afunc_rtpengine_offer" xreflabel="rtpengine_offer()">
<title><function moreinfo="none">rtpengine_offer([flags[, sock_pvar[, sdp_pvar[, body]]]])</function></title>
<para>
The asynchronous flavor of the <xref linkend="func_rtpengine_offer"/>
function. It receives the same parameters, with the same meanings.
</para>
<example>
<title>Example of async rtpengine_offer() usage</title>
<programlisting format="linespecific">
...
if (is_method("ACK") &amp;&amp; has_totag() &amp;&amp; has_body_part("application/sdp")) {
async(rtpengine_offer(), resume_invite);
}
...
route[resume_invite] {
t_relay();
}
...
</programlisting>
</example>
</section>
<section id="afunc_rtpengine_answer" xreflabel="rtpengine_answer()">
<title><function moreinfo="none">rtpengine_answer([flags[, sock_pvar[, sdp_pvar[, body]]]])</function></title>
<para>
The asynchronous flavor of the <xref linkend="func_rtpengine_answer"/>
function. It receives the same parameters, with the same meanings.
</para>
<example>
<title>Example of async rtpengine_answer() usage</title>
<programlisting format="linespecific">
...
if (is_method("ACK") &amp;&amp; has_body_part("application/sdp")) {
# late negotiation
async(rtpengine_answer(), resume_ack);
}
...
route[resume_ack] {
t_relay();
}
...
</programlisting>
</example>
</section>
<section id="afunc_rtpengine_delete" xreflabel="rtpengine_delete()">
<title>
<function moreinfo="none">rtpengine_delete([flags[, sock_var]])</function>
</title>
<para>
The asynchronous flavor of the <xref linkend="func_rtpengine_delete"/>
function. It receives the same parameters, with the same meanings.
</para>
<example>
<title>Example of async rtpengine_delete() usage</title>
<programlisting format="linespecific">
...
if (is_method("BYE")) {
launch(rtpengine_delete());
}
...
</programlisting>
</example>
</section>
</section>

<section id="exported_pseudo_variables">
<title>Exported Pseudo-Variables</title>
<section id="pv_rtpstat_0" xreflabel="$rtpstat">
Expand Down
Loading

0 comments on commit 68f5d78

Please sign in to comment.