소스 검색

crypto: documentation for register_callid parameter

Daniel-Constantin Mierla 9 년 전
부모
커밋
5de62614f6
2개의 변경된 파일54개의 추가작업 그리고 7개의 파일을 삭제
  1. 27 6
      modules/crypto/README
  2. 27 1
      modules/crypto/doc/crypto_admin.xml

+ 27 - 6
modules/crypto/README

@@ -26,6 +26,7 @@ Daniel-Constantin Mierla
         3. Parameters
 
               3.1. salt (str)
+              3.2. register_callid (int)
 
         4. Functions
 
@@ -34,9 +35,10 @@ Daniel-Constantin Mierla
 
    List of Examples
 
-   1.1. Set interval parameter
-   1.2. crypto_aes_encrypt usage
-   1.3. crypto_aes_decrypt usage
+   1.1. Set salt parameter
+   1.2. Set register_callid parameter
+   1.3. crypto_aes_encrypt usage
+   1.4. crypto_aes_decrypt usage
 
 Chapter 1. Admin Guide
 
@@ -51,6 +53,7 @@ Chapter 1. Admin Guide
    3. Parameters
 
         3.1. salt (str)
+        3.2. register_callid (int)
 
    4. Functions
 
@@ -84,6 +87,7 @@ Chapter 1. Admin Guide
 3. Parameters
 
    3.1. salt (str)
+   3.2. register_callid (int)
 
 3.1. salt (str)
 
@@ -96,11 +100,28 @@ Chapter 1. Admin Guide
 
    Default value is "..." (see code).
 
-   Example 1.1. Set interval parameter
+   Example 1.1. Set salt parameter
 ...
 modparam("crypto", "salt", "l0Bh2M8a")
 ...
 
+3.2. register_callid (int)
+
+   Set it to 1 in order to register a callback to core for generation of
+   callid values for requests generated by Kamailio tm module.
+
+   This callid genrator uses libssl random and hashing functions for
+   generating RFC 4122 version 4 UUID with high quality entropy. It is
+   useful when wanting to have new callids that cannot be predicted from
+   previous values.
+
+   Default value is 0.
+
+   Example 1.2. Set register_callid parameter
+...
+modparam("crypto", "register_callid", 1)
+...
+
 4. Functions
 
    4.1. crypto_aes_encrypt(text, key, res)
@@ -115,7 +136,7 @@ modparam("crypto", "salt", "l0Bh2M8a")
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.2. crypto_aes_encrypt usage
+   Example 1.3. crypto_aes_encrypt usage
 ...
 crypto_aes_encrypt("$rb", "my-secret-key", "$var(encrypted)");
 ...
@@ -129,7 +150,7 @@ crypto_aes_encrypt("$rb", "my-secret-key", "$var(encrypted)");
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.3. crypto_aes_decrypt usage
+   Example 1.4. crypto_aes_decrypt usage
 ...
 crypto_aes_decrypt("$var(encrypted)", "my-secret-key", "$var(text)");
 ...

+ 27 - 1
modules/crypto/doc/crypto_admin.xml

@@ -76,11 +76,37 @@
 		</emphasis>
 		</para>
 		<example>
-		<title>Set <varname>interval</varname> parameter</title>
+		<title>Set <varname>salt</varname> parameter</title>
 		<programlisting format="linespecific">
 ...
 modparam("crypto", "salt", "l0Bh2M8a")
 ...
+</programlisting>
+		</example>
+	</section>
+	<section id="crypto.p.register_callid">
+		<title><varname>register_callid</varname> (int)</title>
+		<para>
+			Set it to 1 in order to register a callback to core for generation
+			of callid values for requests generated by &kamailio; tm module.
+		</para>
+		<para>
+			This callid genrator uses libssl random and hashing functions
+			for generating RFC 4122 version 4 UUID with high quality entropy.
+			It is useful when wanting to have new callids that cannot be
+			predicted from previous values.
+		</para>
+		<para>
+		<emphasis>
+			Default value is 0.
+		</emphasis>
+		</para>
+		<example>
+		<title>Set <varname>register_callid</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("crypto", "register_callid", 1)
+...
 </programlisting>
 		</example>
 	</section>