[sr-dev] git:master:fad36ca8: textops: documentation updated for is_audio_on_hold()
Ovidiu Sas
osas at voipembedded.com
Fri Feb 2 20:31:20 CET 2018
Module: kamailio
Branch: master
Commit: fad36ca8bc3526f71f8bb3af46afe3bb2a0f1789
URL: https://github.com/kamailio/kamailio/commit/fad36ca8bc3526f71f8bb3af46afe3bb2a0f1789
Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date: 2018-02-02T14:30:53-05:00
textops: documentation updated for is_audio_on_hold()
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/fad36ca8bc3526f71f8bb3af46afe3bb2a0f1789.diff
Patch: https://github.com/kamailio/kamailio/commit/fad36ca8bc3526f71f8bb3af46afe3bb2a0f1789.patch
---
diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml
index 4cb99d708e..d5884bfd20 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -1258,6 +1258,19 @@ if(has_body("application/sdp"))
<para>
The function returns <emphasis>true</emphasis> if the SIP message
has a body attached and at least one audio stream in on hold.
+ The return code of the function indicates the detected hold type:
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>1</emphasis> - RFC2543 hold type:
+ null connection IP detected
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>2</emphasis> - RFC3264 hold type:
+ inactive or sendonly attributes detected
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
<para>
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
@@ -1269,7 +1282,15 @@ if(has_body("application/sdp"))
...
if(is_audio_on_hold())
{
- # do interesting stuff here
+ switch ($rc) {
+ case 1:
+ # RFC2543 hold type
+ # do interesting stuff here
+ break;
+ case 2:
+ # RFC3264 hold type
+ # do interesting stuff here
+ break;
}
...
</programlisting>
More information about the sr-dev
mailing list