[sr-dev] git:master:aa7c4bea: sanity: docs for noreply param and sanity_reply() function

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 13 12:18:19 CEST 2018


Module: kamailio
Branch: master
Commit: aa7c4beafbfee054872a4fa05a7d2a2f105e431e
URL: https://github.com/kamailio/kamailio/commit/aa7c4beafbfee054872a4fa05a7d2a2f105e431e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-09-13T12:17:19+02:00

sanity: docs for noreply param and sanity_reply() function

---

Modified: src/modules/sanity/doc/sanity_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/aa7c4beafbfee054872a4fa05a7d2a2f105e431e.diff
Patch: https://github.com/kamailio/kamailio/commit/aa7c4beafbfee054872a4fa05a7d2a2f105e431e.patch

---

diff --git a/src/modules/sanity/doc/sanity_admin.xml b/src/modules/sanity/doc/sanity_admin.xml
index f9f63071a0..a8a57d88d9 100644
--- a/src/modules/sanity/doc/sanity_admin.xml
+++ b/src/modules/sanity/doc/sanity_admin.xml
@@ -225,6 +225,27 @@ modparam("sanity", "proxy_require", "foo, bar")
 	    <programlisting>
 ...
 modparam("sanity", "autodrop", 1)
+...
+	    </programlisting>
+	</example>
+	</section>
+
+	<section id="sanity.p.noreply">
+	<title><varname>noreply</varname> (int)</title>
+	<para>
+		If set to 1, then the module does not send a SIP reply internally in
+		case there is an error detected when performing the sanity checks.
+		There is the option to send the reply from config file with functions
+		from sl or tm module as well as sanity_reply() from this module.
+	</para>
+	<para>
+		Default value: 0.
+	</para>
+	<example>
+	    <title>Set <varname>noreply</varname> parameter</title>
+	    <programlisting>
+...
+modparam("sanity", "noreply", 1)
 ...
 	    </programlisting>
 	</example>
@@ -302,6 +323,28 @@ if (method=="INVITE" && !sanity_check("1024", "6")) {
 ]]>
 		</programlisting>
 	</example>
-    </section>
+	</section>
+	<section id="sanity.f.sanity_reply">
+	    <title>
+		<function>sanity_reply()</function>
+	    </title>
+	<para>
+	Send a SIP reply using the code and reason text set internally by the module
+	when detecting errors while performing the sanity checks. It is done only
+	when parameter noreply is set to 1.
+	</para>
+	<example>
+		<title><function>sanity_reply</function> usage</title>
+		<programlisting>
+...
+if(!sanity_check("1024", "6")) {
+   xdbg("sanity checks failed\n");
+   sanity_reply();
+   exit;
+}
+...
+		</programlisting>
+	</example>
+	</section>
 </section>
 </chapter>




More information about the sr-dev mailing list