[Asterisk-Users] cdr Logging - Postgresql

Joseph tech at ekn.com
Thu Oct 14 03:40:21 MST 2004


I am seting up to log cdr records via the postgresql module
and have suggestion:

Would it not be nice to have an option in the config file that
lets you specify the table name?

Also, here is the table creation that I used to make the table in 
postgresql in case it would help anyone else:
Or perhaps someone else can improve on it.

CREATE TABLE cdr (
	calldate      text              NOT NULL ,
	clid          varchar(80)          NOT NULL ,
	src           varchar(80)          NOT NULL ,
	dst           varchar(80)          NOT NULL ,
	dcontext      varchar(80)          NOT NULL ,
	channel       varchar(80)          NOT NULL ,
	dstchannel    varchar(80)          NOT NULL ,
	lastapp       varchar(80)          NOT NULL ,
	lastdata      varchar(80)          NOT NULL ,
	duration      int                   NOT NULL ,
	billsec       int                   NOT NULL ,
	disposition   varchar(45)          NOT NULL ,
	amaflags      int                   NOT NULL ,
	accountcode   varchar(20)          NOT NULL ,
	uniqueid      varchar(32)          NOT NULL ,
	userfield     varchar(255)         NOT NULL
)

-- 

respectfully, Joseph
--------------------



More information about the asterisk-users mailing list