Browse code

Adding the new Perl Virtual Database which can relay database requests to Perl functions. Please see module documentation for further information.

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1992 689a6050-402a-0410-94f2-e92a70836424

Bastian Friedrich authored on 12/04/2007 16:13:07
Showing 43 changed files
... ...
@@ -67,4 +67,10 @@ install_module_custom:
67 67
 	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/Utils
68 68
 	$(INSTALL_CFG) lib/perl/OpenSER/Utils/*.pm \
69 69
 		$(modules-prefix)/$(lib-dir)/perl/OpenSER/Utils
70
+	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB
71
+	$(INSTALL_CFG) lib/perl/OpenSER/VDB/*.pm \
72
+		$(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB
73
+	mkdir -p $(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB/Adapter
74
+	$(INSTALL_CFG) lib/perl/OpenSER/VDB/Adapter/*.pm \
75
+		$(modules-prefix)/$(lib-dir)/perl/OpenSER/VDB/Adapter
70 76
 
... ...
@@ -10,7 +10,7 @@ Edited by
10 10
 Bastian Friedrich
11 11
 
12 12
    Copyright � 2007 Collax GmbH
13
-     _________________________________________________________
13
+     __________________________________________________________
14 14
 
15 15
    Table of Contents
16 16
    1. User's Guide
... ...
@@ -97,9 +97,9 @@ Bastian Friedrich
97 97
         3.5. OpenSER::Utils::PhoneNumbers
98 98
 
99 99
               3.5.1.
100
-                      new(publicAccessPrefix,internationalPrefix,lo
101
-                      ngDistancePrefix,countryCode,areaCode,pbxCo
102
-                      de)
100
+                      new(publicAccessPrefix,internationalPrefix,lon
101
+                      gDistancePrefix,countryCode,areaCode,pbxCode
102
+                      )
103 103
 
104 104
               3.5.2. canonicalForm( number [, context] )
105 105
               3.5.3. dialNumber( number [, context] )
... ...
@@ -122,7 +122,48 @@ Bastian Friedrich
122 122
               3.7.2. Function/Method search( conf, filter, base,
123 123
                       [requested_attributes ...])
124 124
 
125
-        3.8. OpenSER::Constants
125
+        3.8. OpenSER::VDB
126
+        3.9. OpenSER::Constants
127
+        3.10. OpenSER::VDB::Adapter::Speeddial
128
+        3.11. OpenSER::VDB::Adapter::Alias
129
+
130
+              3.11.1. query(conds,retkeys,order)
131
+
132
+        3.12. OpenSER::VDB::Adapter::AccountingSIPtrace
133
+        3.13. OpenSER::VDB::Adapter::Describe
134
+        3.14. OpenSER::VDB::Adapter::Auth
135
+        3.15. OpenSER::VDB::ReqCond
136
+
137
+              3.15.1. new(key,op,type,name)
138
+              3.15.2. op()
139
+
140
+        3.16. OpenSER::VDB::Pair
141
+
142
+              3.16.1. new(key,type,name)
143
+              3.16.2. key()
144
+
145
+        3.17. OpenSER::VDB::VTab
146
+
147
+              3.17.1. new()
148
+              3.17.2. call(op,[args])
149
+
150
+        3.18. OpenSER::VDB::Value
151
+
152
+              3.18.1. stringification
153
+              3.18.2. new(type,data)
154
+              3.18.3. type()
155
+              3.18.4. data()
156
+
157
+        3.19. OpenSER::VDB::Column
158
+
159
+              3.19.1. Stringification
160
+              3.19.2. new(type,name)
161
+              3.19.3. type( )
162
+              3.19.4. name()
163
+              3.19.5. OpenSER::VDB::Result
164
+              3.19.6. new(coldefs,[row, row, ...])
165
+              3.19.7. coldefs()
166
+              3.19.8. rows()
126 167
 
127 168
    4. Perl samples
128 169
 
... ...
@@ -137,24 +178,23 @@ Bastian Friedrich
137 137
    1-2. Set modpath parameter
138 138
    1-3. perl_exec_simple() usage
139 139
    1-4. perl_exec() usage
140
-     _________________________________________________________
140
+     __________________________________________________________
141 141
 
142 142
 Chapter 1. User's Guide
143 143
 
144 144
 1.1. Overview
145 145
 
146
-   The time needed when writing a new OpenSER module
147
-   unfortunately is quite high, while the options provided by the
148
-   configuration file are limited to the features implemented in
149
-   the modules.
146
+   The time needed when writing a new OpenSER module unfortunately
147
+   is quite high, while the options provided by the configuration
148
+   file are limited to the features implemented in the modules.
150 149
 
151 150
    With this Perl module, you can easily implement your own
152 151
    OpenSER extensions in Perl. This allows for simple access to
153 152
    the full world of CPAN modules. SIP URI rewriting could be
154 153
    implemented based on regular expressions; accessing arbitrary
155
-   data backends, e.g. LDAP or Berkeley DB files, is now
156
-   extremely simple.
157
-     _________________________________________________________
154
+   data backends, e.g. LDAP or Berkeley DB files, is now extremely
155
+   simple.
156
+     __________________________________________________________
158 157
 
159 158
 1.2. Installing the module
160 159
 
... ...
@@ -167,17 +207,17 @@ Chapter 1. User's Guide
167 167
    packages from your favorite Linux distribution should work
168 168
    fine.
169 169
 
170
-   Cross compilation is supported by the Makefile. You need to
171
-   set the environment variables PERLLDOPTS, PERLCCOPTS and
172
-   TYPEMAP to values similar to the output of
170
+   Cross compilation is supported by the Makefile. You need to set
171
+   the environment variables PERLLDOPTS, PERLCCOPTS and TYPEMAP to
172
+   values similar to the output of
173 173
 PERLLDOPTS: perl -MExtUtils::Embed -e ldopts
174 174
 PERLCCOPTS: perl -MExtUtils::Embed -e ccopts
175
-TYPEMAP:    echo "`perl -MConfig -e 'print $Config{installprivlib}'`/Ex
176
-tUtils/typemap"
175
+TYPEMAP:    echo "`perl -MConfig -e 'print $Config{installprivlib}'`/Ext
176
+Utils/typemap"
177 177
 
178 178
    The exact position of your (precompiled!) perl libraries
179 179
    depends on the setup of your environment.
180
-     _________________________________________________________
180
+     __________________________________________________________
181 181
 
182 182
 1.3. Using the module
183 183
 
... ...
@@ -201,7 +241,7 @@ if (perl_exec("ldap_alias")) {
201 201
    read and modify the current SIP message, such as the RURI or
202 202
    the message flags. An introduction to the Perl interface and
203 203
    the full reference documentation can be found below.
204
-     _________________________________________________________
204
+     __________________________________________________________
205 205
 
206 206
 1.4. Dependencies
207 207
 
... ...
@@ -212,7 +252,7 @@ if (perl_exec("ldap_alias")) {
212 212
      * The "sl" module is needed for sending replies uppon fatal
213 213
        errors. All other modules can be accessed from the Perl
214 214
        module, though.
215
-     _________________________________________________________
215
+     __________________________________________________________
216 216
 
217 217
 1.4.2. External Libraries or Applications
218 218
 
... ...
@@ -221,9 +261,9 @@ if (perl_exec("ldap_alias")) {
221 221
 
222 222
      * Perl 5.8.x or later
223 223
 
224
-   Additionally, a number of perl modules should be installed.
225
-   The OpenSER::LDAPUtils package relies on Net::LDAP to be
226
-   installed. One of the sample scripts needs IPC::Shareable
224
+   Additionally, a number of perl modules should be installed. The
225
+   OpenSER::LDAPUtils package relies on Net::LDAP to be installed.
226
+   One of the sample scripts needs IPC::Shareable
227 227
 
228 228
    This module has been developed and tested with Perl 5.8.8, but
229 229
    should work with any 5.8.x release. Compilation is possible
... ...
@@ -255,7 +295,7 @@ if (perl_exec("ldap_alias")) {
255 255
    to be fetched from CPAN. Consider using the program "cpan2rpm"
256 256
    - which, in turn, is available on CPAN. It creates RPM files
257 257
    from CPAN.
258
-     _________________________________________________________
258
+     __________________________________________________________
259 259
 
260 260
 1.5. Exported Parameters
261 261
 
... ...
@@ -265,27 +305,27 @@ if (perl_exec("ldap_alias")) {
265 265
    only, but it may include an arbitary number of functions and
266 266
    "use" as many Perl module as necessary.
267 267
 
268
-   May not be empty! 
268
+   May not be empty!
269 269
 
270 270
    Example 1-1. Set filename parameter
271 271
 ...
272 272
 modparam("perl", "filename", "/home/john/openser/myperl.pl")
273 273
 ...
274
-     _________________________________________________________
274
+     __________________________________________________________
275 275
 
276 276
 1.5.2. modpath (string)
277 277
 
278
-   The path to the Perl modules included (OpenSER.pm et.al). It
279
-   is not absolutely crucial to set this path, as you may install
280
-   the Modules in Perl's standard path, or update the "%INC"
281
-   variable from within your script. Using this module parameter
282
-   is the standard behavior, though.
278
+   The path to the Perl modules included (OpenSER.pm et.al). It is
279
+   not absolutely crucial to set this path, as you may install the
280
+   Modules in Perl's standard path, or update the "%INC" variable
281
+   from within your script. Using this module parameter is the
282
+   standard behavior, though.
283 283
 
284 284
    Example 1-2. Set modpath parameter
285 285
 ...
286 286
 modparam("perl", "modpath", "/usr/local/lib/openser/perl/")
287 287
 ...
288
-     _________________________________________________________
288
+     __________________________________________________________
289 289
 
290 290
 1.6. Exported Functions
291 291
 
... ...
@@ -308,7 +348,7 @@ if (method=="INVITE") {
308 308
         perl_exec_simple("dosomething", "on invite messages");
309 309
 };
310 310
 ...
311
-     _________________________________________________________
311
+     __________________________________________________________
312 312
 
313 313
 1.6.2. perl_exec(func, [param])
314 314
 
... ...
@@ -329,23 +369,22 @@ if (perl_exec("ldapalias")) {
329 329
         ...
330 330
 };
331 331
 ...
332
-     _________________________________________________________
332
+     __________________________________________________________
333 333
 
334 334
 Chapter 2. Developer's Guide
335 335
 
336 336
    The module does not provide any API to use in other OpenSER
337 337
    modules.
338
-     _________________________________________________________
338
+     __________________________________________________________
339 339
 
340 340
 Chapter 3. OpenSER Perl API
341 341
 
342 342
 3.1. OpenSER
343 343
 
344
-   This module provides access to a limited number of OpenSER
345
-   core functions. As the most interesting functions deal with
346
-   SIP messages, they are located in the OpenSER::Message class
347
-   below.
348
-     _________________________________________________________
344
+   This module provides access to a limited number of OpenSER core
345
+   functions. As the most interesting functions deal with SIP
346
+   messages, they are located in the OpenSER::Message class below.
347
+     __________________________________________________________
349 348
 
350 349
 3.1.1. log(level,message)
351 350
 
... ...
@@ -364,37 +403,37 @@ Chapter 3. OpenSER Perl API
364 364
    logarithm). Either explicitly import the function (via use
365 365
    OpenSER qw ( log );), or call it with its full name:
366 366
 OpenSER::log(L_INFO, "foobar");
367
-     _________________________________________________________
367
+     __________________________________________________________
368 368
 
369 369
 3.2. OpenSER::Message
370 370
 
371 371
    This package provides access functions for an OpenSER sip_msg
372 372
    structure and its sub-components. Through its means it is
373 373
    possible to fully configure alternative routing decisions.
374
-     _________________________________________________________
374
+     __________________________________________________________
375 375
 
376 376
 3.2.1. getType()
377 377
 
378 378
    Returns one of the constants SIP_REQUEST, SIP_REPLY,
379 379
    SIP_INVALID stating the type of the current message.
380
-     _________________________________________________________
380
+     __________________________________________________________
381 381
 
382 382
 3.2.2. getStatus()
383 383
 
384 384
    Returns the status code of the current Reply message. This
385 385
    function is invalid in Request context!
386
-     _________________________________________________________
386
+     __________________________________________________________
387 387
 
388 388
 3.2.3. getReason()
389 389
 
390 390
    Returns the reason of the current Reply message. This function
391 391
    is invalid in Request context!
392
-     _________________________________________________________
392
+     __________________________________________________________
393 393
 
394 394
 3.2.4. getVersion()
395 395
 
396 396
    Returns the version string of the current SIP message.
397
-     _________________________________________________________
397
+     __________________________________________________________
398 398
 
399 399
 3.2.5. getRURI()
400 400
 
... ...
@@ -407,7 +446,7 @@ OpenSER::log(L_INFO, "foobar");
407 407
    receive a parsed structure.
408 408
 
409 409
    This function is valid in request messages only.
410
-     _________________________________________________________
410
+     __________________________________________________________
411 411
 
412 412
 3.2.6. getMethod()
413 413
 
... ...
@@ -417,26 +456,26 @@ OpenSER::log(L_INFO, "foobar");
417 417
    my $method = $m->getMethod();
418 418
 
419 419
    This function is valid in request messages only.
420
-     _________________________________________________________
420
+     __________________________________________________________
421 421
 
422 422
 3.2.7. getFullHeader()
423 423
 
424 424
    Returns the full message header as present in the current
425
-   message. You might use this header to further work with it
426
-   with your favorite MIME package.
425
+   message. You might use this header to further work with it with
426
+   your favorite MIME package.
427 427
 
428 428
    my $hdr = $m->getFullHeader();
429
-     _________________________________________________________
429
+     __________________________________________________________
430 430
 
431 431
 3.2.8. getBody()
432 432
 
433 433
    Returns the message body.
434
-     _________________________________________________________
434
+     __________________________________________________________
435 435
 
436 436
 3.2.9. getMessage()
437 437
 
438 438
    Returns the whole message including headers and body.
439
-     _________________________________________________________
439
+     __________________________________________________________
440 440
 
441 441
 3.2.10. getHeader(name)
442 442
 
... ...
@@ -445,12 +484,12 @@ OpenSER::log(L_INFO, "foobar");
445 445
    print $m->getHeader("To");
446 446
 
447 447
    "John" <sip:john@doe.example>
448
-     _________________________________________________________
448
+     __________________________________________________________
449 449
 
450 450
 3.2.11. getHeaderNames()
451 451
 
452 452
    Returns an array of all header names. Duplicates possible!
453
-     _________________________________________________________
453
+     __________________________________________________________
454 454
 
455 455
 3.2.12. moduleFunction(func,string1,string2)
456 456
 
... ...
@@ -472,8 +511,7 @@ $m->xlog("L_INFO", "foo");
472 472
    WARNING
473 473
 
474 474
    In OpenSER 1.2, only a limited subset of module functions is
475
-   available. This restriction will be removed in a later
476
-   version.
475
+   available. This restriction will be removed in a later version.
477 476
 
478 477
    Here is a list of functions that are expected to be working
479 478
    (not claiming completeness):
... ...
@@ -571,7 +609,7 @@ $m->xlog("L_INFO", "foo");
571 571
 * radius_does_uri_exist
572 572
 * ul_* (All functions exported by the usrloc module for user access)
573 573
 * xmpp_send_message
574
-     _________________________________________________________
574
+     __________________________________________________________
575 575
 
576 576
 3.2.13. log(level,message) (deprecated type)
577 577
 
... ...
@@ -587,7 +625,7 @@ $m->xlog("L_INFO", "foo");
587 587
 
588 588
    The logging function should be accessed via the OpenSER module
589 589
    variant. This one, located in OpenSER::Message, is deprecated.
590
-     _________________________________________________________
590
+     __________________________________________________________
591 591
 
592 592
 3.2.14. rewrite_ruri(newruri)
593 593
 
... ...
@@ -596,208 +634,207 @@ $m->xlog("L_INFO", "foo");
596 596
 if ($m->getRURI() =~ m/\@somedomain.net/) {
597 597
   $m->rewrite_ruri("sip:dispatcher\@organization.net");
598 598
 }
599
-     _________________________________________________________
599
+     __________________________________________________________
600 600
 
601 601
 3.2.15. setFlag(flag)
602 602
 
603 603
    Sets a message flag. The constants as known from the C API may
604 604
    be used, when Constants.pm is included.
605
-     _________________________________________________________
605
+     __________________________________________________________
606 606
 
607 607
 3.2.16. resetFlag(flag)
608 608
 
609 609
    Resets a message flag.
610
-     _________________________________________________________
610
+     __________________________________________________________
611 611
 
612 612
 3.2.17. isFlagSet(flag)
613 613
 
614 614
    Returns whether a message flag is set or not.
615
-     _________________________________________________________
615
+     __________________________________________________________
616 616
 
617 617
 3.2.18. pseudoVar(string)
618 618
 
619
-   Returns a new string where all pseudo variables are
620
-   substituted by their values. Can be used to receive the values
621
-   of single variables, too.
619
+   Returns a new string where all pseudo variables are substituted
620
+   by their values. Can be used to receive the values of single
621
+   variables, too.
622 622
 
623 623
    Please remember that you need to escape the '$' sign in perl
624 624
    strings!
625
-     _________________________________________________________
625
+     __________________________________________________________
626 626
 
627 627
 3.2.19. append_branch(branch,qval)
628 628
 
629 629
    Append a branch to current message.
630
-     _________________________________________________________
630
+     __________________________________________________________
631 631
 
632 632
 3.2.20. serialize_branches(clean_before)
633 633
 
634 634
    Serialize branches.
635
-     _________________________________________________________
635
+     __________________________________________________________
636 636
 
637 637
 3.2.21. next_branches()
638 638
 
639 639
    Next branches.
640
-     _________________________________________________________
640
+     __________________________________________________________
641 641
 
642 642
 3.2.22. getParsedRURI()
643 643
 
644 644
    Returns the current destination URI as an OpenSER::URI object.
645
-     _________________________________________________________
645
+     __________________________________________________________
646 646
 
647 647
 3.3. OpenSER::URI
648 648
 
649 649
    This package provides functions for access to sip_uri
650 650
    structures.
651
-     _________________________________________________________
651
+     __________________________________________________________
652 652
 
653 653
 3.3.1. user()
654 654
 
655 655
    Returns the user part of this URI.
656
-     _________________________________________________________
656
+     __________________________________________________________
657 657
 
658 658
 3.3.2. host()
659 659
 
660 660
    Returns the host part of this URI.
661
-     _________________________________________________________
661
+     __________________________________________________________
662 662
 
663 663
 3.3.3. passwd()
664 664
 
665 665
    Returns the passwd part of this URI.
666
-     _________________________________________________________
666
+     __________________________________________________________
667 667
 
668 668
 3.3.4. port()
669 669
 
670 670
    Returns the port part of this URI.
671
-     _________________________________________________________
671
+     __________________________________________________________
672 672
 
673 673
 3.3.5. params()
674 674
 
675 675
    Returns the params part of this URI.
676
-     _________________________________________________________
676
+     __________________________________________________________
677 677
 
678 678
 3.3.6. headers()
679 679
 
680 680
    Returns the headers part of this URI.
681
-     _________________________________________________________
681
+     __________________________________________________________
682 682
 
683 683
 3.3.7. transport()
684 684
 
685 685
    Returns the transport part of this URI.
686
-     _________________________________________________________
686
+     __________________________________________________________
687 687
 
688 688
 3.3.8. ttl()
689 689
 
690 690
    Returns the ttl part of this URI.
691
-     _________________________________________________________
691
+     __________________________________________________________
692 692
 
693 693
 3.3.9. user_param()
694 694
 
695 695
    Returns the user_param part of this URI.
696
-     _________________________________________________________
696
+     __________________________________________________________
697 697
 
698 698
 3.3.10. maddr()
699 699
 
700 700
    Returns the maddr part of this URI.
701
-     _________________________________________________________
701
+     __________________________________________________________
702 702
 
703 703
 3.3.11. method()
704 704
 
705 705
    Returns the method part of this URI.
706
-     _________________________________________________________
706
+     __________________________________________________________
707 707
 
708 708
 3.3.12. lr()
709 709
 
710 710
    Returns the lr part of this URI.
711
-     _________________________________________________________
711
+     __________________________________________________________
712 712
 
713 713
 3.3.13. r2()
714 714
 
715 715
    Returns the r2 part of this URI.
716
-     _________________________________________________________
716
+     __________________________________________________________
717 717
 
718 718
 3.3.14. transport_val()
719 719
 
720 720
    Returns the transport_val part of this URI.
721
-     _________________________________________________________
721
+     __________________________________________________________
722 722
 
723 723
 3.3.15. ttl_val()
724 724
 
725 725
    Returns the ttl_val part of this URI.
726
-     _________________________________________________________
726
+     __________________________________________________________
727 727
 
728 728
 3.3.16. user_param_val()
729 729
 
730 730
    Returns the user_param_val part of this URI.
731
-     _________________________________________________________
731
+     __________________________________________________________
732 732
 
733 733
 3.3.17. maddr_val()
734 734
 
735 735
    Returns the maddr_val part of this URI.
736
-     _________________________________________________________
736
+     __________________________________________________________
737 737
 
738 738
 3.3.18. method_val()
739 739
 
740 740
    Returns the method_val part of this URI.
741
-     _________________________________________________________
741
+     __________________________________________________________
742 742
 
743 743
 3.3.19. lr_val()
744 744
 
745 745
    Returns the lr_val part of this URI.
746
-     _________________________________________________________
746
+     __________________________________________________________
747 747
 
748 748
 3.3.20. r2_val()
749 749
 
750 750
    Returns the r2_val part of this URI.
751
-     _________________________________________________________
751
+     __________________________________________________________
752 752
 
753 753
 3.4. OpenSER::AVP
754 754
 
755 755
    This package provides access functions for OpenSER's AVPs.
756
-   These variables can be created, evaluated, modified and
757
-   removed through this package.
756
+   These variables can be created, evaluated, modified and removed
757
+   through this package.
758 758
 
759 759
    Please note that these functions do NOT support the notation
760
-   used in the configuration file, but directly work on strings
761
-   or numbers. See documentation of add method below.
762
-     _________________________________________________________
760
+   used in the configuration file, but directly work on strings or
761
+   numbers. See documentation of add method below.
762
+     __________________________________________________________
763 763
 
764 764
 3.4.1. add(name,val)
765 765
 
766 766
    Add an AVP.
767 767
 
768
-   Add an OpenSER AVP to its environment. name and val may both
769
-   be integers or strings; this function will try to guess what
770
-   is correct. Please note that
768
+   Add an OpenSER AVP to its environment. name and val may both be
769
+   integers or strings; this function will try to guess what is
770
+   correct. Please note that
771 771
 OpenSER::AVP::add("10", "10")
772 772
 
773 773
    is something different than
774 774
 OpenSER::AVP::add(10, 10)
775 775
 
776 776
    due to this evaluation: The first will create _string_ AVPs
777
-   with the name 10, while the latter will create a numerical
778
-   AVP.
777
+   with the name 10, while the latter will create a numerical AVP.
779 778
 
780 779
    You can modify/overwrite AVPs with this function.
781
-     _________________________________________________________
780
+     __________________________________________________________
782 781
 
783 782
 3.4.2. get(name)
784 783
 
785 784
    get an OpenSER AVP:
786 785
 my $numavp = OpenSER::AVP::get(5);
787 786
 my $stravp = OpenSER::AVP::get("foo");
788
-     _________________________________________________________
787
+     __________________________________________________________
789 788
 
790 789
 3.4.3. destroy(name)
791 790
 
792 791
    Destroy an AVP.
793 792
 OpenSER::AVP::destroy(5);
794 793
 OpenSER::AVP::destroy("foo");
795
-     _________________________________________________________
794
+     __________________________________________________________
796 795
 
797 796
 3.5. OpenSER::Utils::PhoneNumbers
798 797
 
799
-   OpenSER::Utils::PhoneNumbers - Functions for canonical forms
800
-   of phone numbers.
798
+   OpenSER::Utils::PhoneNumbers - Functions for canonical forms of
799
+   phone numbers.
801 800
 use OpenSER::Utils::PhoneNumber
802 801
 
803 802
 my $phonenumber = new OpenSER::Utils::PhoneNumber(
... ...
@@ -826,17 +863,17 @@ $number    = dialNumber("+497612034567");
826 826
    To canonicalize any number, we strip off any dial prefix we
827 827
    find and then add the prefixes for the location. So, when the
828 828
    user enters the number 04514829 in context pyramid, we remove
829
-   the publicAccessPrefix (at Pyramid this is 0) and the
830
-   pbxPrefix (4514 here). The result is 829. Then we add all the
831
-   general dial prefixes - 49 (country) 761 (area) 4514 (pbx) and
832
-   829, the number itself => +497614514829
829
+   the publicAccessPrefix (at Pyramid this is 0) and the pbxPrefix
830
+   (4514 here). The result is 829. Then we add all the general
831
+   dial prefixes - 49 (country) 761 (area) 4514 (pbx) and 829, the
832
+   number itself => +497614514829
833 833
 
834 834
    To get the dialing number from a canonical phone number, we
835 835
    substract all general prefixes until we have something
836 836
 
837
-   As said before, the interpretation of a phone number depends
838
-   on the context of the location. For the functions in this
839
-   package, the context is created through the new operator.
837
+   As said before, the interpretation of a phone number depends on
838
+   the context of the location. For the functions in this package,
839
+   the context is created through the new operator.
840 840
 
841 841
    The following fields should be set:
842 842
 'longDistancePrefix'
... ...
@@ -847,24 +884,24 @@ $number    = dialNumber("+497612034567");
847 847
 'countryCode'
848 848
 
849 849
    This module exports the following functions when useed:
850
-     _________________________________________________________
850
+     __________________________________________________________
851 851
 
852 852
 3.5.1.
853
-new(publicAccessPrefix,internationalPrefix,longDistancePrefix,countr
854
-yCode,areaCode,pbxCode)
853
+new(publicAccessPrefix,internationalPrefix,longDistancePrefix,country
854
+Code,areaCode,pbxCode)
855 855
 
856
-   The new operator returns an object of this type and sets it's
856
+   The new operator returns an object of this type and sets its
857 857
    locational context according to the passed parameters. See
858 858
    OpenSER::Utils::PhoneNumbers above.
859
-     _________________________________________________________
859
+     __________________________________________________________
860 860
 
861 861
 3.5.2. canonicalForm( number [, context] )
862 862
 
863
-   Convert a phone number (given as first argument) into it's
863
+   Convert a phone number (given as first argument) into its
864 864
    canonical form. When no context is passed in as the second
865 865
    argument, the default context from the systems configuration
866 866
    file is used.
867
-     _________________________________________________________
867
+     __________________________________________________________
868 868
 
869 869
 3.5.3. dialNumber( number [, context] )
870 870
 
... ...
@@ -872,7 +909,7 @@ yCode,areaCode,pbxCode)
872 872
    into a number to to dial. WHen no context is given in the
873 873
    second argument, a default context from the systems
874 874
    configuration is used.
875
-     _________________________________________________________
875
+     __________________________________________________________
876 876
 
877 877
 3.6. OpenSER::LDAPUtils::LDAPConf
878 878
 
... ...
@@ -888,35 +925,34 @@ my $conf = new OpenSER::LDAPUtils::LDAPConf();
888 888
 
889 889
    When used from an account with sufficient privilegs (e.g.
890 890
    root), the ldap manager passwort is also retrieved.
891
-     _________________________________________________________
891
+     __________________________________________________________
892 892
 
893 893
 3.6.1. Constructor new()
894 894
 
895
-   Returns a new, initialized OpenSER::LDAPUtils::LDAPConf
896
-   object.
897
-     _________________________________________________________
895
+   Returns a new, initialized OpenSER::LDAPUtils::LDAPConf object.
896
+     __________________________________________________________
898 897
 
899 898
 3.6.2. Method base()
900 899
 
901 900
    Returns the servers base-dn to use when doing queries.
902
-     _________________________________________________________
901
+     __________________________________________________________
903 902
 
904 903
 3.6.3. Method host()
905 904
 
906 905
    Returns the ldap host to contact.
907
-     _________________________________________________________
906
+     __________________________________________________________
908 907
 
909 908
 3.6.4. Method port()
910 909
 
911 910
    Returns the ldap servers port.
912
-     _________________________________________________________
911
+     __________________________________________________________
913 912
 
914 913
 3.6.5. Method uri()
915 914
 
916 915
    Returns an uri to contact the ldap server. When there is no
917 916
    ldap_uri in the configuration file, an ldap: uri is constucted
918 917
    from host and port.
919
-     _________________________________________________________
918
+     __________________________________________________________
920 919
 
921 920
 3.6.6. Method rootbindpw()
922 921
 
... ...
@@ -925,26 +961,26 @@ my $conf = new OpenSER::LDAPUtils::LDAPConf();
925 925
    Note that the rootbindpw is only available when the current
926 926
    account has sufficient privilegs to access
927 927
    /etc/openldap/ldap.secret.
928
-     _________________________________________________________
928
+     __________________________________________________________
929 929
 
930 930
 3.6.7. Method rootbinddn()
931 931
 
932 932
    Returns the DN to use for "root"-access to the ldap server.
933
-     _________________________________________________________
933
+     __________________________________________________________
934 934
 
935 935
 3.6.8. Method binddn()
936 936
 
937 937
    Returns the DN to use for authentication to the ldap server.
938 938
    When no bind dn has been specified in the configuration file,
939 939
    returns the rootbinddn.
940
-     _________________________________________________________
940
+     __________________________________________________________
941 941
 
942 942
 3.6.9. Method bindpw()
943 943
 
944 944
    Returns the password to use for authentication to the ldap
945 945
    server. When no bind password has been specified, returns the
946 946
    rootbindpw if any.
947
-     _________________________________________________________
947
+     __________________________________________________________
948 948
 
949 949
 3.7. OpenSER::LDAPUtils::LDAPConnection
950 950
 
... ...
@@ -959,14 +995,14 @@ my @rows = $ldap-search("uid=andi","ou=people,ou=coreworks,ou=de");
959 959
    Procedural interface:
960 960
 use OpenSER::LDAPUtils::LDAPConnection;
961 961
 my @rows = $ldap->search(
962
-      new OpenSER::LDAPUtils::LDAPConfig(), "uid=andi","ou=people,ou=co
963
-reworks,ou=de");
962
+      new OpenSER::LDAPUtils::LDAPConfig(), "uid=andi","ou=people,ou=cor
963
+eworks,ou=de");
964 964
 
965 965
    This perl module offers a somewhat simplified interface to the
966 966
    Net::LDAP functionality. It is intended for cases where just a
967 967
    few attributes should be retrieved without the overhead of the
968 968
    full featured Net::LDAP.
969
-     _________________________________________________________
969
+     __________________________________________________________
970 970
 
971 971
 3.7.1. Constructor new( [config, [authenticated]] )
972 972
 
... ...
@@ -984,7 +1020,7 @@ reworks,ou=de");
984 984
 
985 985
    On success, a new LDAPConnection object is returned, otherwise
986 986
    the result is undef.
987
-     _________________________________________________________
987
+     __________________________________________________________
988 988
 
989 989
 3.7.2. Function/Method search( conf, filter, base,
990 990
 [requested_attributes ...])
... ...
@@ -1004,7 +1040,7 @@ reworks,ou=de");
1004 1004
    OpenSER::LDAPUtils::LDAPConf object. In this mode, the
1005 1005
    OpenSER::LDAPUtils::LDAPConnection from previous queries will
1006 1006
    be reused.
1007
-     _________________________________________________________
1007
+     __________________________________________________________
1008 1008
 
1009 1009
 3.7.2.1. Arguments:
1010 1010
 
... ...
@@ -1016,68 +1052,280 @@ reworks,ou=de");
1016 1016
           ldap search filter, eg '(mail=some@domain)'
1017 1017
 
1018 1018
    base
1019
-          search base for this query. If undef use default
1020
-          suffix, concat base with default suffix if the last
1021
-          char is a ','
1019
+          search base for this query. If undef use default suffix,
1020
+          concat base with default suffix if the last char is a
1021
+          ','
1022 1022
 
1023 1023
    requested_attributes
1024
-          retrieve the given attributes instead of the dn from
1025
-          the ldap directory.
1026
-     _________________________________________________________
1024
+          retrieve the given attributes instead of the dn from the
1025
+          ldap directory.
1026
+     __________________________________________________________
1027 1027
 
1028 1028
 3.7.2.2. Result:
1029 1029
 
1030
-   Without any specific requested_attributes, return the dn of
1031
-   all matching entries in the LDAP directory.
1030
+   Without any specific requested_attributes, return the dn of all
1031
+   matching entries in the LDAP directory.
1032 1032
 
1033 1033
    When some requested_attributes are given, return an array with
1034 1034
    those attibutes. When multiple entries match the query, the
1035 1035
    attribute lists are concatenated.
1036
-     _________________________________________________________
1036
+     __________________________________________________________
1037 1037
 
1038
-3.8. OpenSER::Constants
1038
+3.8. OpenSER::VDB
1039
+
1040
+   This package is an (abstract) base class for all virtual
1041
+   databases. Derived packages can be configured to be used by
1042
+   OpenSER as a database.
1043
+
1044
+   The base class itself should NOT be used in this context, as it
1045
+   does not provide any functionality.
1046
+     __________________________________________________________
1047
+
1048
+3.9. OpenSER::Constants
1039 1049
 
1040 1050
    This package provides a number of constants taken from enums
1041
-   and defines of OpenSER header files. Unfortunately, there is
1042
-   no mechanism for updating the constants automatically, so
1043
-   check the values if you are in doubt.
1044
-     _________________________________________________________
1051
+   and defines of OpenSER header files. Unfortunately, there is no
1052
+   mechanism for updating the constants automatically, so check
1053
+   the values if you are in doubt.
1054
+     __________________________________________________________
1055
+
1056
+3.10. OpenSER::VDB::Adapter::Speeddial
1057
+
1058
+   This adapter can be used with the speeddial module.
1059
+     __________________________________________________________
1060
+
1061
+3.11. OpenSER::VDB::Adapter::Alias
1062
+
1063
+   This package is intended for usage with the alias_db module.
1064
+   The query VTab has to take two arguments and return an array of
1065
+   two arguments (user name/domain).
1066
+     __________________________________________________________
1067
+
1068
+3.11.1. query(conds,retkeys,order)
1069
+
1070
+   Queries the vtab with the given arguments for request
1071
+   conditions, keys to return and sort order column name.
1072
+     __________________________________________________________
1073
+
1074
+3.12. OpenSER::VDB::Adapter::AccountingSIPtrace
1075
+
1076
+   This package is an Adapter for the acc and siptrace modules,
1077
+   featuring only an insert operation.
1078
+     __________________________________________________________
1079
+
1080
+3.13. OpenSER::VDB::Adapter::Describe
1081
+
1082
+   This package is intended for debug usage. It will print
1083
+   information about requested functions and operations of a
1084
+   client module.
1085
+
1086
+   Use this module to request schema information when creating new
1087
+   adapters.
1088
+     __________________________________________________________
1089
+
1090
+3.14. OpenSER::VDB::Adapter::Auth
1091
+
1092
+   This adapter is intended for usage with the auth_db module. The
1093
+   VTab should take a username as an argument and return a (plain
1094
+   text!) password.
1095
+     __________________________________________________________
1096
+
1097
+3.15. OpenSER::VDB::ReqCond
1098
+
1099
+   This package represents a request condition for database
1100
+   access, consisting of a column name, an operator (=, <, >,
1101
+   ...), a data type and a value.
1102
+
1103
+   This package inherits from OpenSER::VDB::Pair and thus includes
1104
+   its methods.
1105
+     __________________________________________________________
1106
+
1107
+3.15.1. new(key,op,type,name)
1108
+
1109
+   Constructs a new Column object.
1110
+     __________________________________________________________
1111
+
1112
+3.15.2. op()
1113
+
1114
+   Returns or sets the current operator.
1115
+     __________________________________________________________
1116
+
1117
+3.16. OpenSER::VDB::Pair
1118
+
1119
+   This package represents database key/value pairs, consisting of
1120
+   a key, a value type, and the value.
1121
+
1122
+   This package inherits from OpenSER::VDB::Value and thus has the
1123
+   same methods.
1124
+     __________________________________________________________
1125
+
1126
+3.16.1. new(key,type,name)
1127
+
1128
+   Constructs a new Column object.
1129
+     __________________________________________________________
1130
+
1131
+3.16.2. key()
1132
+
1133
+   Returns or sets the current key.
1134
+     __________________________________________________________
1135
+
1136
+3.17. OpenSER::VDB::VTab
1137
+
1138
+   This package handles virtual tables and is used by the
1139
+   OpenSER::VDB class to store information about valid tables. The
1140
+   package is not inteded for end user access.
1141
+     __________________________________________________________
1142
+
1143
+3.17.1. new()
1144
+
1145
+Constructs a new VTab object
1146
+     __________________________________________________________
1147
+
1148
+3.17.2. call(op,[args])
1149
+
1150
+   Invokes an operation on the table (insert, update, ...) with
1151
+   the given arguments.
1152
+     __________________________________________________________
1153
+
1154
+3.18. OpenSER::VDB::Value
1155
+
1156
+   This package represents a database value. Additional to the
1157
+   data itself, information about its type is stored.
1158
+     __________________________________________________________
1159
+
1160
+3.18.1. stringification
1161
+
1162
+   When accessing a OpenSER::VDB::Value object as a string, it
1163
+   simply returns its data regardless of its type. =cut
1164
+
1165
+   use strict;
1166
+
1167
+   package OpenSER::VDB::Value;
1168
+
1169
+   use overload '""' => \&stringify;
1170
+
1171
+   sub stringify { shift->{data} }
1172
+
1173
+   use OpenSER; use OpenSER::Constants;
1174
+
1175
+   our @ISA = qw ( OpenSER::Utils::Debug );
1176
+     __________________________________________________________
1177
+
1178
+3.18.2. new(type,data)
1179
+
1180
+   Constructs a new Value object. Its data type and the data are
1181
+   passed as parameters.
1182
+     __________________________________________________________
1183
+
1184
+3.18.3. type()
1185
+
1186
+   Returns or sets the current data type. Please consider using
1187
+   the constants from OpenSER::Constants
1188
+     __________________________________________________________
1189
+
1190
+3.18.4. data()
1191
+
1192
+   Returns or sets the current data.
1193
+     __________________________________________________________
1194
+
1195
+3.19. OpenSER::VDB::Column
1196
+
1197
+   This package represents database column definition, consisting
1198
+   of a column name and its data type.
1199
+     __________________________________________________________
1200
+
1201
+3.19.1. Stringification
1202
+
1203
+   When accessing a OpenSER::VDB::Column object as a string, it
1204
+   simply returns its column name regardless of its type. =cut
1205
+
1206
+   package OpenSER::VDB::Column;
1207
+
1208
+   use overload '""' => \&stringify;
1209
+
1210
+   sub stringify { shift->{name} }
1211
+
1212
+   use OpenSER; use OpenSER::Constants;
1213
+
1214
+   our @ISA = qw ( OpenSER::Utils::Debug );
1215
+     __________________________________________________________
1216
+
1217
+3.19.2. new(type,name)
1218
+
1219
+   Constructs a new Column object. Its type and the name are
1220
+   passed as parameters.
1221
+     __________________________________________________________
1222
+
1223
+3.19.3. type( )
1224
+
1225
+   Returns or sets the current type. Please consider using the
1226
+   constants from OpenSER::Constants
1227
+     __________________________________________________________
1228
+
1229
+3.19.4. name()
1230
+
1231
+   Returns or sets the current column name.
1232
+     __________________________________________________________
1233
+
1234
+3.19.5. OpenSER::VDB::Result
1235
+
1236
+   This class represents a VDB result set. It contains a column
1237
+   definition, plus an array of rows. Rows themselves are simply
1238
+   references to arrays of scalars.
1239
+     __________________________________________________________
1240
+
1241
+3.19.6. new(coldefs,[row, row, ...])
1242
+
1243
+   The constructor creates a new Result object. Its first
1244
+   parameter is a reference to an array of OpenSER::VDB::Column
1245
+   objects. Additional parameters may be passed to provide initial
1246
+   rows, which are references to arrays of scalars.
1247
+     __________________________________________________________
1248
+
1249
+3.19.7. coldefs()
1250
+
1251
+Returns or sets the column definition of the object.
1252
+     __________________________________________________________
1253
+
1254
+3.19.8. rows()
1255
+
1256
+Returns or sets the rows of the object.
1257
+     __________________________________________________________
1045 1258
 
1046 1259
 Chapter 4. Perl samples
1047 1260
 
1048 1261
 4.1. sample directory
1049 1262
 
1050 1263
    There are a number of example scripts in the "samples/". They
1051
-   are documented well. Read them, it will explain a lot to you
1052
-   :)
1264
+   are documented well. Read them, it will explain a lot to you :)
1053 1265
 
1054 1266
    If you want to use any of these scripts directly in your
1055 1267
    implementation, you can use Perl's "require" mechanism to
1056 1268
    import them (just remember that you need to use quotes when
1057 1269
    require'ing .pl files).
1058
-     _________________________________________________________
1270
+     __________________________________________________________
1059 1271
 
1060 1272
 4.1.1. Script descriptions
1061 1273
 
1062 1274
    The included sample scripts are described below:
1063
-     _________________________________________________________
1275
+     __________________________________________________________
1064 1276
 
1065 1277
 4.1.1.1. branches.pl
1066 1278
 
1067 1279
    The minimal function in branches.pl demonstrates that you can
1068 1280
    access the "append_branch" function from within perl, just as
1069
-   you would have done from your normal configuration file.
1070
-   You'll find documentation on the concepts of branching in the
1071
-   OpenSER documentation.
1072
-     _________________________________________________________
1281
+   you would have done from your normal configuration file. You'll
1282
+   find documentation on the concepts of branching in the OpenSER
1283
+   documentation.
1284
+     __________________________________________________________
1073 1285
 
1074 1286
 4.1.1.2. firstline.pl
1075 1287
 
1076
-   Message's first_line structure may be evaluated. Message can
1077
-   be either of SIP_REQUEST or SIP_REPLY. Depending on that,
1078
-   different information can be received. This script
1079
-   demonstrates these functions.
1080
-     _________________________________________________________
1288
+   Message's first_line structure may be evaluated. Message can be
1289
+   either of SIP_REQUEST or SIP_REPLY. Depending on that,
1290
+   different information can be received. This script demonstrates
1291
+   these functions.
1292
+     __________________________________________________________
1081 1293
 
1082 1294
 4.1.1.3. flags.pl
1083 1295
 
... ...
@@ -1089,7 +1337,7 @@ Chapter 4. Perl samples
1089 1089
    The first function, setflag, demonstrates how the "green" flag
1090 1090
    is set. In the second function, readflag, the "green" and
1091 1091
    "magenta" flags are evaluated.
1092
-     _________________________________________________________
1092
+     __________________________________________________________
1093 1093
 
1094 1094
 4.1.1.4. functions.pl
1095 1095
 
... ...
@@ -1117,12 +1365,12 @@ Chapter 4. Perl samples
1117 1117
    calls to module functions.
1118 1118
 
1119 1119
    The "diefunc"s show that dying perl scripts - by "manual"
1120
-   dying, or because of script errors - are handled by the
1121
-   OpenSER package. The error message is logged through OpenSER's
1122
-   logging mechanism. Please note that this only works correctly
1123
-   if you do NOT overwrite the default die handler. Oh, yes, that
1124
-   works for warnings, too.
1125
-     _________________________________________________________
1120
+   dying, or because of script errors - are handled by the OpenSER
1121
+   package. The error message is logged through OpenSER's logging
1122
+   mechanism. Please note that this only works correctly if you do
1123
+   NOT overwrite the default die handler. Oh, yes, that works for
1124
+   warnings, too.
1125
+     __________________________________________________________
1126 1126
 
1127 1127
 4.1.1.5. headers.pl
1128 1128
 
... ...
@@ -1134,16 +1382,16 @@ Chapter 4. Perl samples
1134 1134
 
1135 1135
    "someheaders" logs the contents of the two headers, "To" and
1136 1136
    "WWW-Contact". As you can see, headers that occur more than
1137
-   once are retrieved as an array, which may be accessed by
1138
-   Perl's array accessing methods.
1139
-     _________________________________________________________
1137
+   once are retrieved as an array, which may be accessed by Perl's
1138
+   array accessing methods.
1139
+     __________________________________________________________
1140 1140
 
1141 1141
 4.1.1.6. logging.pl
1142 1142
 
1143 1143
    For debugging purposes, you probably want to write messages to
1144 1144
    the syslog. The "logdemo" shows three ways to access the
1145
-   OpenSER log function: it is available through the OpenSER
1146
-   class as well as through the OpenSER::Message class.
1145
+   OpenSER log function: it is available through the OpenSER class
1146
+   as well as through the OpenSER::Message class.
1147 1147
 
1148 1148
    Remember that you can use exported functions from other
1149 1149
    modules. You may thus as well use the "xlog" module and it's
... ...
@@ -1151,15 +1399,15 @@ Chapter 4. Perl samples
1151 1151
 
1152 1152
    The L_INFO, L_DBG, L_ERR, L_CRIT... constants are available
1153 1153
    through the OpenSER::Constants package.
1154
-     _________________________________________________________
1154
+     __________________________________________________________
1155 1155
 
1156 1156
 4.1.1.7. messagedump.pl
1157 1157
 
1158
-   This script demonstrates how to access the whole message
1159
-   header of the current message. Please note that modifications
1160
-   on the message made by earlier function calls in your
1161
-   configuration script may NOT be reflected in this dump.
1162
-     _________________________________________________________
1158
+   This script demonstrates how to access the whole message header
1159
+   of the current message. Please note that modifications on the
1160
+   message made by earlier function calls in your configuration
1161
+   script may NOT be reflected in this dump.
1162
+     __________________________________________________________
1163 1163
 
1164 1164
 4.1.1.8. persistence.pl
1165 1165
 
... ...
@@ -1170,14 +1418,14 @@ Chapter 4. Perl samples
1170 1170
    instances of OpenSER. You may want to use a mechanism such as
1171 1171
    the IPC::Shareable shared memory access package to correct
1172 1172
    this.
1173
-     _________________________________________________________
1173
+     __________________________________________________________
1174 1174
 
1175 1175
 4.1.1.9. phonenumbers.pl
1176 1176
 
1177 1177
    The OpenSER::Utils::PhoneNumbers package provides two methods
1178
-   for the transformation of local to canonical telephone
1179
-   numbers, and vice versa. This script demonstrates it's use.
1180
-     _________________________________________________________
1178
+   for the transformation of local to canonical telephone numbers,
1179
+   and vice versa. This script demonstrates it's use.
1180
+     __________________________________________________________
1181 1181
 
1182 1182
 4.1.1.10. pseudovars.pl
1183 1183
 
... ...
@@ -1188,7 +1436,7 @@ Chapter 4. Perl samples
1188 1188
    You might notice that there is no particular function for
1189 1189
    setting pseudo variables; you may use the exported functions
1190 1190
    from the avpops module, though.
1191
-     _________________________________________________________
1191
+     __________________________________________________________
1192 1192
 
1193 1193
 Chapter 5. Frequently Asked Questions
1194 1194
 
... ...
@@ -1202,8 +1450,8 @@ Chapter 5. Frequently Asked Questions
1202 1202
 
1203 1203
    5.2. Where can I post a question about this module?
1204 1204
 
1205
-   First at all check if your question was already answered on
1206
-   one of our mailing lists:
1205
+   First at all check if your question was already answered on one
1206
+   of our mailing lists:
1207 1207
 
1208 1208
      * User Mailing List -
1209 1209
        http://openser.org/cgi-bin/mailman/listinfo/users
... ...
@@ -556,7 +556,7 @@ $number    = dialNumber("+497612034567");]]></screen>
556 556
     </para>
557 557
     <section id="ID-bd49dfdfc2284e87abd95fbce2d63cbd"><title>new(publicAccessPrefix,internationalPrefix,longDistancePrefix,countryCode,areaCode,pbxCode)</title>
558 558
       <para>
559
-	The new operator returns an object of this type and sets it's
559
+	The new operator returns an object of this type and sets its
560 560
 	locational context according to the passed parameters. See
561 561
 	<citerefentry>
562 562
 	<refentrytitle>OpenSER::Utils::PhoneNumbers</refentrytitle>
... ...
@@ -565,10 +565,9 @@ $number    = dialNumber("+497612034567");]]></screen>
565 565
     </section>
566 566
     <section id="ID-aa52786fee82fe6e26ac766b30a1a4fa"><title>canonicalForm( number [, context] )</title>
567 567
       <para>
568
-	Convert a phone number (given as first argument) into it's
569
-	canonical form. When no context is passed in as the second
570
-	argument, the default context from the systems configuration file
571
-	is used.
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.
572 571
       </para>
573 572
     </section>
574 573
     <section id="ID-31479dee3ae037c27cd7a84aa7358bd2"><title>dialNumber( number [, context] )</title>
... ...
@@ -785,6 +784,17 @@ my @rows = $ldap->search(
785 785
       </section>
786 786
     </section>
787 787
   </section>
788
+  <section id="ID-94fdb1e4103544a567ac38ee23c8a4d1"><title>OpenSER::VDB</title>
789
+    <para>
790
+      This package is an (abstract) base class for all virtual databases.
791
+      Derived packages can be configured to be used by OpenSER as a
792
+      database.
793
+    </para>
794
+    <para>
795
+      The base class itself should NOT be used in this context, as it does
796
+      not provide any functionality.
797
+    </para>
798
+  </section>
788 799
   <section id="ID-d97df315e2044f430319fc4cd9937aa5"><title>OpenSER::Constants</title>
789 800
     <para>
790 801
       This package provides a number of constants taken from enums and
... ...
@@ -793,4 +803,214 @@ my @rows = $ldap->search(
793 793
       are in doubt.
794 794
     </para>
795 795
   </section>
796
+  <section id="ID-9658bbad14831f685cca13a5c9bb4335"><title>OpenSER::VDB::Adapter::Speeddial</title>
797
+    <para>
798
+      This adapter can be used with the speeddial module.
799
+    </para>
800
+  </section>
801
+  <section id="ID-5cdb14839de18c32782e3d768e170da7"><title>OpenSER::VDB::Adapter::Alias</title>
802
+    <para>
803
+      This package is intended for usage with the alias_db module. The
804
+      query VTab has to take two arguments and return an array of two
805
+      arguments (user name/domain).
806
+    </para>
807
+    <section id="ID-748da8d11c20576948ef68d62753a06a"><title>query(conds,retkeys,order)</title>
808
+      <para>
809
+	Queries the vtab with the given arguments for request conditions,
810
+	keys to return and sort order column name.
811
+      </para>
812
+    </section>
813
+  </section>
814
+  <section id="ID-8165ac0b808b36ff72ee4032e0f62881"><title>OpenSER::VDB::Adapter::AccountingSIPtrace</title>
815
+    <para>
816
+      This package is an Adapter for the acc and siptrace modules,
817
+      featuring only an insert operation.
818
+    </para>
819
+  </section>
820
+  <section id="ID-048913e15394a9675cfe02af5c340528"><title>OpenSER::VDB::Adapter::Describe</title>
821
+    <para>
822
+      This package is intended for debug usage. It will print information
823
+      about requested functions and operations of a client module.
824
+    </para>
825
+    <para>
826
+      Use this module to request schema information when creating new
827
+      adapters.
828
+    </para>
829
+  </section>
830
+  <section id="ID-682dd320dd536e7fb0de4a24e9d1e46e"><title>OpenSER::VDB::Adapter::Auth</title>
831
+    <para>
832
+      This adapter is intended for usage with the auth_db module. The VTab
833
+      should take a username as an argument and return a (plain text!)
834
+      password.
835
+    </para>
836
+  </section>
837
+  <section id="ID-f245c032bf4b4837415c871537a63e3b"><title>OpenSER::VDB::ReqCond</title>
838
+    <para>
839
+      This package represents a request condition for database access,
840
+      consisting of a column name, an operator (=, &lt;, &gt;, ...), a data
841
+      type and a value.
842
+    </para>
843
+    <para>
844
+      This package inherits from OpenSER::VDB::Pair and thus includes its
845
+      methods.
846
+    </para>
847
+    <section id="ID-c50f7cee51ceffdb7253101a36d6b7b3"><title>new(key,op,type,name)</title>
848
+      <para>
849
+	Constructs a new Column object.
850
+      </para>
851
+    </section>
852
+    <section id="ID-cb5f02a3144f3af620484048b11472af"><title>op()</title>
853
+      <para>
854
+	Returns or sets the current operator.
855
+      </para>
856
+    </section>
857
+  </section>
858
+  <section id="ID-4be9a5fa03b11c2c2dad3594fc3b585d"><title>OpenSER::VDB::Pair</title>
859
+    <para>
860
+      This package represents database key/value pairs, consisting of a
861
+      key, a value type, and the value.
862
+    </para>
863
+    <para>
864
+      This package inherits from OpenSER::VDB::Value and thus has the same
865
+      methods.
866
+    </para>
867
+    <section id="ID-e6cc5b1a997ea8e29d2a00b986784dc0"><title>new(key,type,name)</title>
868
+      <para>
869
+	Constructs a new Column object.
870
+      </para>
871
+    </section>
872
+    <section id="ID-9c70856322a870405521ad299a6785d6"><title>key()</title>
873
+      <para>
874
+	Returns or sets the current key.
875
+      </para>
876
+    </section>
877
+  </section>
878
+  <section id="ID-41cd8a9b5b94c05139d2a7f62d5a967b"><title>OpenSER::VDB::VTab</title>
879
+    <para>
880
+      This package handles virtual tables and is used by the OpenSER::VDB
881
+      class to store information about valid tables. The package is not
882
+      inteded for end user access.
883
+    </para>
884
+    <section id="ID-a42ddb87d67983028cf8d1b7d6f46baa"><title>new()</title>
885
+      <screen><![CDATA[Constructs a new VTab object]]></screen>
886
+    </section>
887
+    <section id="ID-c00e2c0b9abc7cd56be59f2b051a538c"><title>call(op,[args])</title>
888
+      <para>
889
+	Invokes an operation on the table (insert, update, ...) with the
890
+	given arguments.
891
+      </para>
892
+    </section>
893
+  </section>
894
+  <section id="ID-dd87abbf6c21bba656e60f50bf1db81b"><title>OpenSER::VDB::Value</title>
895
+    <para>
896
+      This package represents a database value. Additional to the data
897
+      itself, information about its type is stored.
898
+    </para>
899
+    <section id="ID-f8210a055e2dc48b7cd31acfbe483ef9"><title>stringification</title>
900
+      <para>
901
+	When accessing a OpenSER::VDB::Value object as a string, it simply
902
+	returns its data regardless of its type. =cut
903
+      </para>
904
+      <para>
905
+	use strict;
906
+      </para>
907
+      <para>
908
+	package OpenSER::VDB::Value;
909
+      </para>
910
+      <para>
911
+	use overload '""' =&gt; \&amp;stringify;
912
+      </para>
913
+      <para>
914
+	sub stringify { shift-&gt;{data} }
915
+      </para>
916
+      <para>
917
+	use OpenSER; use OpenSER::Constants;
918
+      </para>
919
+      <para>
920