Browse Source

tmx: documented reason code parameter for t_cancel_callid()

Daniel-Constantin Mierla 11 years ago
parent
commit
ce7aee6e59
2 changed files with 20 additions and 5 deletions
  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. Functions
 
 
               3.1. t_cancel_branches(which)
               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.3. t_reply_callid(callid, cseq, code, reason)
               3.4. t_flush_flags()
               3.4. t_flush_flags()
               3.5. t_is_failure_route()
               3.5. t_is_failure_route()
@@ -97,7 +97,7 @@ Chapter 1. Admin Guide
    3. Functions
    3. Functions
 
 
         3.1. t_cancel_branches(which)
         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.3. t_reply_callid(callid, cseq, code, reason)
         3.4. t_flush_flags()
         3.4. t_flush_flags()
         3.5. t_is_failure_route()
         3.5. t_is_failure_route()
@@ -156,7 +156,7 @@ Chapter 1. Admin Guide
 3. Functions
 3. Functions
 
 
    3.1. t_cancel_branches(which)
    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.3. t_reply_callid(callid, cseq, code, reason)
    3.4. t_flush_flags()
    3.4. t_flush_flags()
    3.5. t_is_failure_route()
    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
    Cancel first INVITE transaction identified by callid and cseq. It sets
    the flag if the value is greater than zero
    the flag if the value is greater than zero
@@ -194,6 +194,8 @@ if (t_cancel_branches("all")) {
      * callid - call-id value.
      * callid - call-id value.
      * cseq - cseq number.
      * cseq - cseq number.
      * flag - index of the flag to set.
      * 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.
    This function can be used in ANY_ROUTE.
 
 
@@ -203,6 +205,10 @@ if (t_cancel_callid("123qaz", "5", "22")) {
         xlog("transaction cancelled\n");
         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)
 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>
 	<section>
 	<section>
 		<title>
 		<title>
-			<function moreinfo="none">t_cancel_callid(callid, cseq, flag)
+			<function moreinfo="none">t_cancel_callid(callid, cseq, flag [, rcode])
 			</function>
 			</function>
 		</title>
 		</title>
 		<para>
 		<para>
@@ -117,6 +117,11 @@ if (t_cancel_branches("all")) {
 			<listitem><para>
 			<listitem><para>
 				<emphasis>flag</emphasis> - index of the flag to set.
 				<emphasis>flag</emphasis> - index of the flag to set.
 			</para></listitem>
 			</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>
 		</itemizedlist>
 		<para>
 		<para>
 		This function can be used in ANY_ROUTE.
 		This function can be used in ANY_ROUTE.
@@ -129,6 +134,10 @@ if (t_cancel_callid("123qaz", "5", "22")) {
 	xlog("transaction cancelled\n");
 	xlog("transaction cancelled\n");
 }
 }
 ...
 ...
+if (t_cancel_callid("123qaz", "5", "22", "200")) {
+	xlog("transaction cancelled with [Reason: cause=200]\n");
+}
+...
 </programlisting>
 </programlisting>
 		</example>
 		</example>
 	</section>
 	</section>