Browse code

corex: docs for dns_cache parameter

Daniel-Constantin Mierla authored on 26/05/2020 13:59:01
Showing 1 changed files
... ...
@@ -93,6 +93,60 @@
93 93
 modparam("corex", "alias_subdomains", "kamailio.org")
94 94
 modparam("corex", "alias_subdomains", "udp:sip-router.org:5060")
95 95
 ...
96
+</programlisting>
97
+	    </example>
98
+	</section>
99
+	<section id="corex.p.dns_cache">
100
+	    <title><varname>dns_cache</varname> (string)</title>
101
+	    <para>
102
+		Add A or AAAA records to internal DNS cache at startup. It can be set
103
+		many times to add more than one record.
104
+	    </para>
105
+	    <para>
106
+		The format of the value follows the SIP params style:
107
+		"attr1=val1;attr2=val2;...". The attributes can be:
108
+	    </para>
109
+		<itemizedlist>
110
+		<listitem>
111
+			<para>
112
+			<emphasis>type</emphasis> - it can be "A" (IPv4) or "AAAA" (IPv6)
113
+			</para>
114
+		</listitem>
115
+		<listitem>
116
+			<para>
117
+			<emphasis>name</emphasis> - the domain name
118
+			</para>
119
+		</listitem>
120
+		<listitem>
121
+			<para>
122
+			<emphasis>addr</emphasis> - the IP address
123
+			</para>
124
+		</listitem>
125
+		<listitem>
126
+			<para>
127
+			<emphasis>ttl</emphasis> - TTL value
128
+			</para>
129
+		</listitem>
130
+		<listitem>
131
+			<para>
132
+			<emphasis>flags</emphasis> - can be: 1 - the domain is unresolvable
133
+			(like blacklisted); 2 - the record is permanent (never times out,
134
+			never deleted, never overwritten)
135
+			</para>
136
+		</listitem>
137
+		</itemizedlist>
138
+	    <para>
139
+		<emphasis>
140
+		    Default value is <quote>NULL</quote>.
141
+		</emphasis>
142
+	    </para>
143
+	    <example>
144
+		<title>Set <varname>dns_cache</varname> parameter</title>
145
+		<programlisting format="linespecific">
146
+...
147
+modparam("corex", "dns_cache", "type=A;name=kamailio.org;addr=193.22.119.66;ttl=3600000;flags=0")
148
+modparam("corex", "dns_cache", "type=AAAA;name=kamailio.org;addr=2a00:d60:0:400::2;ttl=3600000;flags=0")
149
+...
96 150
 </programlisting>
97 151
 	    </example>
98 152
 	</section>