Browse Source

tm: docs for t_get_status_code()

Daniel-Constantin Mierla 6 năm trước cách đây
mục cha
commit
4a4dbdbe8e
1 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 18 0
      src/modules/tm/doc/functions.xml

+ 18 - 0
src/modules/tm/doc/functions.xml

@@ -1845,6 +1845,24 @@ if (t_is_retr_async_reply()) {
 ...
 t_uac_send("OPTIONS", "sip:[email protected]", "", "",
     "From: [email protected];tag=2w3e\r\nTo: [email protected]", "");
+...
+	    </programlisting>
+	</example>
+    </section>
+	<section id="tm.f.t_get_status_code">
+	<title>
+	    <function>t_get_status_code()</function>
+	</title>
+	<para>
+	Return the status code for transaction - the most relevant SIP reply status
+	code, or -1 in case of error or no status code was set.
+	</para>
+	<example>
+	    <title><function>t_get_status_code</function> usage</title>
+	    <programlisting>
+...
+$var(ts) = t_get_status_code();
+if($var(ts) == 500) { ... }
 ...
 	    </programlisting>
 	</example>