浏览代码

tm: docs for t_get_status_code()

Daniel-Constantin Mierla 6 年之前
父节点
当前提交
4a4dbdbe8e
共有 1 个文件被更改,包括 18 次插入0 次删除
  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>