Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Asterisk::CDR
Perl extension for accessing Asterisk CDRs stored in a database as objects

Asterisk::CDR - Perl extension for accessing Asterisk CDRs stored in a database as objects


NAME

Asterisk::CDR - Perl extension for accessing Asterisk CDRs stored in a database as objects


SYNOPSIS


 use Asterisk::CDR;

 Asterisk::CDR->init_db(

                        dsn => 'dbi:mysql:database',

                        username => 'username',

                        password => 'password'

                       );

 my @cdrs = Asterisk::CDR->search(userfield => 'some data');


DESCRIPTION

Asterisk::CDR is a Perl module for accessing Asterisk CDRs stored in a dabatase as objects. It inherits all but one of its useful methods from Class::DBI.

Database information is supplied as a list to the init_db() class method. A DBI data source string, username and password must be supplied. By default, Asterisk::CDR will use cdr as the table and the standard columns expected by Asterisk's cdr_odbc module. Both the table name and the columns can be overriden by specifiying them when calling init_db():


 use Asterisk::CDR;

 Asterisk::CDR->init_db (

                         dsn => 'dbi:mysql:database',

                         username => 'username',

                         password => 'password',

                         table => 'my_cdrs',

                         columns => \@my_columns

                        );

After init_db() is called, Class::DBI methods may be called to retrieve CDRs as objects:


 my @cdrs = Asterisk::CDR->retrieve(src => '5555551212'); # Retrieve CDRs originating from 555-555-1212


SEE ALSO

the Class::DBI manpage, Asterisk cdr odbc (http://www.voip-info.org/wiki/view/Asterisk+cdr+odbc)


AUTHOR

Jason Bodnar, <jbodnar@gnumber.com>


COPYRIGHT AND LICENSE

Copyright (C) 2006 by Jason Bodnar, gNumber, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy