~damg/ubuntu/quantal/asterisk/LP1097687

« back to all changes in this revision

Viewing changes to doc/tex/asterisk/node221.html

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-10-15 22:24:34 UTC
  • mfrom: (1.2.8 upstream) (8.3.8 sid)
  • Revision ID: james.westby@ubuntu.com-20101015222434-iy328q8in3lajzlv
Tags: 1:1.6.2.9-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control:
    + Build-depend on hardening-wrapper
    + Change Maintainer
    + Removed Uploaders field.
    + Removed Debian Vcs-Svn entry and replaced with ubuntu-voip Vcs-Bzr,
      to reflect divergence in packages.
  - debian/rules: Make use of hardening-wrapper
  - debian/asterisk.init: chown /dev/dahdi
  - debian/backports/hardy: add file
  - debian/backports/asterisk.init.hardy: add file
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8
8
<HTML>
9
9
<HEAD>
10
 
<TITLE>PostgreSQL</TITLE>
11
 
<META NAME="description" CONTENT="PostgreSQL">
 
10
<TITLE>MySQL</TITLE>
 
11
<META NAME="description" CONTENT="MySQL">
12
12
<META NAME="keywords" CONTENT="asterisk">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
19
19
<LINK REL="STYLESHEET" HREF="asterisk.css">
20
20
 
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">
25
25
</HEAD>
26
26
 
27
27
<BODY >
28
28
 
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"
35
 
  HREF="node216.html">
 
34
<A NAME="tex2html3545"
 
35
  HREF="node217.html">
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"
43
43
  HREF="node1.html">
44
44
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
45
45
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
46
46
<BR>
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
 
 &nbsp; <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
 &nbsp; <B>  <A NAME="tex2html3548"
54
54
  HREF="node1.html">Contents</A></B> 
55
55
<BR>
56
56
<BR></DIV>
57
57
<!--End of Navigation Panel-->
58
58
 
59
 
<H2><A NAME="SECTION001143000000000000000">
60
 
PostgreSQL</A>
 
59
<H2><A NAME="SECTION001142000000000000000">
 
60
MySQL</A>
61
61
</H2>
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.
66
 
 
67
 
<P>
68
 
Once you have the compile done,
69
 
        copy the sample cdr_pgsql.conf file or create your own.
70
 
 
71
 
<P>
72
 
Here is a sample:
73
 
</B></SMALL>
74
 
<UL>
75
 
<LI><PRE>
76
 
        /etc/asterisk/cdr_pgsql.conf
77
 
          ; Sample Asterisk config file for CDR logging to PostgresSQL
78
 
          [global]
79
 
          hostname=localhost
80
 
          port=5432
81
 
          dbname=asterisk
82
 
          password=password
83
 
          user=postgres
84
 
          table=cdr
85
 
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
86
 
</LI>
87
 
</UL>        Now create a table in postgresql for your cdrs
88
 
</B></SMALL>
89
 
<UL>
90
 
<LI><PRE>
91
 
        CREATE TABLE cdr (
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
108
 
        );
109
 
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
110
 
</LI>
111
 
</UL>
 
62
 
 
63
<P>
 
64
Using MySQL for CDR records is supported by using ODBC and the cdr_odbc module.
 
65
 
112
66
<P>
113
67
<BR><HR>
114
68
<ADDRESS>
115
69
lmadsen
116
 
2010-05-03
 
70
2010-06-17
117
71
</ADDRESS>
118
72
</BODY>
119
73
</HTML>