No subject


Fri Sep 2 03:59:05 CDT 2011


load =3D> cdr_addon_mysql.so

Or it is required only for old asterisk version?


Appreciate ur kindly help.
Regards
Bilal


> ------------------------------

>=20
> The following script will generate an "asterisk" database
> with a table named
> "CDR" that will work with asterisk 1.8.=A0 Be sure to
> change 'PASSWORD' with
> whatever password you want to use.
>=20
> SET SQL_MODE=3D"NO_AUTO_VALUE_ON_ZERO";
> CREATE DATABASE `asterisk` DEFAULT CHARACTER SET latin1
> COLLATE
> latin1_swedish_ci;
> USE `asterisk`;
>=20
> CREATE TABLE IF NOT EXISTS `cdr` (
> `recid` mediumint(8) unsigned NOT NULL auto_increment
> COMMENT 'Record ID',
> `calldate` datetime NOT NULL default '0000-00-00
> 00:00:00',
> `clid` varchar(80) NOT NULL default '',
> `src` varchar(80) NOT NULL default '',
> `dst` varchar(80) NOT NULL default '',
> `dcontext` varchar(80) NOT NULL default '',
> `channel` varchar(80) NOT NULL default '',
> `dstchannel` varchar(80) NOT NULL default '',
> `lastapp` varchar(80) NOT NULL default '',
> `lastdata` varchar(80) NOT NULL default '',
> `duration` int(11) NOT NULL default '0',
> `billsec` int(11) NOT NULL default '0',
> `disposition` varchar(45) NOT NULL default '',
> `amaflags` int(11) NOT NULL default '0',
> `accountcode` varchar(20) NOT NULL default '',
> `uniqueid` varchar(32) NOT NULL default '',
> `userfield` varchar(255) NOT NULL default '',
> PRIMARY KEY=A0 (`recid`),
> KEY `calldate` (`calldate`),
> KEY `dst` (`dst`),
> KEY `accountcode` (`accountcode`),
> KEY `src` (`src`),
> KEY `disposition` (`disposition`),
> KEY `uniqueid` (`uniqueid`)
> ) ENGINE=3DInnoDB DEFAULT CHARSET=3Dlatin1 AUTO_INCREMENT=3D1 ;
>=20
> CREATE USER 'asterisk'@'localhost' IDENTIFIED BY
> 'PASSWORD';
> GRANT FILE ON * . * TO 'asterisk'@'localhost' IDENTIFIED BY
> 'PASSWORD'
> WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
> MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
> GRANT INSERT ON `asterisk`.`cdr` TO
> 'asterisk'@'localhost';
>=20
>=20
> If you're going to be running the mysql database on the
> same server as the
> asterisk box, the following cdr_mysql.conf should also work
> for 1.8:
>=20
> [global]
> hostname=3Dlocalhost
> dbname=3Dasterisk
> table=3Dcdr
> password=3DPASSWORD
> user=3Dasterisk
> port=3D3306
> sock=3D/var/lib/mysql/mysql.sock
> userfield=3D1
> loguniqueid=3Dyes
>=20
>=20
> --=20
> Thanks,
> --Warren Selby, dCAP



More information about the asterisk-users mailing list