|
@@ -21,7 +21,7 @@ Christian Schlatter
|
|
|
|
|
|
1.2. Dependencies
|
|
|
|
|
|
- 1.2.1. OpenSER Modules
|
|
|
+ 1.2.1. Kamailio Modules
|
|
|
1.2.2. External Libraries or Applications
|
|
|
|
|
|
1.3. LDAP Configuration File
|
|
@@ -100,9 +100,9 @@ Chapter 1. Admin Guide
|
|
|
1.1. Overview
|
|
|
|
|
|
The LDAP module implements an LDAP search interface for
|
|
|
- OpenSER. It exports script functions to perform an LDAP search
|
|
|
- operation and to store the search results as OpenSER AVPs. This
|
|
|
- allows for using LDAP directory data in the OpenSER SIP message
|
|
|
+ Kamailio. It exports script functions to perform an LDAP search
|
|
|
+ operation and to store the search results as Kamailio AVPs. This
|
|
|
+ allows for using LDAP directory data in the Kamailio SIP message
|
|
|
routing script.
|
|
|
|
|
|
The following features are offered by the LDAP module:
|
|
@@ -113,19 +113,19 @@ Chapter 1. Admin Guide
|
|
|
* LDAP server failover and automatic reconnect
|
|
|
* Configurable LDAP connection and bind timeouts
|
|
|
* Module API for LDAP search operations that can be used by
|
|
|
- other OpenSER modules
|
|
|
+ other Kamailio modules
|
|
|
|
|
|
The module implementation makes use of the open source OpenLDAP
|
|
|
library available on most UNIX/Linux platforms. Besides LDAP
|
|
|
server failover and automatic reconnect, this module can handle
|
|
|
multiple LDAP sessions concurrently allowing to access data
|
|
|
- stored on different LDAP servers. Each OpenSER worker process
|
|
|
+ stored on different LDAP servers. Each Kamailio worker process
|
|
|
maintains one LDAP TCP connection per configured LDAP server.
|
|
|
This enables parallel execution of LDAP requests and offloads
|
|
|
LDAP concurrency control to the LDAP server(s).
|
|
|
|
|
|
An LDAP search module API is provided that can be used by other
|
|
|
- OpenSER modules. A module using this API does not have to
|
|
|
+ Kamailio modules. A module using this API does not have to
|
|
|
implement LDAP connection management and configuration, while
|
|
|
still having access to the full OpenLDAP API for searching and
|
|
|
result handling.
|
|
@@ -134,7 +134,7 @@ Chapter 1. Admin Guide
|
|
|
access they are a good choice to store SIP provisioning data.
|
|
|
Performance tests have shown that this module achieves lower
|
|
|
data access times and higher call rates than other database
|
|
|
- modules like e.g. the OpenSER MYSQL module.
|
|
|
+ modules like e.g. the Kamailio MYSQL module.
|
|
|
|
|
|
1.1.1. Usage Basics
|
|
|
|
|
@@ -144,7 +144,7 @@ Chapter 1. Admin Guide
|
|
|
access parameters like server hostname or connection timeouts.
|
|
|
Normally only a single LDAP session will be used unless there
|
|
|
is a need to access more than one LDAP server. The LDAP session
|
|
|
- name will then be used in the OpenSER configuration script to
|
|
|
+ name will then be used in the Kamailio configuration script to
|
|
|
refer to a specific LDAP session.
|
|
|
|
|
|
The ldap_search function (Section 1.5.1,
|
|
@@ -168,7 +168,7 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
All ldap_result* functions do always access the LDAP result set
|
|
|
from the last ldap_search call. This should be kept in mind
|
|
|
- when calling ldap_search more than once in the OpenSER
|
|
|
+ when calling ldap_search more than once in the Kamailio
|
|
|
configuration script.
|
|
|
|
|
|
1.1.2. LDAP URLs
|
|
@@ -231,16 +231,16 @@ Note
|
|
|
|
|
|
1.2. Dependencies
|
|
|
|
|
|
-1.2.1. OpenSER Modules
|
|
|
+1.2.1. Kamailio Modules
|
|
|
|
|
|
The module depends on the following modules (the listed modules
|
|
|
must be loaded before this module):
|
|
|
- * No dependencies on other OpenSER modules.
|
|
|
+ * No dependencies on other Kamailio modules.
|
|
|
|
|
|
1.2.2. External Libraries or Applications
|
|
|
|
|
|
The following libraries or applications must be installed
|
|
|
- before running OpenSER with this module loaded:
|
|
|
+ before running Kamailio with this module loaded:
|
|
|
* OpenLDAP library (libldap) v2.1 or greater, libldap header
|
|
|
files (libldap-dev) are needed for compilation
|
|
|
|
|
@@ -266,7 +266,7 @@ key = value ; comment
|
|
|
comments.
|
|
|
|
|
|
Each section describes one LDAP session that can be referred to
|
|
|
- in the OpenSER configuration script. Using the section name as
|
|
|
+ in the Kamailio configuration script. Using the section name as
|
|
|
the host part of an LDAP URL tells the module to use the LDAP
|
|
|
session specified in the respective section. An example LDAP
|
|
|
session specification looks like:
|
|
@@ -391,10 +391,10 @@ ldap_client_bind_timeout = 500
|
|
|
|
|
|
Full path to LDAP configuration file.
|
|
|
|
|
|
- Default value: /usr/local/etc/openser/ldap.cfg
|
|
|
+ Default value: /usr/local/etc/kamailio/ldap.cfg
|
|
|
|
|
|
Example 1.8. config_file parameter usage
|
|
|
-modparam("ldap", "config_file", "/etc/openser/ldap.ini")
|
|
|
+modparam("ldap", "config_file", "/etc/kamailio/ldap.ini")
|
|
|
|
|
|
1.5. Exported Functions
|
|
|
|
|
@@ -404,7 +404,7 @@ modparam("ldap", "config_file", "/etc/openser/ldap.ini")
|
|
|
stores result internally for later retrieval by ldap_result*
|
|
|
functions. If one ore more LDAP entries are found the function
|
|
|
returns the number of found entries which evaluates to TRUE in
|
|
|
- the OpenSER configuration script. It returns -1 (FALSE) in case
|
|
|
+ the Kamailio configuration script. It returns -1 (FALSE) in case
|
|
|
no LDAP entry was found, and -2 (FALSE) if an internal error
|
|
|
like e.g. an LDAP error occurred.
|
|
|
|
|
@@ -416,7 +416,7 @@ modparam("ldap", "config_file", "/etc/openser/ldap.ini")
|
|
|
URL format). The hostport part must be one of the LDAP
|
|
|
session names declared in the LDAP configuration script.
|
|
|
|
|
|
- OpenSER pseudo variables and AVPs included in ldap_url
|
|
|
+ Kamailio pseudo variables and AVPs included in ldap_url
|
|
|
do get substituted with their value.
|
|
|
|
|
|
Example 1.9. Example Usage of ldap_url
|
|
@@ -756,7 +756,7 @@ Chapter 2. Developer Guide
|
|
|
|
|
|
2.1. Overview
|
|
|
|
|
|
- The LDAP module API can be used by other OpenSER modules to
|
|
|
+ The LDAP module API can be used by other Kamailio modules to
|
|
|
implement LDAP search functionality. This frees the module
|
|
|
implementer from having to care about LDAP connection
|
|
|
management and configuration.
|
|
@@ -1021,7 +1021,7 @@ typedef int (*ldap_rfc4515_escape_t)(str *sin, str *sout, int url_encode
|
|
|
Returns the OpenLDAP LDAP handle for a specific LDAP session.
|
|
|
This allows a module implementor to use the OpenLDAP API
|
|
|
functions directly, instead of using the API functions exported
|
|
|
- by the OpenSER LDAP module. The LDAP structure is defined in
|
|
|
+ by the Kamailio LDAP module. The LDAP structure is defined in
|
|
|
OpenLDAP's ldap.h, which has to be included.
|
|
|
typedef int (*get_ldap_handle_t)(char* _lds_name, LDAP** _ldap_handle);
|
|
|
|