2
0
Эх сурвалжийг харах

perl: Perl packages renamed from OpenSER::* to Kamailio::*

- part of patch from Stoyan Mihaylov
Daniel-Constantin Mierla 12 жил өмнө
parent
commit
1be653e243

+ 8 - 8
modules_k/perl/lib/perl/Kamailio.pm

@@ -1,7 +1,7 @@
 #
 # $Id$
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,7 +23,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-package OpenSER;
+package Kamailio;
 require Exporter;
 require DynaLoader;
 
@@ -31,19 +31,19 @@ require DynaLoader;
 @EXPORT = qw ( t );
 @EXPORT_OK = qw ( log );
 
-use OpenSER::Message;
-use OpenSER::Constants;
-use OpenSER::Utils::Debug;
+use Kamailio::Message;
+use Kamailio::Constants;
+use Kamailio::Utils::Debug;
 
-bootstrap OpenSER;
+bootstrap Kamailio;
 
 
 BEGIN {
 	$SIG{'__DIE__'} = sub {
-		OpenSER::Message::log(undef, L_ERR, "perl error: $_[0]\n");
+		Kamailio::Message::log(undef, L_ERR, "perl error: $_[0]\n");
         };
 	$SIG{'__WARN__'} = sub {
-		OpenSER::Message::log(undef, L_ERR, "perl warning: $_[0]\n");
+		Kamailio::Message::log(undef, L_ERR, "perl warning: $_[0]\n");
         };
 }
 

+ 5 - 5
modules_k/perl/lib/perl/Kamailio/Constants.pm

@@ -1,7 +1,7 @@
 #
 # $Id$
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #		     (Bastian Friedrich <[email protected]>)
@@ -23,15 +23,15 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::Constants
+=head1 Kamailio::Constants
 
 This package provides a number of constants taken from enums and defines of
-OpenSER header files. Unfortunately, there is no mechanism for updating the
+Kamailio header files. Unfortunately, there is no mechanism for updating the
 constants automatically, so check the values if you are in doubt.
 
 =cut
 
-package OpenSER::Constants;
+package Kamailio::Constants;
 
 use Exporter;
 
@@ -54,7 +54,7 @@ BEGIN {
 
 ###########################################################
 ## Unfortunately, there are no "enum"s in Perl. The following blocks reflect
-## some C headers from OpenSER.
+## some C headers from Kamailio.
 ## UPDATE THIS FILE WHEN THESE HEADER FILES CHANGE!
 
 #####################

+ 7 - 7
modules_k/perl/lib/perl/Kamailio/LDAPUtils/LDAPConf.pm

@@ -1,7 +1,7 @@
 #
 # $Id$
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH 
 #                    (Bastian Friedrich <[email protected]>)
@@ -25,12 +25,12 @@
 
 # This file was kindly donated by Collax GmbH
 
-=head1 OpenSER::LDAPUtils::LDAPConf
+=head1 Kamailio::LDAPUtils::LDAPConf
 
-OpenSER::LDAPUtils::LDAPConf - Read openldap config from standard config files.
+Kamailio::LDAPUtils::LDAPConf - Read openldap config from standard config files.
 
- use OpenSER::LDAPUtils::LDAPConf;
- my $conf = new OpenSER::LDAPUtils::LDAPConf();
+ use Kamailio::LDAPUtils::LDAPConf;
+ my $conf = new Kamailio::LDAPUtils::LDAPConf();
 
 This module may be used to retrieve the global LDAP configuration as
 used by other LDAP software, such as C<nsswitch.ldap> and C<pam-ldap>.
@@ -40,7 +40,7 @@ When used from an account with sufficient privilegs (e.g. root), the
 ldap manager passwort is also retrieved.
 
 =cut
-package OpenSER::LDAPUtils::LDAPConf;
+package Kamailio::LDAPUtils::LDAPConf;
 
 my $def_ldap_path = "/etc/openldap" ;
 my $def_conf      = "ldap.conf";
@@ -48,7 +48,7 @@ my $def_secret    = "ldap.secret";
 
 =head2 Constructor new()
 
-Returns a new, initialized C<OpenSER::LDAPUtils::LDAPConf> object.
+Returns a new, initialized C<Kamailio::LDAPUtils::LDAPConf> object.
 
 =cut
 sub new {

+ 17 - 17
modules_k/perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm

@@ -1,7 +1,7 @@
 #
 # $Id$
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #		     (Bastian Friedrich <[email protected]>)
@@ -25,21 +25,21 @@
 
 # This file was kindly donated by Collax GmbH
 
-=head1 OpenSER::LDAPUtils::LDAPConnection
+=head1 Kamailio::LDAPUtils::LDAPConnection
 
-OpenSER::LDAPUtils::LDAPConnection - Perl module to perform simple LDAP queries.
+Kamailio::LDAPUtils::LDAPConnection - Perl module to perform simple LDAP queries.
 
 OO-Style interface:
 
-  use OpenSER::LDAPUtils::LDAPConnection;
-  my $ldap = new OpenSER::LDAPUtils::LDAPConnection;
+  use Kamailio::LDAPUtils::LDAPConnection;
+  my $ldap = new Kamailio::LDAPUtils::LDAPConnection;
   my @rows = $ldap-search("uid=andi","ou=people,ou=coreworks,ou=de");
 
 Procedural interface:
 
-  use OpenSER::LDAPUtils::LDAPConnection;
+  use Kamailio::LDAPUtils::LDAPConnection;
   my @rows = $ldap->search(
-  	new OpenSER::LDAPUtils::LDAPConfig(), "uid=andi","ou=people,ou=coreworks,ou=de");
+  	new Kamailio::LDAPUtils::LDAPConfig(), "uid=andi","ou=people,ou=coreworks,ou=de");
 
 This perl module offers a somewhat simplified interface to the C<Net::LDAP>
 functionality. It is intended for cases where just a few attributes should
@@ -47,9 +47,9 @@ be retrieved without the overhead of the full featured C<Net::LDAP>.
 
 =cut
 
-package OpenSER::LDAPUtils::LDAPConnection;
+package Kamailio::LDAPUtils::LDAPConnection;
 
-use OpenSER::LDAPUtils::LDAPConf;
+use Kamailio::LDAPUtils::LDAPConf;
 use Net::LDAP;
 use Authen::SASL;
 use UNIVERSAL qw( isa );
@@ -62,9 +62,9 @@ my $ldap_singleton = undef;
 Set up a new LDAP connection.
 
 The first argument, when given, should be a hash reference pointing
-to to the connection parameters, possibly an C<OpenSER::LDAPUtils::LDAPConfig>
+to to the connection parameters, possibly an C<Kamailio::LDAPUtils::LDAPConfig>
 object. This argument may be C<undef> in which case a new (default)
-C<OpenSER::LDAPUtils::LDAPConfig> object is used.
+C<Kamailio::LDAPUtils::LDAPConfig> object is used.
 
 When the optional second argument is a true value, the connection
 will be authenticated. Otherwise an anonymous bind is done.
@@ -79,7 +79,7 @@ sub new {
     my $doauth   = shift;
 
     if( ! defined( $conf ) ) {
-      $conf = new OpenSER::LDAPUtils::LDAPConf();
+      $conf = new Kamailio::LDAPUtils::LDAPConf();
     }
 
     #print STDERR "new ldap checks\n";
@@ -137,14 +137,14 @@ perform an ldap search, return the dn of the first matching
 directory entry, unless a specific attribute has been requested,
 in wich case the values(s) fot this attribute are returned.
 
-When the first argument (conf) is a C<OpenSER::LDAPUtils::LDAPConnection>, it
+When the first argument (conf) is a C<Kamailio::LDAPUtils::LDAPConnection>, it
 will be used to perform the queries. You can pass the first argument 
 implicitly by using the "method" syntax.
 
 Otherwise the C<conf> argument should be a reference to a hash 
 containing the connection setup parameters as contained in a 
-C<OpenSER::LDAPUtils::LDAPConf> object. In this mode, the
-C<OpenSER::LDAPUtils::LDAPConnection> from previous queries will be reused.
+C<Kamailio::LDAPUtils::LDAPConf> object. In this mode, the
+C<Kamailio::LDAPUtils::LDAPConnection> from previous queries will be reused.
 
 =head3 Arguments:
 
@@ -185,11 +185,11 @@ sub search {
 
     my $ldap = undef;
 
-    if( isa($conf ,"OpenSER::LDAPUtils::LDAPConnection") ) {
+    if( isa($conf ,"Kamailio::LDAPUtils::LDAPConnection") ) {
       $ldap = $conf;
     } else {
       if( ! $ldap_singleton ) {
-        $ldap_singleton = new OpenSER::LDAPUtils::LDAPConnection($conf);
+        $ldap_singleton = new Kamailio::LDAPUtils::LDAPConnection($conf);
       }
       return undef unless $ldap_singleton;
       $ldap = $ldap_singleton;

+ 7 - 7
modules_k/perl/lib/perl/Kamailio/Message.pm

@@ -1,7 +1,7 @@
 #
 # $Id$
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #		     (Bastian Friedrich <[email protected]>)
@@ -23,29 +23,29 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-package OpenSER::Message;
+package Kamailio::Message;
 require Exporter;
 require DynaLoader;
 
 our @ISA = qw(Exporter DynaLoader);
 our @EXPORT = qw ( t );
-bootstrap OpenSER;
+bootstrap Kamailio;
 
 sub AUTOLOAD{
 	use vars qw($AUTOLOAD);
 	my $a = $AUTOLOAD;
 	
-	$a =~ s/^OpenSER::Message:://;
+	$a =~ s/^Kamailio::Message:://;
 
 	my $l = scalar @_;
 	if ($l == 0) {
 		croak("Usage: $a(self, param1 = undef, param2 = undef)");
 	} elsif ($l == 1) {
-		return OpenSER::Message::moduleFunction(@_[0], $a);
+		return Kamailio::Message::moduleFunction(@_[0], $a);
 	} elsif ($l == 2) {
-		return OpenSER::Message::moduleFunction(@_[0], $a, @_[1]);
+		return Kamailio::Message::moduleFunction(@_[0], $a, @_[1]);
 	} elsif ($l == 3) {
-		return OpenSER::Message::moduleFunction(@_[0],
+		return Kamailio::Message::moduleFunction(@_[0],
 							$a, @_[1], @_[2]);
 	} else {
 		croak("Usage: $a(self, param1 = undef, param2 = undef)");

+ 5 - 5
modules_k/perl/lib/perl/Kamailio/Utils/Debug.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Debug.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,14 +23,14 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-package OpenSER::Utils::Debug;
+package Kamailio::Utils::Debug;
 
-use OpenSER qw ( log );
-use OpenSER::Constants;
+use Kamailio qw ( log );
+use Kamailio::Constants;
 
 #sub DESTROY {
 #	my $class = shift;
-#	OpenSER::log(OpenSER::Constants::L_CRIT, "perl/vdb:Debug:Dying object: $class\n");
+#	Kamailio::log(Kamailio::Constants::L_CRIT, "perl/vdb:Debug:Dying object: $class\n");
 #}
 
 1;

+ 7 - 7
modules_k/perl/lib/perl/Kamailio/Utils/PhoneNumbers.pm

@@ -1,7 +1,7 @@
 #
 # $Id$
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -26,13 +26,13 @@
 # This file was kindly donated by Collax GmbH
 
 
-=head1 OpenSER::Utils::PhoneNumbers
+=head1 Kamailio::Utils::PhoneNumbers
 
-OpenSER::Utils::PhoneNumbers - Functions for canonical forms of phone numbers.
+Kamailio::Utils::PhoneNumbers - Functions for canonical forms of phone numbers.
 
- use OpenSER::Utils::PhoneNumbers;
+ use Kamailio::Utils::PhoneNumbers;
 
- my $phonenumbers = new OpenSER::Utils::PhoneNumbers(
+ my $phonenumbers = new Kamailio::Utils::PhoneNumbers(
       publicAccessPrefix => "0",
       internationalPrefix => "+",
       longDistancePrefix => "0",
@@ -81,7 +81,7 @@ This module exports the following functions when C<use>ed:
 
 =cut
 
-package OpenSER::Utils::PhoneNumbers;
+package Kamailio::Utils::PhoneNumbers;
 
 use Exporter;
 our @ISA = qw(Exporter);
@@ -94,7 +94,7 @@ our @EXPORT = qw(
 
 The new operator returns an object of this type and sets its locational
 context according to the passed parameters. See
-L<OpenSER::Utils::PhoneNumbers> above.
+L<Kamailio::Utils::PhoneNumbers> above.
 
 =cut
 

+ 24 - 24
modules_k/perl/lib/perl/Kamailio/VDB.pm

@@ -1,7 +1,7 @@
 #
 # $Id: VDB.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,31 +23,31 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB
+=head1 Kamailio::VDB
 
 This package is an (abstract) base class for all virtual databases. Derived
-packages can be configured to be used by OpenSER as a database.
+packages can be configured to be used by Kamailio as a database.
 
 The base class itself should NOT be used in this context, as it does not
 provide any functionality.
 
 =cut
 
-package OpenSER::VDB;
+package Kamailio::VDB;
 
-use OpenSER;
-use OpenSER::Constants;
+use Kamailio;
+use Kamailio::Constants;
 
-use OpenSER::VDB::Column;
-use OpenSER::VDB::Pair;
-use OpenSER::VDB::ReqCond;
-use OpenSER::VDB::Result;
-use OpenSER::VDB::Value;
-use OpenSER::VDB::VTab;
+use Kamailio::VDB::Column;
+use Kamailio::VDB::Pair;
+use Kamailio::VDB::ReqCond;
+use Kamailio::VDB::Result;
+use Kamailio::VDB::Value;
+use Kamailio::VDB::VTab;
 
 use UNIVERSAL qw ( can );
 
-our @ISA = qw ( OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::Utils::Debug );
 
 sub new {
 	my $class = shift;
@@ -85,22 +85,22 @@ sub use_table {
 			$pkg = $2;
 		}
 
-		OpenSER::log(L_DBG, "perlvdb:VDB: Setting VTab: v is $v (pkg is $pkg, func/method is $3)\n");
+		Kamailio::log(L_DBG, "perlvdb:VDB: Setting VTab: v is $v (pkg is $pkg, func/method is $3)\n");
 
 		if (can($pkg, $3)) {
-			$self->{vtabs}->{$v} = new OpenSER::VDB::VTab( func => $pkg . "::" . $3);
+			$self->{vtabs}->{$v} = new Kamailio::VDB::VTab( func => $pkg . "::" . $3);
 		} elsif (can($v, "init")) {
 			$v->init();
-			$self->{vtabs}->{$v} = new OpenSER::VDB::VTab( obj => $v );
+			$self->{vtabs}->{$v} = new Kamailio::VDB::VTab( obj => $v );
 		} elsif (can($v, "new")) {
 			my $obj = $v->new();
-			$self->{vtabs}->{$v} = new OpenSER::VDB::VTab( obj => $obj );
+			$self->{vtabs}->{$v} = new Kamailio::VDB::VTab( obj => $obj );
 		} else {
-			OpenSER::log(L_ERR, "perlvdb:VDB: Invalid virtual table.\n");
+			Kamailio::log(L_ERR, "perlvdb:VDB: Invalid virtual table.\n");
 			return -1;
 		}
 	} else {
-		OpenSER::log(L_ERR, "perlvdb:VDB: Invalid virtual table.\n");
+		Kamailio::log(L_ERR, "perlvdb:VDB: Invalid virtual table.\n");
 		return -1;
 	}
 }
@@ -133,27 +133,27 @@ sub _query {
 
 
 sub insert {
-	OpenSER::log(L_INFO, "perlvdb:Insert not implemented in base class.\n");
+	Kamailio::log(L_INFO, "perlvdb:Insert not implemented in base class.\n");
 	return -1;
 }
 
 sub replace {
-	OpenSER::log(L_INFO, "perlvdb:Replace not implemented in base class.\n");
+	Kamailio::log(L_INFO, "perlvdb:Replace not implemented in base class.\n");
 	return -1;
 }
 
 sub delete {
-	OpenSER::log(L_INFO, "perlvdb:Delete not implemented in base class.\n");
+	Kamailio::log(L_INFO, "perlvdb:Delete not implemented in base class.\n");
 	return -1;
 }
 
 sub update {
-	OpenSER::log(L_INFO, "perlvdb:Update not implemented in base class.\n");
+	Kamailio::log(L_INFO, "perlvdb:Update not implemented in base class.\n");
 	return -1;
 }
 
 sub query {
-	OpenSER::log(L_INFO, "perlvdb:Query not implemented in base class.\n");
+	Kamailio::log(L_INFO, "perlvdb:Query not implemented in base class.\n");
 	return -1;
 }
 

+ 8 - 8
modules_k/perl/lib/perl/Kamailio/VDB/Adapter/AccountingSIPtrace.pm

@@ -1,7 +1,7 @@
 #
 # $Id: AccountingSIPtrace.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,22 +23,22 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Adapter::AccountingSIPtrace
+=head1 Kamailio::VDB::Adapter::AccountingSIPtrace
 
 This package is an Adapter for the acc and siptrace modules, featuring
 only an insert operation.
 
 =cut
 
-package OpenSER::VDB::Adapter::AccountingSIPtrace;
+package Kamailio::VDB::Adapter::AccountingSIPtrace;
 
-use OpenSER::VDB;
-use OpenSER::VDB::VTab;
-use OpenSER;
-use OpenSER::Constants;
+use Kamailio::VDB;
+use Kamailio::VDB::VTab;
+use Kamailio;
+use Kamailio::Constants;
 use Data::Dumper;
 
-our @ISA = qw ( OpenSER::VDB );
+our @ISA = qw ( Kamailio::VDB );
 
 sub insert {
 	my $self = shift;

+ 15 - 15
modules_k/perl/lib/perl/Kamailio/VDB/Adapter/Alias.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Alias.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,25 +23,25 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Adapter::Alias
+=head1 Kamailio::VDB::Adapter::Alias
 
 This package is intended for usage with the alias_db module. The query VTab
 has to take two arguments and return an array of two arguments (user name/domain).
 
 =cut
 
-package OpenSER::VDB::Adapter::Alias;
+package Kamailio::VDB::Adapter::Alias;
 
-use OpenSER::Constants;
-use OpenSER qw ( log );
+use Kamailio::Constants;
+use Kamailio qw ( log );
 
-use OpenSER::VDB;
-use OpenSER::VDB::Column;
-use OpenSER::VDB::Result;
+use Kamailio::VDB;
+use Kamailio::VDB::Column;
+use Kamailio::VDB::Result;
 
 use Data::Dumper;
 
-our @ISA = qw ( OpenSER::VDB );
+our @ISA = qw ( Kamailio::VDB );
 
 =head2 query(conds,retkeys,order)
 
@@ -78,18 +78,18 @@ sub query {
 	
 	my $result;
 
-	push @cols, new OpenSER::VDB::Column(DB_STRING, "username");
-	push @cols, new OpenSER::VDB::Column(DB_STRING, "domain");
+	push @cols, new Kamailio::VDB::Column(DB_STRING, "username");
+	push @cols, new Kamailio::VDB::Column(DB_STRING, "domain");
 
 	if ($newaddr) {
 		my @row;
-		my $resval1 = new OpenSER::VDB::Value(DB_STRING, $newaddr->{username} );
+		my $resval1 = new Kamailio::VDB::Value(DB_STRING, $newaddr->{username} );
 		push @row, $resval1;
-		my $resval2 = new OpenSER::VDB::Value(DB_STRING, $newaddr->{domain} );
+		my $resval2 = new Kamailio::VDB::Value(DB_STRING, $newaddr->{domain} );
 		push @row, $resval2;
-		$result = new OpenSER::VDB::Result(\@cols, (bless \@row, "OpenSER::Utils::Debug"));
+		$result = new Kamailio::VDB::Result(\@cols, (bless \@row, "Kamailio::Utils::Debug"));
 	} else {
-		$result = new OpenSER::VDB::Result(\@cols);
+		$result = new Kamailio::VDB::Result(\@cols);
 	}
 
 	return $result;

+ 15 - 15
modules_k/perl/lib/perl/Kamailio/VDB/Adapter/Auth.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Auth.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,7 +23,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Adapter::Auth
+=head1 Kamailio::VDB::Adapter::Auth
 
 This adapter is intended for usage with the auth_db module.
 The VTab should take a username as an argument and return a (plain text!)
@@ -31,19 +31,19 @@ password.
 
 =cut
 
-package OpenSER::VDB::Adapter::Auth;
+package Kamailio::VDB::Adapter::Auth;
 
-use OpenSER::Constants;
-use OpenSER qw ( log );
+use Kamailio::Constants;
+use Kamailio qw ( log );
 
-use OpenSER::VDB;
-use OpenSER::VDB::Column;
-use OpenSER::VDB::Result;
-use OpenSER::VDB::Adapter::TableVersions;
+use Kamailio::VDB;
+use Kamailio::VDB::Column;
+use Kamailio::VDB::Result;
+use Kamailio::VDB::Adapter::TableVersions;
 
 use Data::Dumper;
 
-our @ISA = qw ( OpenSER::VDB );
+our @ISA = qw ( Kamailio::VDB );
 
 sub query {
 	my $self = shift;
@@ -58,7 +58,7 @@ sub query {
 	my $password = undef;
 
 	if ($self->{tablename} eq "version") {
-		return OpenSER::VDB::Adapter::TableVersions::version(@$conds[0]->data());
+		return Kamailio::VDB::Adapter::TableVersions::version(@$conds[0]->data());
 	}
 		
 	if ((scalar @$conds != 1) || (scalar @$retkeys != 2)) {
@@ -71,7 +71,7 @@ sub query {
 	}
 
 	for my $k (@$retkeys) {
-		push @cols, new OpenSER::VDB::Column(DB_STRING, $k);
+		push @cols, new Kamailio::VDB::Column(DB_STRING, $k);
 	}
 
 	my $vtab = $self->{vtabs}->{$self->{tablename}};
@@ -81,11 +81,11 @@ sub query {
 
 	if ($password) {
 		my @row;
-		push @row, new OpenSER::VDB::Value(DB_STRING, $password);
+		push @row, new Kamailio::VDB::Value(DB_STRING, $password);
 		push @row, undef;
-		$result = new OpenSER::VDB::Result(\@cols, (bless \@row, "OpenSER::Utils::Debug"));
+		$result = new Kamailio::VDB::Result(\@cols, (bless \@row, "Kamailio::Utils::Debug"));
 	} else {
-		$result = new OpenSER::VDB::Result(\@cols);
+		$result = new Kamailio::VDB::Result(\@cols);
 	}
 
 	return $result;

+ 11 - 11
modules_k/perl/lib/perl/Kamailio/VDB/Adapter/Describe.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Describe.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,7 +23,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Adapter::Describe
+=head1 Kamailio::VDB::Adapter::Describe
 
 This package is intended for debug usage. It will print information about requested
 functions and operations of a client module.
@@ -32,18 +32,18 @@ Use this module to request schema information when creating new adapters.
 
 =cut
 
-package OpenSER::VDB::Adapter::Describe;
+package Kamailio::VDB::Adapter::Describe;
 
-use OpenSER::Constants;
-use OpenSER qw ( log );
+use Kamailio::Constants;
+use Kamailio qw ( log );
 
-use OpenSER::VDB;
-use OpenSER::VDB::Column;
-use OpenSER::VDB::Result;
+use Kamailio::VDB;
+use Kamailio::VDB::Column;
+use Kamailio::VDB::Result;
 
 use Data::Dumper;
 
-our @ISA = qw ( OpenSER::VDB );
+our @ISA = qw ( Kamailio::VDB );
 
 sub use_table {
 	my $self = shift;
@@ -132,12 +132,12 @@ sub query {
 
 	for my $k (@$retkeys) {
 		$keys_descr .= " ($k)";
-		push @cols, new OpenSER::VDB::Column(DB_STRING, $k);
+		push @cols, new Kamailio::VDB::Column(DB_STRING, $k);
 	}
 	log(L_INFO, "perlvdb:Describe: The following keys were requested: $keys_descr\n");
 	log(L_INFO, "perlvdb:Describe: Order requested: '$order'\n");
 
-	return new OpenSER::VDB::Result(\@cols);
+	return new Kamailio::VDB::Result(\@cols);
 }
 
 1;

+ 13 - 13
modules_k/perl/lib/perl/Kamailio/VDB/Adapter/Speeddial.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Speeddial.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,22 +23,22 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Adapter::Speeddial
+=head1 Kamailio::VDB::Adapter::Speeddial
 
 This adapter can be used with the speeddial module.
 
 =cut
 
-package OpenSER::VDB::Adapter::Speeddial;
+package Kamailio::VDB::Adapter::Speeddial;
 
-use OpenSER::Constants;
-use OpenSER qw ( log );
+use Kamailio::Constants;
+use Kamailio qw ( log );
 
-use OpenSER::VDB;
-use OpenSER::VDB::Column;
-use OpenSER::VDB::Result;
+use Kamailio::VDB;
+use Kamailio::VDB::Column;
+use Kamailio::VDB::Result;
 
-our @ISA = qw ( OpenSER::VDB );
+our @ISA = qw ( Kamailio::VDB );
 
 sub query {
 	my $self = shift;
@@ -66,14 +66,14 @@ sub query {
 	
 	my $result;
 
-	push @cols, new OpenSER::VDB::Column(DB_STRING, "uid_name");
+	push @cols, new Kamailio::VDB::Column(DB_STRING, "uid_name");
 
 	if ($newaddr) {
-		my $resval = new OpenSER::VDB::Value(DB_STRING, $newaddr );
+		my $resval = new Kamailio::VDB::Value(DB_STRING, $newaddr );
 		push my @row, $resval;
-		$result = new OpenSER::VDB::Result(\@cols, (bless \@row, "OpenSER::Utils::Debug"));
+		$result = new Kamailio::VDB::Result(\@cols, (bless \@row, "Kamailio::Utils::Debug"));
 	} else {
-		$result = new OpenSER::VDB::Result(\@cols);
+		$result = new Kamailio::VDB::Result(\@cols);
 	}
 
 	return $result;

+ 7 - 7
modules_k/perl/lib/perl/Kamailio/VDB/Adapter/TableVersions.pm

@@ -1,7 +1,7 @@
 #
 # $Id: TableVersions.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2007 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,10 +23,10 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-package OpenSER::VDB::Adapter::TableVersions;
+package Kamailio::VDB::Adapter::TableVersions;
 
-use OpenSER;
-use OpenSER::Constants;
+use Kamailio;
+use Kamailio::Constants;
 
 sub version {
 	my $table = shift;
@@ -37,10 +37,10 @@ sub version {
 	my @cols;
 	my @row;
 
-	push @cols, new OpenSER::VDB::Column(DB_INT, "table_version");
-	push @row, new OpenSER::VDB::Value(DB_INT, $v);
+	push @cols, new Kamailio::VDB::Column(DB_INT, "table_version");
+	push @row, new Kamailio::VDB::Value(DB_INT, $v);
 	
-	return new OpenSER::VDB::Result(\@cols, (bless \@row, OpenSER::Utils::Debug));
+	return new Kamailio::VDB::Result(\@cols, (bless \@row, Kamailio::Utils::Debug));
 }
 
 1;

+ 8 - 8
modules_k/perl/lib/perl/Kamailio/VDB/Column.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Column.pm 852 2007-03-01 20:32:37Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,27 +23,27 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Column
+=head1 Kamailio::VDB::Column
 
 This package represents database column definition, consisting of a 
 column name and its data type.
 
 =head2 Stringification
 
-When accessing a OpenSER::VDB::Column object as a string, it simply returns its 
+When accessing a Kamailio::VDB::Column object as a string, it simply returns its 
 column name regardless of its type.
 =cut
 
-package OpenSER::VDB::Column;
+package Kamailio::VDB::Column;
 
 use overload '""' => \&stringify;
 
 sub stringify { shift->{name} }
 
-use OpenSER;
-use OpenSER::Constants;
+use Kamailio;
+use Kamailio::Constants;
 
-our @ISA = qw ( OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::Utils::Debug );
 
 =head2 new(type,name)
 
@@ -71,7 +71,7 @@ sub new {
 =head2 type( )
 
 Returns or sets the current type. Please consider using the constants
-from OpenSER::Constants
+from Kamailio::Constants
 
 =cut
 

+ 7 - 7
modules_k/perl/lib/perl/Kamailio/VDB/Pair.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Pair.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,20 +23,20 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Pair
+=head1 Kamailio::VDB::Pair
 
 This package represents database key/value pairs, consisting of a 
 key, a value type, and the value.
 
-This package inherits from OpenSER::VDB::Value and thus has the same methods.
+This package inherits from Kamailio::VDB::Value and thus has the same methods.
 
 =cut
 
-package OpenSER::VDB::Pair;
+package Kamailio::VDB::Pair;
 
-use OpenSER::VDB::Value;
+use Kamailio::VDB::Value;
 
-our @ISA = qw ( OpenSER::VDB::Value OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::VDB::Value Kamailio::Utils::Debug );
 
 =head2 new(key,type,name)
 
@@ -50,7 +50,7 @@ sub new {
 	my $type = shift;
 	my $data = shift;
 
-	my $self = new OpenSER::VDB::Value($type, $data);
+	my $self = new Kamailio::VDB::Value($type, $data);
 
 	bless $self, $class;
 

+ 8 - 8
modules_k/perl/lib/perl/Kamailio/VDB/ReqCond.pm

@@ -1,7 +1,7 @@
 #
 # $Id: ReqCond.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,21 +23,21 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::ReqCond
+=head1 Kamailio::VDB::ReqCond
 
 This package represents a request condition for database access, consisting of a 
 column name, an operator (=, <, >, ...), a data type and a value.
 
-This package inherits from OpenSER::VDB::Pair and thus includes its methods.
+This package inherits from Kamailio::VDB::Pair and thus includes its methods.
 
 =cut
 
-package OpenSER::VDB::ReqCond;
+package Kamailio::VDB::ReqCond;
 
-use OpenSER::VDB::Value;
-use OpenSER::VDB::Pair;
+use Kamailio::VDB::Value;
+use Kamailio::VDB::Pair;
 
-our @ISA = qw ( OpenSER::VDB::Pair OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::VDB::Pair Kamailio::Utils::Debug );
 
 =head2 new(key,op,type,name)
 
@@ -52,7 +52,7 @@ sub new {
 	my $type = shift;
 	my $data = shift;
 
-	my $self = new OpenSER::VDB::Pair($key, $type, $data);
+	my $self = new Kamailio::VDB::Pair($key, $type, $data);
 
 	bless $self, $class;
 

+ 7 - 7
modules_k/perl/lib/perl/Kamailio/VDB/Result.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Result.pm 852 2007-03-01 20:32:37Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -25,7 +25,7 @@
 
 use strict;
 
-=head2 OpenSER::VDB::Result
+=head2 Kamailio::VDB::Result
 
 This class represents a VDB result set. It contains a
 column definition, plus an array of rows.
@@ -33,18 +33,18 @@ Rows themselves are simply references to arrays of scalars.
 
 =cut
 
-package OpenSER::VDB::Result;
+package Kamailio::VDB::Result;
 
-use OpenSER;
-use OpenSER::VDB::Column;
+use Kamailio;
+use Kamailio::VDB::Column;
 
-our @ISA = qw ( OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::Utils::Debug );
 
 =head2 new(coldefs,[row, row, ...])
 
 The constructor creates a new Result object.
 Its first parameter is a reference to an array of
- OpenSER::VDB::Column objects.
+ Kamailio::VDB::Column objects.
 Additional parameters may be passed to provide initial rows, which
 are references to arrays of scalars.
 

+ 6 - 6
modules_k/perl/lib/perl/Kamailio/VDB/VTab.pm

@@ -1,7 +1,7 @@
 #
 # $Id: VTab.pm 757 2007-01-05 10:56:28Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,18 +23,18 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::VTab
+=head1 Kamailio::VDB::VTab
 
-This package handles virtual tables and is used by the OpenSER::VDB class to store
+This package handles virtual tables and is used by the Kamailio::VDB class to store
 information about valid tables. The package is not inteded for end user access.
 
 =cut
 
-package OpenSER::VDB::VTab;
+package Kamailio::VDB::VTab;
 
-use OpenSER;
+use Kamailio;
 
-our @ISA = qw ( OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::Utils::Debug );
 
 =head2 new()
 

+ 8 - 8
modules_k/perl/lib/perl/Kamailio/VDB/Value.pm

@@ -1,7 +1,7 @@
 #
 # $Id: Value.pm 852 2007-03-01 20:32:37Z bastian $
 #
-# Perl module for OpenSER
+# Perl module for Kamailio
 #
 # Copyright (C) 2006 Collax GmbH
 #                    (Bastian Friedrich <[email protected]>)
@@ -23,29 +23,29 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-=head1 OpenSER::VDB::Value
+=head1 Kamailio::VDB::Value
 
 This package represents a database value. Additional to the data itself,
 information about its type is stored.
 
 =head2 stringification
 
-When accessing a OpenSER::VDB::Value object as a string, it simply returns its data
+When accessing a Kamailio::VDB::Value object as a string, it simply returns its data
 regardless of its type.
 =cut
 
 use strict;
 
-package OpenSER::VDB::Value;
+package Kamailio::VDB::Value;
 
 use overload '""' => \&stringify;
 
 sub stringify { shift->{data} }
 
-use OpenSER;
-use OpenSER::Constants;
+use Kamailio;
+use Kamailio::Constants;
 
-our @ISA = qw ( OpenSER::Utils::Debug );
+our @ISA = qw ( Kamailio::Utils::Debug );
 
 =head2 new(type,data)
 
@@ -73,7 +73,7 @@ sub new {
 =head2 type()
 
 Returns or sets the current data type. Please consider using the constants
-from OpenSER::Constants
+from Kamailio::Constants
 
 =cut