README 3.8 KB

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