Module: sip-router Branch: master Commit: 4996c6fb74e8f7b8461714734af7c64cb49c12e1 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4996c6fb...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue May 11 15:26:32 2010 +0200
tmx: documentation updated
- documented t_cancel_callid() and t_reply_callid() - readme regenerated
---
modules_k/tmx/README | 72 ++++++++++++++++++++++++++++++------- modules_k/tmx/doc/tmx_admin.xml | 76 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 13 deletions(-)
diff --git a/modules_k/tmx/README b/modules_k/tmx/README index 67107a5..87fcff5 100644 --- a/modules_k/tmx/README +++ b/modules_k/tmx/README @@ -11,7 +11,7 @@ Daniel-Constantin Mierla
- Copyright � 2009 Daniel-Constantin Mierla + Copyright © 2009 Daniel-Constantin Mierla __________________________________________________________________
Table of Contents @@ -27,6 +27,8 @@ Daniel-Constantin Mierla 3. Exported Functions
3.1. t_cancel_branches(which) + 3.2. t_cancel_callid(callid, cseq, flag) + 3.3. t_reply_callid(callid, cseq, code, reason)
4. Exported pseudo-variables 5. Exported MI Functions @@ -53,6 +55,8 @@ Daniel-Constantin Mierla List of Examples
1.1. t_cancel_branches usage + 1.2. t_cancel_callid usage + 1.3. t_cancel_reply usage
Chapter 1. Admin Guide
@@ -67,6 +71,8 @@ Chapter 1. Admin Guide 3. Exported Functions
3.1. t_cancel_branches(which) + 3.2. t_cancel_callid(callid, cseq, flag) + 3.3. t_reply_callid(callid, cseq, code, reason)
4. Exported pseudo-variables 5. Exported MI Functions @@ -116,8 +122,10 @@ Chapter 1. Admin Guide 3. Exported Functions
3.1. t_cancel_branches(which) + 3.2. t_cancel_callid(callid, cseq, flag) + 3.3. t_reply_callid(callid, cseq, code, reason)
-3.1. t_cancel_branches(which) +3.1. t_cancel_branches(which)
Cancel branches of an active SIP transaction. The function can be called for a SIP reply that will identify the current branch. @@ -136,6 +144,44 @@ if (t_cancel_branches("all")) { } ...
+3.2. t_cancel_callid(callid, cseq, flag) + + Cancel first INVITE transaction identified by callid and cseq. It sets + the flag if the value is greater than zero + + Parameters:. + * callid - call-id value. + * cseq - cseq number. + * flag - index of the flag to set. + + This function can be used in ANY_ROUTE. + + Example 1.2. t_cancel_callid usage +... +if (t_cancel_callid("123qaz", "5", "22")) { + xlog("transaction cancelled\n"); +} +... + +3.3. t_reply_callid(callid, cseq, code, reason) + + Send reply to first INVITE transaction identified by callid and cseq. + + Parameters:. + * callid - call-id value. + * cseq - cseq number. + * code - reply code. + * reason - reply reason. + + This function can be used in ANY_ROUTE. + + Example 1.3. t_cancel_reply usage +... +if (t_cancel_callid("123qaz", "5", "458", "Replied remotely")) { + xlog("transaction replied\n"); +} +... + 4. Exported pseudo-variables
* $T_branch_idx @@ -153,22 +199,22 @@ if (t_cancel_branches("all")) { 5.3. t_hash 5.4. t_reply
-5.1. t_uac_dlg +5.1. t_uac_dlg
Generates and sends a local SIP request.
Parameters: * method - request method * RURI - request SIP URI - * NEXT HOP - next hop SIP URI (OBP); use "." if no value. - * socket - local socket to be used for sending the request; use "." + * NEXT HOP - next hop SIP URI (OBP); use “.” if no value. + * socket - local socket to be used for sending the request; use “.” if no value. * headers - set of additional headers to be added to the request; at - least "From" and "To" headers must be specify) + least “From” and “To” headers must be specify) * body - (optional, may not be present) request body (if present, - requires the "Content-Type" and "Content-length" headers) + requires the “Content-Type” and “Content-length” headers)
-5.2. t_uac_cancel +5.2. t_uac_cancel
Generates and sends a CANCEL for an existing local SIP request.
@@ -176,14 +222,14 @@ if (t_cancel_branches("all")) { * callid - callid of the INVITE request to be cancelled. * cseq - cseq of the INVITE request to be cancelled.
-5.3. t_hash +5.3. t_hash
Gets information about the load of TM internal hash table.
Parameters: * none
-5.4. t_reply +5.4. t_reply
Generates and sends a reply for an existing inbound SIP transaction.
@@ -193,9 +239,9 @@ if (t_cancel_branches("all")) { * trans_id - transaction identifier (has the hash_entry:label format) * to_tag - To tag to be added to TO header * new_headers - extra headers to be appended to the reply; use a dot - (".") char only if there are no headers; + (“.”) char only if there are no headers; * body - (optional, may not be present) reply body (if present, - requires the "Content-Type" and "Content-length" headers) + requires the “Content-Type” and “Content-length” headers)
6. Exported statistics
@@ -212,7 +258,7 @@ if (t_cancel_branches("all")) { 6.11. inuse_transactions
Exported statistics are listed in the next sections. All statistics - except "inuse_transactions" can be reset. + except “inuse_transactions” can be reset.
6.1. received_replies
diff --git a/modules_k/tmx/doc/tmx_admin.xml b/modules_k/tmx/doc/tmx_admin.xml index ac82335..7ba6c32 100644 --- a/modules_k/tmx/doc/tmx_admin.xml +++ b/modules_k/tmx/doc/tmx_admin.xml @@ -95,6 +95,82 @@ if (t_cancel_branches("all")) { </programlisting> </example> </section> + <section> + <title> + <function moreinfo="none">t_cancel_callid(callid, cseq, flag) + </function> + </title> + <para> + Cancel first INVITE transaction identified by callid and cseq. It sets + the flag if the value is greater than zero + </para> + <para> + Parameters:. + </para> + <itemizedlist> + <listitem><para> + <emphasis>callid</emphasis> - call-id value. + </para></listitem> + <listitem><para> + <emphasis>cseq</emphasis> - cseq number. + </para></listitem> + <listitem><para> + <emphasis>flag</emphasis> - index of the flag to set. + </para></listitem> + </itemizedlist> + <para> + This function can be used in ANY_ROUTE. + </para> + <example> + <title><function>t_cancel_callid</function> usage</title> + <programlisting format="linespecific"> +... +if (t_cancel_callid("123qaz", "5", "22")) { + xlog("transaction cancelled\n"); +} +... +</programlisting> + </example> + </section> + <section> + <title> + <function moreinfo="none">t_reply_callid(callid, cseq, code, reason) + </function> + </title> + <para> + Send reply to first INVITE transaction identified by callid and cseq. + </para> + <para> + Parameters:. + </para> + <itemizedlist> + <listitem><para> + <emphasis>callid</emphasis> - call-id value. + </para></listitem> + <listitem><para> + <emphasis>cseq</emphasis> - cseq number. + </para></listitem> + <listitem><para> + <emphasis>code</emphasis> - reply code. + </para></listitem> + <listitem><para> + <emphasis>reason</emphasis> - reply reason. + </para></listitem> + </itemizedlist> + <para> + This function can be used in ANY_ROUTE. + </para> + <example> + <title><function>t_cancel_reply</function> usage</title> + <programlisting format="linespecific"> +... +if (t_cancel_callid("123qaz", "5", "458", "Replied remotely")) { + xlog("transaction replied\n"); +} +... +</programlisting> + </example> + </section> </section>
<section>