Procházet zdrojové kódy

tmx: documented reason code parameter for t_cancel_callid()

Daniel-Constantin Mierla před 11 roky
rodič
revize
ce7aee6e59
2 změnil soubory, kde provedl 20 přidání a 5 odebrání
  1. 10 4
      modules/tmx/README
  2. 10 1
      modules/tmx/doc/tmx_admin.xml

+ 10 - 4
modules/tmx/README

@@ -38,7 +38,7 @@ Juha Heinanen
         3. Functions
 
               3.1. t_cancel_branches(which)
-              3.2. t_cancel_callid(callid, cseq, flag)
+              3.2. t_cancel_callid(callid, cseq, flag [, rcode])
               3.3. t_reply_callid(callid, cseq, code, reason)
               3.4. t_flush_flags()
               3.5. t_is_failure_route()
@@ -97,7 +97,7 @@ Chapter 1. Admin Guide
    3. Functions
 
         3.1. t_cancel_branches(which)
-        3.2. t_cancel_callid(callid, cseq, flag)
+        3.2. t_cancel_callid(callid, cseq, flag [, rcode])
         3.3. t_reply_callid(callid, cseq, code, reason)
         3.4. t_flush_flags()
         3.5. t_is_failure_route()
@@ -156,7 +156,7 @@ Chapter 1. Admin Guide
 3. Functions
 
    3.1. t_cancel_branches(which)
-   3.2. t_cancel_callid(callid, cseq, flag)
+   3.2. t_cancel_callid(callid, cseq, flag [, rcode])
    3.3. t_reply_callid(callid, cseq, code, reason)
    3.4. t_flush_flags()
    3.5. t_is_failure_route()
@@ -185,7 +185,7 @@ if (t_cancel_branches("all")) {
 }
 ...
 
-3.2. t_cancel_callid(callid, cseq, flag)
+3.2. t_cancel_callid(callid, cseq, flag [, rcode])
 
    Cancel first INVITE transaction identified by callid and cseq. It sets
    the flag if the value is greater than zero
@@ -194,6 +194,8 @@ if (t_cancel_branches("all")) {
      * callid - call-id value.
      * cseq - cseq number.
      * flag - index of the flag to set.
+     * rcode - code to be added as cause attribute in Reason header for
+       generated CANCEL request. This parameter is optional.
 
    This function can be used in ANY_ROUTE.
 
@@ -203,6 +205,10 @@ if (t_cancel_callid("123qaz", "5", "22")) {
         xlog("transaction cancelled\n");
 }
 ...
+if (t_cancel_callid("123qaz", "5", "22", "200")) {
+        xlog("transaction cancelled with [Reason: cause=200]\n");
+}
+...
 
 3.3. t_reply_callid(callid, cseq, code, reason)
 

+ 10 - 1
modules/tmx/doc/tmx_admin.xml

@@ -97,7 +97,7 @@ if (t_cancel_branches("all")) {
 	</section>
 	<section>
 		<title>
-			<function moreinfo="none">t_cancel_callid(callid, cseq, flag)
+			<function moreinfo="none">t_cancel_callid(callid, cseq, flag [, rcode])
 			</function>
 		</title>
 		<para>
@@ -117,6 +117,11 @@ if (t_cancel_branches("all")) {
 			<listitem><para>
 				<emphasis>flag</emphasis> - index of the flag to set.
 			</para></listitem>
+			<listitem><para>
+					<emphasis>rcode</emphasis> - code to be added as
+					cause attribute in Reason header for generated
+					CANCEL request. This parameter is optional.
+			</para></listitem>
 		</itemizedlist>
 		<para>
 		This function can be used in ANY_ROUTE.
@@ -129,6 +134,10 @@ if (t_cancel_callid("123qaz", "5", "22")) {
 	xlog("transaction cancelled\n");
 }
 ...
+if (t_cancel_callid("123qaz", "5", "22", "200")) {
+	xlog("transaction cancelled with [Reason: cause=200]\n");
+}
+...
 </programlisting>
 		</example>
 	</section>