瀏覽代碼

textops: documentation updated for is_audio_on_hold()

Ovidiu Sas 7 年之前
父節點
當前提交
fad36ca8bc
共有 1 個文件被更改,包括 22 次插入1 次删除
  1. 22 1
      src/modules/textops/doc/textops_admin.xml

+ 22 - 1
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>