~ubuntu-branches/ubuntu/karmic/asterisk/karmic-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Michel Dault, Faidon Liambotis, Tzafrir Cohen
  • Date: 2009-08-20 03:40:08 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090820034008-rg2s51o9ruqvmwml
Tags: 1:1.6.2.0~dfsg~beta4-0ubuntu1
* Merge from Debian.
  - Lsb patches dropped: fixed upstream
  - Patch for LP #350732 dropped: fixed upstream
* Added:
  - Add support for web interface
  - Don't enable voicetronix cards by default
  - Chown /dev/dahdi in init script
  - Add files for potential backports
  - Change maintainer
  - Standards version 3.8.3

* Debian changes

 [ Faidon Liambotis ]
 * Fix FTBFS on armel. (Closes: #532971)

 [ Tzafrir Cohen ]
 * New upstream beta.
 * Patch hardware_dtmf_mute_fix removed: Applied upstream.
 * No need for a separate app_directory_odbc (will use app_voicemail_odbc).
 * Fix name of voicemail 'openssl' dep. (Thomas Renard) (Closes: #539150)

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>TDS, using cdr_tds</TITLE>
11
 
<META NAME="description" CONTENT="TDS, using cdr_tds">
 
10
<TITLE>ODBC using cdr_odbc</TITLE>
 
11
<META NAME="description" CONTENT="ODBC using cdr_odbc">
12
12
<META NAME="keywords" CONTENT="asterisk">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
18
18
 
19
19
<LINK REL="STYLESHEET" HREF="asterisk.css">
20
20
 
 
21
<LINK REL="next" HREF="node216.html">
21
22
<LINK REL="previous" HREF="node214.html">
22
 
<LINK REL="up" HREF="node213.html">
 
23
<LINK REL="up" HREF="node214.html">
23
24
<LINK REL="next" HREF="node216.html">
24
25
</HEAD>
25
26
 
26
27
<BODY >
27
28
 
28
29
<DIV CLASS="navigation"><!--Navigation Panel-->
29
 
<A NAME="tex2html3449"
 
30
<A NAME="tex2html3463"
30
31
  HREF="node216.html">
31
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
32
33
 SRC="/usr/share/latex2html/icons/next.png"></A> 
33
 
<A NAME="tex2html3445"
34
 
  HREF="node213.html">
 
34
<A NAME="tex2html3459"
 
35
  HREF="node214.html">
35
36
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
36
37
 SRC="/usr/share/latex2html/icons/up.png"></A> 
37
 
<A NAME="tex2html3441"
 
38
<A NAME="tex2html3453"
38
39
  HREF="node214.html">
39
40
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
40
41
 SRC="/usr/share/latex2html/icons/prev.png"></A> 
41
 
<A NAME="tex2html3447"
 
42
<A NAME="tex2html3461"
42
43
  HREF="node1.html">
43
44
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
44
45
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
45
46
<BR>
46
 
<B> Next:</B> <A NAME="tex2html3450"
47
 
  HREF="node216.html">MYSQL</A>
48
 
<B> Up:</B> <A NAME="tex2html3446"
49
 
  HREF="node213.html">MSSQL</A>
50
 
<B> Previous:</B> <A NAME="tex2html3442"
51
 
  HREF="node214.html">ODBC using cdr_odbc</A>
52
 
 &nbsp; <B>  <A NAME="tex2html3448"
 
47
<B> Next:</B> <A NAME="tex2html3464"
 
48
  HREF="node216.html">TDS, using cdr_tds</A>
 
49
<B> Up:</B> <A NAME="tex2html3460"
 
50
  HREF="node214.html">Microsoft SQL Server</A>
 
51
<B> Previous:</B> <A NAME="tex2html3454"
 
52
  HREF="node214.html">Microsoft SQL Server</A>
 
53
 &nbsp; <B>  <A NAME="tex2html3462"
53
54
  HREF="node1.html">Contents</A></B> 
54
55
<BR>
55
56
<BR></DIV>
56
57
<!--End of Navigation Panel-->
57
58
 
58
 
<H2><A NAME="SECTION001142000000000000000">
59
 
TDS, using cdr_tds</A>
60
 
</H2>
61
 
                Compile, configure, and install the latest FreeTDS package:
62
 
</B></SMALL>
63
 
<UL>
64
 
<LI><PRE>
65
 
                   tar -zxvf freetds-0.62.4.tar.gz &amp;&amp;
66
 
                   cd freetds-0.62.4 &amp;&amp;
67
 
                   ./configure --prefix=/usr --with-tdsver=7.0
68
 
                   make &amp;&amp;
69
 
                   make install
70
 
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
71
 
</LI>
72
 
</UL>                Compile, or recompile, asterisk so that it will now add support
73
 
                for cdr_tds.
74
 
</B></SMALL>
75
 
<UL>
76
 
<LI><PRE>
77
 
                   make clean &amp;&amp; ./configure --with-tds &amp;&amp;
78
 
                   make update &amp;&amp;
79
 
                   make &amp;&amp;
80
 
                   make install
81
 
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
82
 
</LI>
83
 
</UL>                Only install one database connector.  Do not confuse asterisk
84
 
                by using both ODBC (cdr_odbc) and FreeTDS (cdr_tds).
85
 
                This command will erase the contents of cdr_odbc.conf
86
 
</B></SMALL>
87
 
<UL>
88
 
<LI><PRE>
89
 
                [ -f /etc/asterisk/cdr_odbc.conf ] &gt; /etc/asterisk/cdr_odbc.conf
90
 
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
91
 
</LI>
92
 
</UL>                Setup cdr_tds configuration files.  These are working samples
93
 
                from my system.  You will need to modify for your setup. Define
94
 
                your usernames and passwords here, secure file as well.
95
 
</B></SMALL>
96
 
<UL>
97
 
<LI><PRE>
98
 
                /etc/asterisk/cdr_tds.conf
 
59
<H3><A NAME="SECTION001141100000000000000">
 
60
ODBC using cdr_odbc</A>
 
61
</H3>
 
62
        Compile, configure, and install the latest unixODBC package:
 
63
</B></SMALL>
 
64
<UL>
 
65
<LI><PRE>
 
66
        tar -zxvf unixODBC-2.2.9.tar.gz &amp;&amp;
 
67
        cd unixODBC-2.2.9 &amp;&amp;
 
68
        ./configure --sysconfdir=/etc --prefix=/usr --disable-gui &amp;&amp;
 
69
        make &amp;&amp;
 
70
        make install
 
71
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
 
72
</LI>
 
73
</UL>
 
74
<P>
 
75
Compile, configure, and install the latest FreeTDS package:
 
76
</B></SMALL>
 
77
<UL>
 
78
<LI><PRE>
 
79
        tar -zxvf freetds-0.62.4.tar.gz &amp;&amp;
 
80
        cd freetds-0.62.4 &amp;&amp;
 
81
        ./configure --prefix=/usr --with-tdsver=7.0 \
 
82
                 --with-unixodbc=/usr/lib &amp;&amp;
 
83
        make &amp;&amp; make install
 
84
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
 
85
</LI>
 
86
</UL>
 
87
<P>
 
88
Compile, or recompile, asterisk so that it will now add support
 
89
        for cdr_odbc.
 
90
</B></SMALL>
 
91
<UL>
 
92
<LI><PRE>
 
93
        make clean &amp;&amp; ./configure --with-odbc &amp;&amp;
 
94
        make update &amp;&amp;
 
95
        make &amp;&amp;
 
96
        make install
 
97
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
 
98
</LI>
 
99
</UL>
 
100
<P>
 
101
Setup odbc configuration files.  These are working examples
 
102
        from my system.  You will need to modify for your setup.
 
103
        You are not required to store usernames or passwords here.
 
104
</B></SMALL>
 
105
<UL>
 
106
<LI><PRE>
 
107
        /etc/odbcinst.ini
 
108
           [FreeTDS]
 
109
           Description    = FreeTDS ODBC driver for MSSQL
 
110
           Driver         = /usr/lib/libtdsodbc.so
 
111
           Setup          = /usr/lib/libtdsS.so
 
112
           FileUsage      = 1
 
113
 
 
114
        /etc/odbc.ini
 
115
           [MSSQL-asterisk]
 
116
           description         = Asterisk ODBC for MSSQL
 
117
           driver              = FreeTDS
 
118
           server              = 192.168.1.25
 
119
           port                = 1433
 
120
           database            = voipdb
 
121
           tds_version         = 7.0
 
122
           language            = us_english
 
123
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
 
124
</LI>
 
125
</UL>
 
126
<P>
 
127
Only install one database connector.  Do not confuse asterisk
 
128
                by using both ODBC (cdr_odbc) and FreeTDS (cdr_tds).
 
129
                This command will erase the contents of cdr_tds.conf
 
130
</B></SMALL>
 
131
<UL>
 
132
<LI><PRE>
 
133
                [ -f /etc/asterisk/cdr_tds.conf ] &gt; /etc/asterisk/cdr_tds.conf
 
134
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
 
135
</LI>
 
136
</UL>           NOTE:  unixODBC requires the freeTDS package, but asterisk does
 
137
                not call freeTDS directly.
 
138
 
 
139
<P>
 
140
Now set up cdr_odbc configuration files.  These are working samples
 
141
                from my system.  You will need to modify for your setup. Define
 
142
                your usernames and passwords here, secure file as well.
 
143
</B></SMALL>
 
144
<UL>
 
145
<LI><PRE>
 
146
                /etc/asterisk/cdr_odbc.conf
99
147
                   [global]
100
 
                   hostname=192.168.1.25
101
 
                   port=1433
102
 
                   dbname=voipdb
103
 
                   user=voipdbuser
104
 
                   password=voipdpass
105
 
                   charset=BIG5
 
148
                   dsn=MSSQL-asterisk
 
149
                   username=voipdbuser
 
150
                   password=voipdbpass
 
151
                   loguniqueid=yes
106
152
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
107
153
</LI>
108
 
</UL>                And finally, create the 'cdr' table in your mssql database.
 
154
</UL>           And finally, create the 'cdr' table in your mssql database.
109
155
</B></SMALL>
110
156
<UL>
111
157
<LI><PRE>
112
158
                CREATE TABLE cdr (
113
 
                        [accountcode]   [varchar] (20)          NULL ,
114
 
                        [src]           [varchar] (80)          NULL ,
115
 
                        [dst]           [varchar] (80)          NULL ,
116
 
                        [dcontext]      [varchar] (80)          NULL ,
117
 
                        [clid]          [varchar] (80)          NULL ,
118
 
                        [channel]       [varchar] (80)          NULL ,
119
 
                        [dstchannel]    [varchar] (80)          NULL ,
120
 
                        [lastapp]       [varchar] (80)          NULL ,
121
 
                        [lastdata]      [varchar] (80)          NULL ,
122
 
                        [start]         [datetime]              NULL ,
123
 
                        [answer]        [datetime]              NULL ,
124
 
                        [end]           [datetime]              NULL ,
125
 
                        [duration]      [int]                   NULL ,
126
 
                        [billsec]       [int]                   NULL ,
127
 
                        [disposition]   [varchar] (20)          NULL ,
128
 
                        [amaflags]      [varchar] (16)          NULL ,
129
 
                        [uniqueid]      [varchar] (150)         NULL ,
130
 
                        [userfield]     [varchar] (256)         NULL
 
159
                        [calldate]      [datetime]              NOT NULL ,
 
160
                        [clid]          [varchar] (80)          NOT NULL ,
 
161
                        [src]           [varchar] (80)          NOT NULL ,
 
162
                        [dst]           [varchar] (80)          NOT NULL ,
 
163
                        [dcontext]      [varchar] (80)          NOT NULL ,
 
164
                        [channel]       [varchar] (80)          NOT NULL ,
 
165
                        [dstchannel]    [varchar] (80)          NOT NULL ,
 
166
                        [lastapp]       [varchar] (80)          NOT NULL ,
 
167
                        [lastdata]      [varchar] (80)          NOT NULL ,
 
168
                        [duration]      [int]                   NOT NULL ,
 
169
                        [billsec]       [int]                   NOT NULL ,
 
170
                        [disposition]   [varchar] (45)          NOT NULL ,
 
171
                        [amaflags]      [int]                   NOT NULL ,
 
172
                        [accountcode]   [varchar] (20)          NOT NULL ,
 
173
                        [uniqueid]      [varchar] (150)         NOT NULL ,
 
174
                        [userfield]     [varchar] (255)         NOT NULL
131
175
                )
132
176
</PRE><SMALL CLASS="SCRIPTSIZE"><B>
133
177
</LI>
134
 
</UL>                Start asterisk in verbose mode, you should see that asterisk
135
 
                logs a connection to the database and will now record every
136
 
                call to the database when it's complete.
 
178
</UL>           Start asterisk in verbose mode, you should see that asterisk
 
179
                logs a connection to the database and will now record every
 
180
                call to the database when it's complete.
137
181
 
138
182
<P>
139
 
<BR><HR>
 
183
 
 
184
<DIV CLASS="navigation"><HR>
 
185
<!--Navigation Panel-->
 
186
<A NAME="tex2html3463"
 
187
  HREF="node216.html">
 
188
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 
189
 SRC="/usr/share/latex2html/icons/next.png"></A> 
 
190
<A NAME="tex2html3459"
 
191
  HREF="node214.html">
 
192
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 
193
 SRC="/usr/share/latex2html/icons/up.png"></A> 
 
194
<A NAME="tex2html3453"
 
195
  HREF="node214.html">
 
196
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 
197
 SRC="/usr/share/latex2html/icons/prev.png"></A> 
 
198
<A NAME="tex2html3461"
 
199
  HREF="node1.html">
 
200
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 
201
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
 
202
<BR>
 
203
<B> Next:</B> <A NAME="tex2html3464"
 
204
  HREF="node216.html">TDS, using cdr_tds</A>
 
205
<B> Up:</B> <A NAME="tex2html3460"
 
206
  HREF="node214.html">Microsoft SQL Server</A>
 
207
<B> Previous:</B> <A NAME="tex2html3454"
 
208
  HREF="node214.html">Microsoft SQL Server</A>
 
209
 &nbsp; <B>  <A NAME="tex2html3462"
 
210
  HREF="node1.html">Contents</A></B> </DIV>
 
211
<!--End of Navigation Panel-->
140
212
<ADDRESS>
141
213
lmadsen
142
 
2009-06-11
 
214
2009-07-28
143
215
</ADDRESS>
144
216
</BODY>
145
217
</HTML>