Browse code

tm: documentation for rpc commands

Daniel-Constantin Mierla authored on 24/12/2016 08:26:54
Showing 3 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
2
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 3
    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 4
 
5 5
 <section id="tm.event_routes" xmlns:xi="http://www.w3.org/2001/XInclude">
... ...
@@ -13,18 +13,21 @@
13 13
 	    <function moreinfo="none">event_route[tm:branch-failure]</function>
14 14
 	</title>
15 15
 	<para>
16
-	    Named branch failure routes can be defined to run when when a failure response is received.
17
-            This allows handling failures on individual branches, for example, retrying an alternative outbound flow.
16
+		Named branch failure routes can be defined to run when when a failure
17
+		response is received. This allows handling failures on individual
18
+		branches, for example, retrying an alternative outbound flow.
18 19
 	</para>
19 20
         <para>
20
-	    The format of the event_route name is "tm:branch-failure:&lt;name&gt;" and is enabled with the t_on_branch_failure function.
21
+			The format of the event_route name is "tm:branch-failure:&lt;name&gt;"
22
+			and is enabled with the t_on_branch_failure function.
21 23
             This event_route uses the BRANCH_FAILURE_ROUTE route type.
22 24
         </para>
23 25
 	<example>
24 26
 	    <title><function>event_route[tm:branch-failure]</function> usage</title>
25 27
 	    <programlisting>
26 28
 ...
27
-route {
29
+request_route {
30
+    ...
28 31
     t_on_branch_failure("myroute");
29 32
     t_relay();
30 33
 }
31 34
new file mode 100644
... ...
@@ -0,0 +1,166 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
+
5
+<section id="tm.rpcs" xmlns:xi="http://www.w3.org/2001/XInclude">
6
+    <sectioninfo>
7
+    </sectioninfo>
8
+	<title>RPC Commands</title>
9
+
10
+	<section id="tm.rpc.t_uac_start">
11
+		<title>
12
+		<function moreinfo="none">tm.t_uac_start</function>
13
+		</title>
14
+		<para>
15
+		Generates and sends a local SIP request.
16
+		</para>
17
+		<para>Parameters: </para>
18
+		<itemizedlist>
19
+			<listitem><para>
20
+				<emphasis>method</emphasis> - request method
21
+			</para></listitem>
22
+			<listitem><para>
23
+				<emphasis>RURI</emphasis> - request SIP URI
24
+			</para></listitem>
25
+			<listitem><para>
26
+				<emphasis>NEXT HOP</emphasis> - next hop SIP URI (OBP);
27
+				use <quote>.</quote> if no value.
28
+			</para></listitem>
29
+			<listitem><para>
30
+				<emphasis>socket</emphasis> - local socket to be used for
31
+				sending the request; use <quote>.</quote> if no value.
32
+			</para></listitem>
33
+			<listitem><para>
34
+				<emphasis>headers</emphasis> - set of additional headers to
35
+				be added to the request; at least
36
+				<quote>From</quote> and <quote>To</quote> headers must be
37
+				provided)
38
+			</para></listitem>
39
+			<listitem><para>
40
+				<emphasis>body</emphasis> - (optional, may not be present)
41
+				request body (if present, requires the
42
+				<quote>Content-Type</quote> and <quote>Content-length</quote>
43
+				headers)
44
+			</para></listitem>
45
+		</itemizedlist>
46
+	</section>
47
+
48
+	<section id="tm.rpc.t_uac_wait">
49
+		<title>
50
+		<function moreinfo="none">tm.t_uac_wait</function>
51
+		</title>
52
+		<para>
53
+		Similar to rm.t_uac_start, but waits for the SIP reponse and tries to
54
+		provide its details via RPC response.
55
+		</para>
56
+	</section>
57
+
58
+	<section id="tm.rpc.cancel">
59
+		<title>
60
+		<function moreinfo="none">tm.cancel</function>
61
+		</title>
62
+		<para>
63
+		Generates and sends a CANCEL for an existing local SIP request.
64
+		</para>
65
+		<para>Parameters: </para>
66
+		<itemizedlist>
67
+			<listitem><para>
68
+				<emphasis>callid</emphasis> - callid of the INVITE request
69
+				to be cancelled.
70
+			</para></listitem>
71
+			<listitem><para>
72
+				<emphasis>cseq</emphasis> - cseq of the INVITE request to be
73
+				cancelled.
74
+			</para></listitem>
75
+		</itemizedlist>
76
+	</section>
77
+
78
+	<section id="tm.rpc.hash_stats">
79
+		<title>
80
+		<function moreinfo="none">tm.hash_stats</function>
81
+		</title>
82
+		<para>
83
+		Gets information about the load of TM internal hash table.
84
+		</para>
85
+		<para>Parameters: </para>
86
+		<itemizedlist>
87
+			<listitem><para>
88
+				<emphasis>none</emphasis>
89
+			</para></listitem>
90
+		</itemizedlist>
91
+	</section>
92
+
93
+	<section id="tm.rpc.reply">
94
+		<title>
95
+		<function moreinfo="none">tm.reply</function>
96
+		</title>
97
+		<para>
98
+		Generates and sends a reply for an existing inbound SIP transaction.
99
+		</para>
100
+		<para>Parameters: </para>
101
+		<itemizedlist>
102
+			<listitem><para>
103
+				<emphasis>code</emphasis> - reply code
104
+			</para></listitem>
105
+			<listitem><para>
106
+				<emphasis>reason</emphasis> - reason phrase.
107
+			</para></listitem>
108
+			<listitem><para>
109
+				<emphasis>trans_id</emphasis> - transaction identifier
110
+				(has the hash_entry:label format)
111
+			</para></listitem>
112
+			<listitem><para>
113
+				<emphasis>to_tag</emphasis> - To tag to be added to TO header
114
+			</para></listitem>
115
+			<listitem><para>
116
+				<emphasis>new_headers</emphasis> - extra headers to be
117
+				appended to the reply; use a dot (<quote>.</quote>) char
118
+				only if there are no headers;
119
+			</para></listitem>
120
+			<listitem><para>
121
+				<emphasis>body</emphasis> - (optional, may not be present)
122
+				reply body (if present, requires the
123
+				<quote>Content-Type</quote> and <quote>Content-length</quote>
124
+				headers)
125
+			</para></listitem>
126
+		</itemizedlist>
127
+	</section>
128
+	<section id="tm.rpc.reply_callid">
129
+		<title>
130
+		<function moreinfo="none">tm.reply_callid</function>
131
+		</title>
132
+		<para>
133
+		Generates and sends a reply for an existing inbound SIP transaction.
134
+		</para>
135
+		<para>Parameters: </para>
136
+		<itemizedlist>
137
+			<listitem><para>
138
+				<emphasis>code</emphasis> - reply code
139
+			</para></listitem>
140
+			<listitem><para>
141
+				<emphasis>reason</emphasis> - reason phrase.
142
+			</para></listitem>
143
+			<listitem><para>
144
+				<emphasis>callid</emphasis> - SIP Call-ID header
145
+			</para></listitem>
146
+			<listitem><para>
147
+				<emphasis>cseq</emphasis> - SIP CSeq header
148
+			</para></listitem>
149
+			<listitem><para>
150
+				<emphasis>to_tag</emphasis> - To tag to be added to TO header
151
+			</para></listitem>
152
+			<listitem><para>
153
+				<emphasis>new_headers</emphasis> - extra headers to be
154
+				appended to the reply; use a dot (<quote>.</quote>) char
155
+				only if there are no headers;
156
+			</para></listitem>
157
+			<listitem><para>
158
+				<emphasis>body</emphasis> - (optional, may not be present)
159
+				reply body (if present, requires the
160
+				<quote>Content-Type</quote> and <quote>Content-length</quote>
161
+				headers)
162
+			</para></listitem>
163
+		</itemizedlist>
164
+	</section>
165
+
166
+</section>
... ...
@@ -324,8 +324,9 @@ failure_route["serial"]
324 324
 
325 325
     <xi:include href="params.xml"/>
326 326
     <xi:include href="functions.xml"/>
327
-    <xi:include href="api.xml"/>
327
+    <xi:include href="rpc.xml"/>
328 328
     <xi:include href="event_routes.xml"/>
329
+    <xi:include href="api.xml"/>
329 330
 
330 331
     <section id="tm.known_issues">
331 332
 	<title>Known Issues</title>