| 1 |
oracle Module |
| 2 |
|
| 3 |
Iouri Kharon |
| 4 |
|
| 5 |
<[email protected]> |
| 6 |
|
| 7 |
Yury Skandarov |
| 8 |
|
| 9 |
<[email protected]> |
| 10 |
|
| 11 |
Iakov Kharon |
| 12 |
|
| 13 |
<[email protected]> |
| 14 |
|
| 15 |
Edited by |
| 16 |
|
| 17 |
Iouri Kharon |
| 18 |
|
| 19 |
<[email protected]> |
| 20 |
|
| 21 |
Copyright © 2007,2008 TRUNK MOBILE, INC. |
| 22 |
__________________________________________________________________ |
| 23 |
|
| 24 |
Table of Contents |
| 25 |
|
| 26 |
1. User's Guide |
| 27 |
|
| 28 |
1. Overview |
| 29 |
2. Dependencies |
| 30 |
|
| 31 |
2.1. Kamailio Modules |
| 32 |
2.2. External Libraries or Applications |
| 33 |
|
| 34 |
3. Parameters |
| 35 |
|
| 36 |
3.1. timeout (fixedpoint) |
| 37 |
3.2. reconnect (fixedpoint) |
| 38 |
|
| 39 |
4. Functions |
| 40 |
5. Installation |
| 41 |
6. Utility kamailio_orasel |
| 42 |
|
| 43 |
List of Examples |
| 44 |
|
| 45 |
1.1. Set timeout parameter |
| 46 |
1.2. Disable asynchronous mode |
| 47 |
1.3. Set reconnect parameter |
| 48 |
|
| 49 |
Chapter 1. User's Guide |
| 50 |
|
| 51 |
Table of Contents |
| 52 |
|
| 53 |
1. Overview |
| 54 |
2. Dependencies |
| 55 |
|
| 56 |
2.1. Kamailio Modules |
| 57 |
2.2. External Libraries or Applications |
| 58 |
|
| 59 |
3. Parameters |
| 60 |
|
| 61 |
3.1. timeout (fixedpoint) |
| 62 |
3.2. reconnect (fixedpoint) |
| 63 |
|
| 64 |
4. Functions |
| 65 |
5. Installation |
| 66 |
6. Utility kamailio_orasel |
| 67 |
|
| 68 |
1. Overview |
| 69 |
|
| 70 |
This is a module which provides Oracle connectivity for Kamailio. It |
| 71 |
implements the DB API defined in Kamailio. If you want to use the |
| 72 |
nathelper module, or any other modules that calls the get_all_ucontacts |
| 73 |
API export from usrloc, then you need to set the DORACLE_USRLOC define |
| 74 |
in the Makefile.defs file before compilation. |
| 75 |
|
| 76 |
2. Dependencies |
| 77 |
|
| 78 |
2.1. Kamailio Modules |
| 79 |
2.2. External Libraries or Applications |
| 80 |
|
| 81 |
2.1. Kamailio Modules |
| 82 |
|
| 83 |
The following modules must be loaded before this module: |
| 84 |
* No dependencies on other Kamailio modules. |
| 85 |
|
| 86 |
2.2. External Libraries or Applications |
| 87 |
|
| 88 |
The following libraries or applications must be installed before |
| 89 |
running Kamailio with this module loaded: |
| 90 |
* instantclient-sdk-10.2.0.3 - the development headers and libraries |
| 91 |
of OCI. |
| 92 |
|
| 93 |
3. Parameters |
| 94 |
|
| 95 |
3.1. timeout (fixedpoint) |
| 96 |
3.2. reconnect (fixedpoint) |
| 97 |
|
| 98 |
3.1. timeout (fixedpoint) |
| 99 |
|
| 100 |
Timeout value for any operation with BD. |
| 101 |
|
| 102 |
Possible values is from 0.1 to 10.0 seconds. |
| 103 |
|
| 104 |
Default value is 3.0 (3 second). |
| 105 |
|
| 106 |
If the value of timeout parameter is set to 0, the module uses |
| 107 |
synchronous mode (without timeout). |
| 108 |
|
| 109 |
Example 1.1. Set timeout parameter |
| 110 |
... |
| 111 |
modparam("db_oracle", "timeout", 1.5) |
| 112 |
... |
| 113 |
|
| 114 |
Example 1.2. Disable asynchronous mode |
| 115 |
... |
| 116 |
modparam("db_oracle", "timeout", 0) |
| 117 |
... |
| 118 |
|
| 119 |
3.2. reconnect (fixedpoint) |
| 120 |
|
| 121 |
Timeout value for connect (create session) operation. |
| 122 |
|
| 123 |
Possible values is from 0.1 to 10.0 seconds. |
| 124 |
|
| 125 |
Default value is 0.2 (200 milliseconds). |
| 126 |
|
| 127 |
Example 1.3. Set reconnect parameter |
| 128 |
... |
| 129 |
modparam("db_oracle", "reconnect", 0.5) |
| 130 |
... |
| 131 |
|
| 132 |
4. Functions |
| 133 |
|
| 134 |
No function exported to be used from configuration file. |
| 135 |
|
| 136 |
5. Installation |
| 137 |
|
| 138 |
Because it depends on an external library, the oracle module is not |
| 139 |
compiled and installed by default. You can use one of the next options. |
| 140 |
* - edit the "Makefile" and remove "db_oracle" from |
| 141 |
"excluded_modules" list. Then follow the standard procedure to |
| 142 |
install Kamailio: "make all; make install". |
| 143 |
* - from command line use: 'make all include_modules="db_oracle"; |
| 144 |
make install include_modules="db_oracle"'. |
| 145 |
|
| 146 |
6. Utility kamailio_orasel |
| 147 |
|
| 148 |
For working with kamctl script, should be able to print the 'query' |
| 149 |
results to the terminal in a user-readable form. The standard |
| 150 |
command-line Oracle client (sqlplus) is not quite suitable for this, as |
| 151 |
it cannot align row width to real (received) data's (it always prints a |
| 152 |
cell width as described in the db scheme). This problem has been solved |
| 153 |
by inclusion the utility kamailio_oracle, which formats printing |
| 154 |
approximately in the same way as the 'mysql' client utility. In |
| 155 |
addition, this utility known about the "agreements and types" in DB |
| 156 |
that are used in Kamailio for the work with Oracle and formats printing |
| 157 |
taking these into account. |