Browse code

app_perl: perl module moved and renamed to modules/app_perl

- same naming pattern as for the other embedded interpreters

Daniel-Constantin Mierla authored on 20/01/2013 11:47:08
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,1017 +0,0 @@
1
-<?xml version="1.0" encoding='ISO-8859-1'?>
2
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3
-"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4
-
5
-<!-- Include general documentation entities -->
6
-<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
7
-%docentities;
8
-
9
-]>
10
-<!--
11
-     Generated by Pod::DocBook v1.2, using:
12
-       Digest::MD5 v2.36
13
-       Pod::Parser v1.32
14
-       Pod::ParseLink v1.06
15
-       Text::ParseWords v3.24
16
-       Text::Wrap v2005.082401
17
-<chapter><title>Kamailio Perl API</title>
18
-  <section id="ID-d83a4c83b0cd455aef9602128b87c323"><title>Kamailio</title>
19
-    <para>
20
-      This module provides access to a limited number of Kamailio core
21
-      functions. As the most interesting functions deal with SIP messages,
22
-      they are located in the Kamailio::Message class below.
23
-    </para>
24
-    <section id="ID-3ae476990b7b1fe73d972e68eb52f93c"><title>log(level,message)</title>
25
-      <para>
26
-	Logs the message with Kamailio's logging facility. The logging level
27
-	is one of the following:
28
-      </para>
29
-      <screen><![CDATA[* L_ALERT
30
-* L_CRIT
31
-* L_ERR
32
-* L_WARN
33
-* L_NOTICE
34
-* L_INFO
35
-* L_DBG]]></screen>
36
-      <para>
37
-	Please note that this method is <emphasis
38
-	role="italic">NOT</emphasis> automatically exported, as it collides
39
-	with the perl function log (which calculates the logarithm). Either
40
-	explicitly import the function (via <literal
41
-	role="code"><![CDATA[use Kamailio qw ( log );]]></literal>), or call
42
-	it with its full name:
43
-      </para>
44
-      <screen><![CDATA[Kamailio::log(L_INFO, "foobar");]]></screen>
45
-    </section>
46
-  </section>
47
-  <section id="ID-949656abaac653354242d1d0e9b418be"><title>Kamailio::Message</title>
48
-    <para>
49
-      This package provides access functions for an Kamailio <literal
50
-      role="code"><![CDATA[sip_msg]]></literal> structure and its
51
-      sub-components. Through its means it is possible to fully configure
52
-      alternative routing decisions.
53
-    </para>
54
-    <section id="ID-4462b43922a45955436db6a77eff1274"><title>getType()</title>
55
-      <para>
56
-	Returns one of the constants SIP_REQUEST, SIP_REPLY, SIP_INVALID
57
-	stating the type of the current message.
58
-      </para>
59
-    </section>
60
-    <section id="ID-48eb6f3897940320d3dca81eee99e60f"><title>getStatus()</title>
61
-      <para>
62
-	Returns the status code of the current Reply message. This function
63
-	is invalid in Request context!
64
-      </para>
65
-    </section>
66
-    <section id="ID-06ad673da0ada52b0d53a16dc5edf3c7"><title>getReason()</title>
67
-      <para>
68
-	Returns the reason of the current Reply message. This function is
69
-	invalid in Request context!
70
-      </para>
71
-    </section>
72
-    <section id="ID-defa3c4593f2232a246f800880c3db8d"><title>getVersion()</title>
73
-      <para>
74
-	Returns the version string of the current SIP message.
75
-      </para>
76
-    </section>
77
-    <section id="ID-40655f47473dfd0b09ab79f021379661"><title>getRURI()</title>
78
-      <para>
79
-	This function returns the recipient URI of the present SIP message:
80
-      </para>
81
-      <para>
82
-	<literal role="code"><![CDATA[my $ruri =
83
-	$m->getRURI();]]></literal>
84
-      </para>
85
-      <para>
86
-	getRURI returns a string. See <link
87
-	linkend="ID-f20c57aaa92a757d7152aa0479ee1fc0"><quote>getParsedRURI()</quote></link>
88
-	below how to receive a parsed structure.
89
-      </para>
90
-      <para>
91
-	This function is valid in request messages only.
92
-      </para>
93
-    </section>
94
-    <section id="ID-09d760cb43aa35ee3338a63959e1ad52"><title>getMethod()</title>
95
-      <para>
96
-	Returns the current method, such as <literal
97
-	role="code"><![CDATA[INVITE]]></literal>, <literal
98
-	role="code"><![CDATA[REGISTER]]></literal>, <literal
99
-	role="code"><![CDATA[ACK]]></literal> and so on.
100
-      </para>
101
-      <para>
102
-	<literal role="code"><![CDATA[my $method =
103
-	$m->getMethod();]]></literal>
104
-      </para>
105
-      <para>
106
-	This function is valid in request messages only.
107
-      </para>
108
-    </section>
109
-    <section id="ID-29a7bfa2b533d46b900690c15e89dac0"><title>getFullHeader()</title>
110
-      <para>
111
-	Returns the full message header as present in the current message.
112
-	You might use this header to further work with it with your
113
-	favorite MIME package.
114
-      </para>
115
-      <para>
116
-	<literal role="code"><![CDATA[my $hdr =
117
-	$m->getFullHeader();]]></literal>
118
-      </para>
119
-    </section>
120
-    <section id="ID-d4227612556f15885224f8d7c9baa63d"><title>getBody()</title>
121
-      <para>
122
-	Returns the message body.
123
-      </para>
124
-    </section>
125
-    <section id="ID-5c55b75dca8e197bf8d4e9195f3fc78b"><title>getMessage()</title>
126
-      <para>
127
-	Returns the whole message including headers and body.
128
-      </para>
129
-    </section>
130
-    <section id="ID-2cd2368ec9da09ded819e54da7ed7e56"><title>getHeader(name)</title>
131
-      <para>
132
-	Returns the body of the first message header with this name.
133
-      </para>
134
-      <para>
135
-	<literal role="code"><![CDATA[print
136
-	$m->getHeader("To");]]></literal>
137
-      </para>
138
-      <para>
139
-	<emphasis role="bold"><literal role="code"><![CDATA["John"
140
-	<sip:john@doe.example>]]></literal></emphasis>
141
-      </para>
142
-    </section>
143
-    <section id="ID-e6f4b718fa39a84855f41d5048abfd17"><title>getHeaderNames()</title>
144
-      <para>
145
-	Returns an array of all header names. Duplicates possible!
146
-      </para>
147
-    </section>
148
-    <section id="ID-7b0efd72c8ec89bc43dad940590b40c6"><title>moduleFunction(func,string1,string2)</title>
149
-      <para>
150
-	Search for an arbitrary function in module exports and call it with
151
-	the parameters self, string1, string2.
152
-      </para>
153
-      <para>
154
-	<literal role="code"><![CDATA[string1]]></literal> and/or <literal
155
-	role="code"><![CDATA[string2]]></literal> may be omitted.
156
-      </para>
157
-      <para>
158
-	As this function provides access to the functions that are exported
159
-	to the Kamailio configuration file, it is autoloaded for unknown
160
-	functions. Instead of writing
161
-      </para>
162
-      <screen><![CDATA[$m->moduleFunction("sl_send_reply", "500", "Internal Error");
163
-$m->moduleFunction("xlog", "L_INFO", "foo");]]></screen>
164
-      <para>
165
-	you may as well write
166
-      </para>
167
-      <screen><![CDATA[$m->sl_send_reply("500", "Internal Error");
168
-$m->xlog("L_INFO", "foo");]]></screen>
169
-      <para>
170
-	WARNING
171
-      </para>
172
-      <para>
173
-	In Kamailio 1.2, only a limited subset of module functions is
174
-	available. This restriction will be removed in a later version.
175
-      </para>
176
-      <para>
177
-	Here is a list of functions that are expected to be working (not
178
-	claiming completeness):
179
-      </para>
180
-      <screen><![CDATA[* alias_db_lookup
181
-* consume_credentials
182
-* is_rpid_user_e164
183
-* append_rpid_hf
184
-* bind_auth
185
-* avp_print
186
-* cpl_process_register
187
-* cpl_process_register_norpl
188
-* load_dlg
189
-* ds_next_dst
190
-* ds_next_domain
191
-* ds_mark_dst
192
-* ds_mark_dst
193
-* is_from_local
194
-* is_uri_host_local
195
-* dp_can_connect
196
-* dp_apply_policy
197
-* enum_query (without parameters)
198
-* enum_fquery (without parameters)
199
-* is_from_user_enum (without parameters)
200
-* i_enum_query (without parameters)
201
-* imc_manager
202
-* jab_* (all functions from the jabber module)
203
-* load_gws (without parameters)
204
-* next_gw
205
-* from_gw (without parameters)
206
-* to_gw (without parameters)
207
-* load_contacts
208
-* next_contacts
209
-* sdp_mangle_ip
210
-* sdp_mangle_port
211
-* encode_contact
212
-* decode_contact
213
-* decode_contact_header
214
-* fix_contact
215
-* use_media_proxy
216
-* end_media_session
217
-* m_store
218
-* m_dump
219
-* fix_nated_contact
220
-* unforce_rtp_proxy
221
-* force_rtp_proxy
222
-* fix_nated_register
223
-* add_rcv_param
224
-* options_reply
225
-* checkospheader
226
-* validateospheader
227
-* requestosprouting
228
-* checkosproute
229
-* prepareosproute
230
-* prepareallosproutes
231
-* checkcallingtranslation
232
-* reportospusage
233
-* mangle_pidf
234
-* mangle_message_cpim
235
-* add_path (without parameters)
236
-* add_path_received (without parameters)
237
-* prefix2domain
238
-* allow_routing (without parameters)
239
-* allow_trusted
240
-* pike_check_req
241
-* handle_publish
242
-* handle_subscribe
243
-* stored_pres_info
244
-* bind_pua
245
-* send_publish
246
-* send_subscribe
247
-* pua_set_publish
248
-* loose_route
249
-* record_route
250
-* load_rr
251
-* sip_trace
252
-* sl_reply_error
253
-* sms_send_msg
254
-* sd_lookup
255
-* sstCheckMin
256
-* append_time
257
-* has_body (without parameters)
258
-* is_peer_verified
259
-* t_newtran
260
-* t_release
261
-* t_relay (without parameters)
262
-* t_flush_flags
263
-* t_check_trans
264
-* t_was_cancelled
265
-* t_load_contacts
266
-* t_next_contacts
267
-* uac_restore_from
268
-* uac_auth
269
-* has_totag
270
-* tel2sip
271
-* check_to
272
-* check_from
273
-* radius_does_uri_exist
274
-* ul_* (All functions exported by the usrloc module for user access)
275
-* xmpp_send_message]]></screen>
276
-    </section>
277
-    <section id="ID-9fb36151aa2a86585e66dc19227b7d92"><title>log(level,message) (deprecated type)</title>
278
-      <para>
279
-	Logs the message with Kamailio's logging facility. The logging level
280
-	is one of the following:
281
-      </para>
282
-      <screen><![CDATA[* L_ALERT
283
-* L_CRIT
284
-* L_ERR
285
-* L_WARN
286
-* L_NOTICE
287
-* L_INFO
288
-* L_DBG]]></screen>
289
-      <para>
290
-	The logging function should be accessed via the Kamailio module
291
-	variant. This one, located in Kamailio::Message, is deprecated.
292
-      </para>
293
-    </section>
294
-    <section id="ID-b6b5403d6a2b667316e7ce7ddd0937d0"><title>rewrite_ruri(newruri)</title>
295
-      <para>
296
-	Sets a new destination (recipient) URI. Useful for rerouting the
297
-	current message/call.
298
-      </para>
299
-      <screen><![CDATA[if ($m->getRURI() =~ m/\@somedomain.net/) {
300
-  $m->rewrite_ruri("sip:dispatcher\@organization.net");
301
-}]]></screen>
302
-    </section>
303
-    <section id="ID-43bdd45f2267be3165993d728ae6ac58"><title>setFlag(flag)</title>
304
-      <para>
305
-	Sets a message flag. The constants as known from the C API may be
306
-	used, when Constants.pm is included.
307
-      </para>
308
-    </section>
309
-    <section id="ID-d3f836fca6d5be320332751cb544a50b"><title>resetFlag(flag)</title>
310
-      <para>
311
-	Resets a message flag.
312
-      </para>
313
-    </section>
314
-    <section id="ID-9df30424b7e93814c7928cf5899a12cc"><title>isFlagSet(flag)</title>
315
-      <para>
316
-	Returns whether a message flag is set or not.
317
-      </para>
318
-    </section>
319
-    <section id="ID-cfb8c8675a6620394b21ab786379acfa"><title>pseudoVar(string)</title>
320
-      <para>
321
-	Returns a new string where all pseudo variables are substituted by
322
-	their values. Can be used to receive the values of single
323
-	variables, too.
324
-      </para>
325
-      <para>
326
-	<emphasis role="bold">Please remember that you need to escape the
327
-	'$' sign in perl strings!</emphasis>
328
-      </para>
329
-    </section>
330
-    <section id="ID-098e67bc760ef445343eb9e8f93ece8b"><title>append_branch(branch,qval)</title>
331
-      <para>
332
-	Append a branch to current message.
333
-      </para>
334
-    </section>
335
-    <section id="ID-f20c57aaa92a757d7152aa0479ee1fc0"><title>getParsedRURI()</title>
336
-      <para>
337
-	Returns the current destination URI as an Kamailio::URI object.
338
-      </para>
339
-    </section>
340
-  </section>
341
-  <section id="ID-ea7b3e8a4dc6ddf7af0e02f7cec8eef1"><title>Kamailio::URI</title>
342
-    <para>
343
-      This package provides functions for access to sip_uri structures.
344
-    </para>
345
-    <section id="ID-f0b0fe573c97823c7db7e6d2f763eecd"><title>user()</title>
346
-      <para>
347
-	Returns the user part of this URI.
348
-      </para>
349
-    </section>
350
-    <section id="ID-13f823f4d5d264262256ce6c13ebda7f"><title>host()</title>
351
-      <para>
352
-	Returns the host part of this URI.
353
-      </para>
354
-    </section>
355
-    <section id="ID-f16f4d3590aeadbb89be6381c63d31ba"><title>passwd()</title>
356
-      <para>
357
-	Returns the passwd part of this URI.
358
-      </para>
359
-    </section>
360
-    <section id="ID-0e78ab3771467ade60bb813acff96e1f"><title>port()</title>
361
-      <para>
362
-	Returns the port part of this URI.
363
-      </para>
364
-    </section>
365
-    <section id="ID-f09a07f5c225a4cdc0c8cf1b562feca5"><title>params()</title>
366
-      <para>
367
-	Returns the params part of this URI.
368
-      </para>
369
-    </section>
370
-    <section id="ID-6ac4960ecbb77b9b208182e39c3fced6"><title>headers()</title>
371
-      <para>
372
-	Returns the headers part of this URI.
373
-      </para>
374
-    </section>
375
-    <section id="ID-edbeee75601887c5522ec606864fcf06"><title>transport()</title>
376
-      <para>
377
-	Returns the transport part of this URI.
378
-      </para>
379
-    </section>
380
-    <section id="ID-9b062529593a90fa98b8fdaf147d9625"><title>ttl()</title>
381
-      <para>
382
-	Returns the ttl part of this URI.
383
-      </para>
384
-    </section>
385
-    <section id="ID-af281c7d5fa29dfa3d059c93e2ece82f"><title>user_param()</title>
386
-      <para>
387
-	Returns the user_param part of this URI.
388
-      </para>
389
-    </section>
390
-    <section id="ID-cc3ad600892aefceee9bb7f7d083b9eb"><title>maddr()</title>
391
-      <para>
392
-	Returns the maddr part of this URI.
393
-      </para>
394
-    </section>
395
-    <section id="ID-bcde93cc9055b03c23ac61f4f7aba922"><title>method()</title>
396
-      <para>
397
-	Returns the method part of this URI.
398
-      </para>
399
-    </section>
400
-    <section id="ID-ffda2446aa820304039c53eaca5c1383"><title>lr()</title>
401
-      <para>
402
-	Returns the lr part of this URI.
403
-      </para>
404
-    </section>
405
-    <section id="ID-e07722a580a9e670d428835b7efacfaf"><title>r2()</title>
406
-      <para>
407
-	Returns the r2 part of this URI.
408
-      </para>
409
-    </section>
410
-    <section id="ID-20d6cdc41465025baceba8056215ac58"><title>transport_val()</title>
411
-      <para>
412
-	Returns the transport_val part of this URI.
413
-      </para>
414
-    </section>
415
-    <section id="ID-6643223dbdb425407fe9801fd4d2fa5b"><title>ttl_val()</title>
416
-      <para>
417
-	Returns the ttl_val part of this URI.
418
-      </para>
419
-    </section>
420
-    <section id="ID-aa87e27dd0cce4de62a0f32a7ecb7a33"><title>user_param_val()</title>
421
-      <para>
422
-	Returns the user_param_val part of this URI.
423
-      </para>
424
-    </section>
425
-    <section id="ID-85b278e13c1c6169d612921b32a42c3a"><title>maddr_val()</title>
426
-      <para>
427
-	Returns the maddr_val part of this URI.
428
-      </para>
429
-    </section>
430
-    <section id="ID-64d75002d2db35d7a66847e0c92f37a9"><title>method_val()</title>
431
-      <para>
432
-	Returns the method_val part of this URI.
433
-      </para>
434
-    </section>
435
-    <section id="ID-cdb1f6d4201cd9b6ee19e6f58236a900"><title>lr_val()</title>
436
-      <para>
437
-	Returns the lr_val part of this URI.
438
-      </para>
439
-    </section>
440
-    <section id="ID-af30e585b8decaf3e377375210e977b6"><title>r2_val()</title>
441
-      <para>
442
-	Returns the r2_val part of this URI.
443
-      </para>
444
-    </section>
445
-  </section>
446
-  <section id="ID-f092a1ce520e2e575c41702289adf85e"><title>Kamailio::AVP</title>
447
-    <para>
448
-      This package provides access functions for Kamailio's AVPs. These
449
-      variables can be created, evaluated, modified and removed through
450
-      this package.
451
-    </para>
452
-    <para>
453
-      Please note that these functions do NOT support the notation used in
454
-      the configuration file, but directly work on strings or numbers. See
455
-      documentation of add method below.
456
-    </para>
457
-    <section id="ID-d4453222c49e08dc556c25a6586a00bc"><title>add(name,val)</title>
458
-      <para>
459
-	Add an AVP.
460
-      </para>
461
-      <para>
462
-	Add an Kamailio AVP to its environment. name and val may both be
463
-	integers or strings; this function will try to guess what is
464
-	correct. Please note that
465
-      </para>
466
-      <screen><![CDATA[Kamailio::AVP::add("10", "10")]]></screen>
467
-      <para>
468
-	is something different than
469
-      </para>
470
-      <screen><![CDATA[Kamailio::AVP::add(10, 10)]]></screen>
471
-      <para>
472
-	due to this evaluation: The first will create _string_ AVPs with
473
-	the name 10, while the latter will create a numerical AVP.
474
-      </para>
475
-      <para>
476
-	You can modify/overwrite AVPs with this function.
477
-      </para>
478
-    </section>
479
-    <section id="ID-ad3f402b1c78426a3a1de4d0c1d9ad6c"><title>get(name)</title>
480
-      <para>
481
-	get an Kamailio AVP:
482
-      </para>
483
-      <screen><![CDATA[my $numavp = Kamailio::AVP::get(5);
484
-my $stravp = Kamailio::AVP::get("foo");]]></screen>
485
-    </section>
486
-    <section id="ID-15db533161502fc4591ec9acdd990ef4"><title>destroy(name)</title>
487
-      <para>
488
-	Destroy an AVP.
489
-      </para>
490
-      <screen><![CDATA[Kamailio::AVP::destroy(5);
491
-Kamailio::AVP::destroy("foo");]]></screen>
492
-    </section>
493
-  </section>
494
-  <section id="ID-b2dcbd51ac3a3e6208edd5e4f6a5ef63"><title>Kamailio::Utils::PhoneNumbers</title>
495
-    <para>
496
-      Kamailio::Utils::PhoneNumbers - Functions for canonical forms of phone
497
-      numbers.
498
-    </para>
499
-    <screen><![CDATA[use Kamailio::Utils::PhoneNumbers;
500
-
501
-my $phonenumbers = new Kamailio::Utils::PhoneNumbers(
502
-     publicAccessPrefix => "0",
503
-     internationalPrefix => "+",
504
-     longDistancePrefix => "0",
505
-     areaCode => "761",
506
-     pbxCode => "456842",
507
-     countryCode => "49"
508
-   );
509
-
510
-$canonical = $phonenumbers->canonicalForm("07612034567");
511
-$number    = $phonenumbers->dialNumber("+497612034567");]]></screen>
512
-    <para>
513
-      A telphone number starting with a plus sign and containing all dial
514
-      prefixes is in canonical form. This is usally not the number to dial
515
-      at any location, so the dialing number depends on the context of the
516
-      user/system.
517
-    </para>
518
-    <para>
519
-      The idea to canonicalize numbers were taken from hylafax.
520
-    </para>
521
-    <para>
522
-      Example: +497614514829 is the canonical form of my phone number, 829
523
-      is the number to dial at Pyramid, 4514829 is the dialing number from
524
-      Freiburg are and so on.
525
-    </para>
526
-    <para>
527
-      To canonicalize any number, we strip off any dial prefix we find and
528
-      then add the prefixes for the location. So, when the user enters the
529
-      number 04514829 in context pyramid, we remove the publicAccessPrefix
530
-      (at Pyramid this is 0) and the  pbxPrefix (4514 here). The result is
531
-      829. Then we add all the general dial prefixes - 49 (country) 761
532
-      (area) 4514 (pbx) and 829, the number itself =&gt; +497614514829
533
-    </para>
534
-    <para>
535
-      To get the dialing number from a canonical phone number, we substract
536
-      all general prefixes until we have something
537
-    </para>
538
-    <para>
539
-      As said before, the interpretation of a phone number depends on the
540
-      context of the location. For the functions in this package, the
541
-      context is created through the <literal
542
-      role="code"><![CDATA[new]]></literal> operator.
543
-    </para>
544
-    <para>
545
-      The following fields should be set:
546
-    </para>
547
-    <screen><![CDATA['longDistancePrefix' 
548
-'areaCode'
549
-'pbxCode' 
550
-'internationalPrefix'
551
-'publicAccessPrefix'
552
-'countryCode']]></screen>
553
-    <para>
554
-      This module exports the following functions when <literal
555
-      role="code"><![CDATA[use]]></literal>ed:
556
-    </para>
557
-    <section id="ID-bd49dfdfc2284e87abd95fbce2d63cbd"><title>new(publicAccessPrefix,internationalPrefix,longDistancePrefix,countryCode,areaCode,pbxCode)</title>
558
-      <para>
559
-	The new operator returns an object of this type and sets its
560
-	locational context according to the passed parameters. See
561
-	<citerefentry>
562
-	<refentrytitle>Kamailio::Utils::PhoneNumbers</refentrytitle>
563
-	</citerefentry> above.
564
-      </para>
565
-    </section>
566
-    <section id="ID-aa52786fee82fe6e26ac766b30a1a4fa"><title>canonicalForm( number [, context] )</title>
567
-      <para>
568
-	Convert a phone number (given as first argument) into its canonical
569
-	form. When no context is passed in as the second argument, the
570
-	default context from the systems configuration file is used.
571
-      </para>
572
-    </section>
573
-    <section id="ID-31479dee3ae037c27cd7a84aa7358bd2"><title>dialNumber( number [, context] )</title>
574
-      <para>
575
-	Convert a canonical phone number (given in the first argument) into
576
-	a number to to dial.  WHen no context is given in the second
577
-	argument, a default context from the systems configuration is used.
578
-      </para>
579
-    </section>
580
-  </section>
581
-  <section id="ID-05a2ba8f92ec3fe3d26bcb69d169a1b1"><title>Kamailio::LDAPUtils::LDAPConf</title>
582
-    <para>
583
-      Kamailio::LDAPUtils::LDAPConf - Read openldap config from standard
584
-      config files.
585
-    </para>
586
-    <screen><![CDATA[use Kamailio::LDAPUtils::LDAPConf;
587
-my $conf = new Kamailio::LDAPUtils::LDAPConf();]]></screen>
588
-    <para>
589
-      This module may be used to retrieve the global LDAP configuration as
590
-      used by other LDAP software, such as <literal
591
-      role="code"><![CDATA[nsswitch.ldap]]></literal> and <literal
592
-      role="code"><![CDATA[pam-ldap]]></literal>. The configuration is
593
-      usualy stored in <literal
594
-      role="code"><![CDATA[/etc/openldap/ldap.conf]]></literal>
595
-    </para>
596
-    <para>
597
-      When used from an account with sufficient privilegs (e.g. root), the
598
-      ldap manager passwort is also retrieved.
599
-    </para>
600
-    <section id="ID-77bbb24cd07a34db564171c3072c9f8c"><title>Constructor new()</title>
601
-      <para>
602
-	Returns a new, initialized <literal
603
-	role="code"><![CDATA[Kamailio::LDAPUtils::LDAPConf]]></literal>
604
-	object.
605
-      </para>
606
-    </section>
607
-    <section id="ID-09b3942c6aa316dd4659cc1d84cfab21"><title>Method base()</title>
608
-      <para>
609
-	Returns the servers base-dn to use when doing queries.
610
-      </para>
611
-    </section>
612
-    <section id="ID-cabd9882c784cf96cf68ca988c1dae0f"><title>Method host()</title>
613
-      <para>
614
-	Returns the ldap host to contact.
615
-      </para>
616
-    </section>
617
-    <section id="ID-467ec702bbcdb63e337bbff9e3a5bf01"><title>Method port()</title>
618
-      <para>
619
-	Returns the ldap servers port.
620
-      </para>
621
-    </section>
622
-    <section id="ID-1a047746515766cf720b5cc0f154c783"><title>Method uri()</title>
623
-      <para>
624
-	Returns an uri to contact the ldap server. When there is no
625
-	ldap_uri in the configuration file, an <literal
626
-	role="code"><![CDATA[ldap:]]></literal> uri is constucted from host
627
-	and port.
628
-      </para>
629
-    </section>
630
-    <section id="ID-35ebbd3612d026b4176d2eb8eae428b0"><title>Method rootbindpw()</title>
631
-      <para>
632
-	Returns the ldap "root" password.
633
-      </para>
634
-      <para>
635
-	Note that the <literal role="code"><![CDATA[rootbindpw]]></literal>
636
-	is only available when the current account has sufficient privilegs
637
-	to access <literal
638
-	role="code"><![CDATA[/etc/openldap/ldap.secret]]></literal>.
639
-      </para>
640
-    </section>
641
-    <section id="ID-5e0c4c1de34f9247439d8d10d6734b9e"><title>Method rootbinddn()</title>
642
-      <para>
643
-	Returns the DN to use for "root"-access to the ldap server.
644
-      </para>
645
-    </section>
646
-    <section id="ID-cdb5e3ce4599d0613db43f1f387f7ea6"><title>Method binddn()</title>
647
-      <para>
648
-	Returns the DN to use for authentication to the ldap server. When
649
-	no bind dn has been specified in the configuration file, returns
650
-	the <literal role="code"><![CDATA[rootbinddn]]></literal>.
651
-      </para>
652
-    </section>
653
-    <section id="ID-3c51d4eeaae6feb7498a2f562b176df3"><title>Method bindpw()</title>
654
-      <para>
655
-	Returns the password to use for authentication to the ldap server.
656
-	When no bind password has been specified, returns the <literal
657
-	role="code"><![CDATA[rootbindpw]]></literal> if any.
658
-      </para>
659
-    </section>
660
-  </section>
661
-  <section id="ID-10d643239760bcd4a2286051808d077e"><title>Kamailio::LDAPUtils::LDAPConnection</title>
662
-    <para>
663
-      Kamailio::LDAPUtils::LDAPConnection - Perl module to perform simple
664
-      LDAP queries.
665
-    </para>
666
-    <para>
667
-      OO-Style interface:
668
-    </para>
669
-    <screen><![CDATA[use Kamailio::LDAPUtils::LDAPConnection;
670
-my $ldap = new Kamailio::LDAPUtils::LDAPConnection;
671
-my @rows = $ldap-search("uid=andi","ou=people,ou=coreworks,ou=de");]]></screen>
672
-    <para>
673
-      Procedural interface:
674
-    </para>
675
-    <screen><![CDATA[use Kamailio::LDAPUtils::LDAPConnection;
676
-my @rows = $ldap->search(
677
-      new Kamailio::LDAPUtils::LDAPConfig(), "uid=andi","ou=people,ou=coreworks,ou=de");]]></screen>
678
-    <para>
679
-      This perl module offers a somewhat simplified interface to the
680
-      <literal role="code"><![CDATA[Net::LDAP]]></literal> functionality.
681
-      It is intended for cases where just a few attributes should be
682
-      retrieved without the overhead of the full featured <literal
683
-      role="code"><![CDATA[Net::LDAP]]></literal>.
684
-    </para>
685
-    <section id="ID-58e29437b48125a88033370afe8fa32b"><title>Constructor new( [config, [authenticated]] )</title>
686
-      <para>
687
-	Set up a new LDAP connection.
688
-      </para>
689
-      <para>
690
-	The first argument, when given, should be a hash reference pointing
691
-	to to the connection parameters, possibly an <literal
692
-	role="code"><![CDATA[Kamailio::LDAPUtils::LDAPConfig]]></literal>
693
-	object. This argument may be <literal
694
-	role="code"><![CDATA[undef]]></literal> in which case a new
695
-	(default) <literal
696
-	role="code"><![CDATA[Kamailio::LDAPUtils::LDAPConfig]]></literal>
697
-	object is used.
698
-      </para>
699
-      <para>
700
-	When the optional second argument is a true value, the connection
701
-	will be authenticated. Otherwise an anonymous bind is done.
702
-      </para>
703
-      <para>
704
-	On success, a new <literal
705
-	role="code"><![CDATA[LDAPConnection]]></literal> object is
706
-	returned, otherwise the result is <literal
707
-	role="code"><![CDATA[undef]]></literal>.
708
-      </para>
709
-    </section>
710
-    <section id="ID-129bd2634f1c36a401321f2fa34be026"><title>Function/Method search( conf, filter, base, [requested_attributes ...])</title>
711
-      <para>
712
-	perform an ldap search, return the dn of the first matching
713
-	directory entry, unless a specific attribute has been requested, in
714
-	wich case the values(s) fot this attribute are returned.
715
-      </para>
716
-      <para>
717
-	When the first argument (conf) is a <literal
718
-	role="code"><![CDATA[Kamailio::LDAPUtils::LDAPConnection]]></literal>,
719
-	it will be used to perform the queries. You can pass the first
720
-	argument implicitly by using the "method" syntax.
721
-      </para>
722
-      <para>
723
-	Otherwise the <literal role="code"><![CDATA[conf]]></literal>
724
-	argument should be a reference to a hash containing the connection
725
-	setup parameters as contained in a <literal
726
-	role="code"><![CDATA[Kamailio::LDAPUtils::LDAPConf]]></literal>
727
-	object. In this mode, the <literal
728
-	role="code"><![CDATA[Kamailio::LDAPUtils::LDAPConnection]]></literal>
729
-	from previous queries will be reused.
730
-      </para>
731
-      <section id="ID-fb371aca693935a2ea3467c59473c78f"><title>Arguments:</title>
732
-        <para>
733
-          <variablelist>
734
-            <varlistentry>
735
-				<term><anchor id="ID-08e27c41a71d449b64a8b443ae34bdb2"/>conf</term>
736
-              <listitem>
737
-                <para>
738
-		  configuration object, used to find host,port,suffix and
739
-		  use_ldap_checks
740
-                </para>
741
-              </listitem>
742
-            </varlistentry>
743
-            <varlistentry>
744
-				<term><anchor id="ID-e6b91204102eda9679a64633dadda9cb"/>filter</term>
745
-              <listitem>
746
-                <para>
747
-		  ldap search filter, eg '(mail=some@domain)'
748
-                </para>
749
-              </listitem>
750
-            </varlistentry>
751
-            <varlistentry>
752
-				<term><anchor id="ID-1067b3f87b6da6a8f5e87238609c1802"/>base</term>
753
-              <listitem>
754
-                <para>
755
-		  search base for this query. If undef use default suffix,
756
-		  concat base with default suffix if the last char is a ','
757
-                </para>
758
-              </listitem>
759
-            </varlistentry>
760
-            <varlistentry>
761
-				<term><anchor id="ID-1c7c9132da5e8bb2a9c24aec3df86e47"/>requested_attributes</term>
762
-              <listitem>
763
-                <para>
764
-		  retrieve the given attributes instead of the dn from the
765
-		  ldap directory.
766
-                </para>
767
-              </listitem>
768
-            </varlistentry>
769
-          </variablelist>
770
-        </para>
771
-      </section>
772
-      <section id="ID-5c0875c73d1d44335ab71b50d8930584"><title>Result:</title>
773
-        <para>
774
-	  Without any specific <literal
775
-	  role="code"><![CDATA[requested_attributes]]></literal>, return
776
-	  the dn of all matching entries in the LDAP directory.
777
-        </para>
778
-        <para>
779
-	  When some <literal
780
-	  role="code"><![CDATA[requested_attributes]]></literal> are given,
781
-	  return an array with those attibutes. When multiple entries match
782
-	  the query, the attribute lists are concatenated.
783
-        </para>
784
-      </section>
785
-    </section>
786
-  </section>
787
-  <section id="ID-94fdb1e4103544a567ac38ee23c8a4d1"><title>Kamailio::VDB</title>
788
-    <para>
789
-      This package is an (abstract) base class for all virtual databases.
790
-      Derived packages can be configured to be used by Kamailio as a
791
-      database.
792
-    </para>
793
-    <para>
794
-      The base class itself should NOT be used in this context, as it does
795
-      not provide any functionality.
796
-    </para>
797
-  </section>
798
-  <section id="ID-d97df315e2044f430319fc4cd9937aa5"><title>Kamailio::Constants</title>
799
-    <para>
800
-      This package provides a number of constants taken from enums and
801
-      defines of Kamailio header files. Unfortunately, there is no mechanism
802
-      for updating the constants automatically, so check the values if you
803
-      are in doubt.
804
-    </para>
805
-  </section>
806
-  <section id="ID-9658bbad14831f685cca13a5c9bb4335"><title>Kamailio::VDB::Adapter::Speeddial</title>
807
-    <para>
808
-      This adapter can be used with the speeddial module.
809
-    </para>
810
-  </section>
811
-  <section id="ID-5cdb14839de18c32782e3d768e170da7"><title>Kamailio::VDB::Adapter::Alias</title>
812
-    <para>
813
-      This package is intended for usage with the alias_db module. The
814
-      query VTab has to take two arguments and return an array of two
815
-      arguments (user name/domain).
816
-    </para>
817
-    <section id="ID-748da8d11c20576948ef68d62753a06a"><title>query(conds,retkeys,order)</title>
818
-      <para>
819
-	Queries the vtab with the given arguments for request conditions,
820
-	keys to return and sort order column name.
821
-      </para>
822
-    </section>
823
-  </section>
824
-  <section id="ID-8165ac0b808b36ff72ee4032e0f62881"><title>Kamailio::VDB::Adapter::AccountingSIPtrace</title>
825
-    <para>
826
-      This package is an Adapter for the acc and siptrace modules,
827
-      featuring only an insert operation.
828
-    </para>
829
-  </section>
830
-  <section id="ID-048913e15394a9675cfe02af5c340528"><title>Kamailio::VDB::Adapter::Describe</title>
831
-    <para>
832
-      This package is intended for debug usage. It will print information
833
-      about requested functions and operations of a client module.
834
-    </para>
835
-    <para>
836
-      Use this module to request schema information when creating new
837
-      adapters.
838
-    </para>
839
-  </section>
840
-  <section id="ID-682dd320dd536e7fb0de4a24e9d1e46e"><title>Kamailio::VDB::Adapter::Auth</title>
841
-    <para>
842
-      This adapter is intended for usage with the auth_db module. The VTab
843
-      should take a username as an argument and return a (plain text!)
844
-      password.
845
-    </para>
846
-  </section>
847
-  <section id="ID-f245c032bf4b4837415c871537a63e3b"><title>Kamailio::VDB::ReqCond</title>
848
-    <para>
849
-      This package represents a request condition for database access,
850
-      consisting of a column name, an operator (=, &lt;, &gt;, ...), a data
851
-      type and a value.
852
-    </para>
853
-    <para>
854
-      This package inherits from Kamailio::VDB::Pair and thus includes its
855
-      methods.
856
-    </para>
857
-    <section id="ID-c50f7cee51ceffdb7253101a36d6b7b3"><title>new(key,op,type,name)</title>
858
-      <para>
859
-	Constructs a new Column object.
860
-      </para>
861
-    </section>
862
-    <section id="ID-cb5f02a3144f3af620484048b11472af"><title>op()</title>
863
-      <para>
864
-	Returns or sets the current operator.
865
-      </para>
866
-    </section>
867
-  </section>
868
-  <section id="ID-4be9a5fa03b11c2c2dad3594fc3b585d"><title>Kamailio::VDB::Pair</title>
869
-    <para>
870
-      This package represents database key/value pairs, consisting of a
871
-      key, a value type, and the value.
872
-    </para>
873
-    <para>
874
-      This package inherits from Kamailio::VDB::Value and thus has the same
875
-      methods.
876
-    </para>
877
-    <section id="ID-e6cc5b1a997ea8e29d2a00b986784dc0"><title>new(key,type,name)</title>
878
-      <para>
879
-	Constructs a new Column object.
880
-      </para>
881
-    </section>
882
-    <section id="ID-9c70856322a870405521ad299a6785d6"><title>key()</title>
883
-      <para>
884
-	Returns or sets the current key.
885
-      </para>
886
-    </section>
887
-  </section>
888
-  <section id="ID-41cd8a9b5b94c05139d2a7f62d5a967b"><title>Kamailio::VDB::VTab</title>
889
-    <para>
890
-      This package handles virtual tables and is used by the Kamailio::VDB
891
-      class to store information about valid tables. The package is not
892
-      inteded for end user access.
893