19
19
<LINK REL="STYLESHEET" HREF="asterisk.css">
21
21
<LINK REL="next" HREF="node222.html">
22
<LINK REL="previous" HREF="node220.html">
23
<LINK REL="up" HREF="node216.html">
22
<LINK REL="previous" HREF="node218.html">
23
<LINK REL="up" HREF="node217.html">
24
24
<LINK REL="next" HREF="node222.html">
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
30
<A NAME="tex2html3546"
30
<A NAME="tex2html3549"
31
31
HREF="node222.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
33
33
SRC="/usr/share/latex2html/icons/next.png"></A>
34
<A NAME="tex2html3542"
34
<A NAME="tex2html3545"
36
36
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
37
37
SRC="/usr/share/latex2html/icons/up.png"></A>
38
<A NAME="tex2html3536"
38
<A NAME="tex2html3539"
39
39
HREF="node220.html">
40
40
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
41
41
SRC="/usr/share/latex2html/icons/prev.png"></A>
42
<A NAME="tex2html3544"
42
<A NAME="tex2html3547"
44
44
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
45
45
SRC="/usr/share/latex2html/icons/contents.png"></A>
47
<B> Next:</B> <A NAME="tex2html3547"
48
HREF="node222.html">SQLite 2</A>
49
<B> Up:</B> <A NAME="tex2html3543"
50
HREF="node216.html">Storage Backends</A>
51
<B> Previous:</B> <A NAME="tex2html3537"
52
HREF="node220.html">MySQL</A>
53
<B> <A NAME="tex2html3545"
47
<B> Next:</B> <A NAME="tex2html3550"
48
HREF="node222.html">PostgreSQL</A>
49
<B> Up:</B> <A NAME="tex2html3546"
50
HREF="node217.html">Storage Backends</A>
51
<B> Previous:</B> <A NAME="tex2html3540"
52
HREF="node220.html">TDS, using cdr_tds</A>
53
<B> <A NAME="tex2html3548"
54
54
HREF="node1.html">Contents</A></B>
57
57
<!--End of Navigation Panel-->
59
<H2><A NAME="SECTION001143000000000000000">
59
<H2><A NAME="SECTION001142000000000000000">
62
If you want to go directly to postgresql database, and have the cdr_pgsql.so
63
compiled you can use the following sample setup.
64
On Debian, before compiling asterisk, just install libpqxx-dev.
65
Other distros will likely have a similiar package.
68
Once you have the compile done,
69
copy the sample cdr_pgsql.conf file or create your own.
76
/etc/asterisk/cdr_pgsql.conf
77
; Sample Asterisk config file for CDR logging to PostgresSQL
85
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
87
</UL> Now create a table in postgresql for your cdrs
92
calldate time NOT NULL ,
93
clid varchar (80) NOT NULL ,
94
src varchar (80) NOT NULL ,
95
dst varchar (80) NOT NULL ,
96
dcontext varchar (80) NOT NULL ,
97
channel varchar (80) NOT NULL ,
98
dstchannel varchar (80) NOT NULL ,
99
lastapp varchar (80) NOT NULL ,
100
lastdata varchar (80) NOT NULL ,
101
duration int NOT NULL ,
102
billsec int NOT NULL ,
103
disposition varchar (45) NOT NULL ,
104
amaflags int NOT NULL ,
105
accountcode varchar (20) NOT NULL ,
106
uniqueid varchar (150) NOT NULL ,
107
userfield varchar (255) NOT NULL
109
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
64
Using MySQL for CDR records is supported by using ODBC and the cdr_odbc module.