Skip to content

Commit

Permalink
media_exchange: add media_fork_to_uri implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Mar 6, 2020
1 parent 9acd52d commit 0cc526d
Show file tree
Hide file tree
Showing 4 changed files with 479 additions and 124 deletions.
34 changes: 11 additions & 23 deletions modules/media_exchange/doc/media_exchange_admin.xml
Expand Up @@ -128,16 +128,13 @@
<title>Exported Functions</title>
<section id="func_media_fork_to_uri" xreflabel="media_fork_to_uri()">
<title>
<function moreinfo="none">media_fork_to_uri(URI[, leg[, body[, headers]]])</function>
<function moreinfo="none">media_fork_to_uri(URI[, leg[, headers[, medianum]]])</function>
</title>
<para>
Behaves as a B2B user agent client to initiate a call to a SIP
URI and then stream the media to the SDP received in the 200
OK response.
</para>
<para>
<emphasis>Note</emphasis> Not implemented yet!
</para>
<para>
Parameters:
<itemizedlist>
Expand All @@ -151,16 +148,16 @@
<emphasis>callee</emphasis> and <emphasis>both</emphasis>. If
missing, the direction of the indialog request is used.
</para></listitem>
<listitem><para>
<emphasis>body</emphasis> (string, optional) - custom body used
for the generated INVITE. If missing, the body of the current
request is used.
</para></listitem>
<listitem><para>
<emphasis>headers</emphasis> (string, optional) - optional
headers added to the generated request.
</para></listitem>
</itemizedlist>
<listitem><para>
<emphasis>medianum</emphasis> (integer, optional) - the media
stream that will be forked within the call. First index is 0.
If missing, all media streams of that leg(s) are streamed.
</para></listitem>
</para>
<para>
This function can be used from REQUEST_ROUTE.
Expand Down Expand Up @@ -438,6 +435,11 @@ if (has_totag() &amp;&amp; is_method("INVITE") &amp;&amp; !is_audio_on_hold())
<emphasis>headers</emphasis> (string, optional) - extra
headers to add to the outgoing request
</para></listitem>
<listitem><para>
<emphasis>medianum</emphasis> (integer, optional) - the media
stream that will be forked within the call. First index is 0.
If missing, all media streams of that leg(s) are streamed.
</para></listitem>
</itemizedlist>
<para>
MI FIFO Command Format:
Expand All @@ -449,20 +451,6 @@ opensips-cli -x mi media_fork_from_call_to_uri \
uri=sip:record@127.0.0.1:5080
</programlisting>
</section>
<section id="mi_media_fork_from_call_to_uri_body"
xreflabel="media_fork_from_call_to_uri_body">
<title>
<function moreinfo="none">media_fork_from_call_to_uri_body</function>
</title>
<para>
MI command that does the same thing as the
<xref linkend="mi_media_fork_from_call_to_uri"/> MI function, but
also allows you to specify a custom body in the outgoing request.
The body has to be specified in the mandatory <emphasis>body</emphasis>
parameter, all the other parameters being the same as the ones of
<xref linkend="mi_media_fork_from_call_to_uri"/>.
</para>
</section>
<section id="mi_media_exchange_from_call_to_uri"
xreflabel="media_exchange_from_call_to_uri">
<title>
Expand Down

0 comments on commit 0cc526d

Please sign in to comment.