<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>That's good. The sql file I gave
you should create the correct table layout.</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=personal@catranis.net
href="mailto:personal@catranis.net">personal@catranis.net</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-users@lists.digium.com
href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, July 28, 2004 11:32
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Asterisk-Users] MS SQL
& Free TDS</DIV>
<DIV><BR></DIV>Duane, <BR>you da man.. It's connecting, no segmentation or
<BR>crashing... just can't log the cdr's yet... probably a <BR>table issue
working on it...<BR><BR><BR>On Wed, 28 Jul 2004 22:22:31 -0500<BR>
"Duane Cox" <<A
href="mailto:duanec@mail.illicom.net">duanec@mail.illicom.net</A>>
wrote:<BR>>Sure thing...<BR>><BR>>Luke Catranis, Seshu Kanuri, and
any others:<BR>><BR>><BR>>Asterisk CVS-HEAD, CDR with MSSQL 7.0
database; via <BR>>unixODBC and FreeTDS:<BR>><BR>>cd /usr/src
&&<BR>>rm -fr unixODBC-2.2.9 &&<BR>>tar -zxvf
unixODBC-2.2.9.tar.gz &&<BR>>cd unixODBC-2.2.9
&&<BR>>./configure --sysconfdir=/etc --prefix=/usr --disable-gui
<BR>>&&<BR>>make &&<BR>>make
install<BR>><BR>>cd /usr/src &&<BR>>rm -fr freetds-0.62.4
&&<BR>>tar -zxvf freetds-0.62.4.tar.gz &&<BR>>cd
freetds-0.62.4 &&<BR>>./configure --prefix=/usr --with-tdsver=7.0
<BR>>--with-unixodbc=/usr/lib &&<BR>>make &&<BR>>make
install<BR>><BR>>ldconfig -v<BR>><BR>>/etc/rc.d/init.d/asterisk
stop<BR>><BR>>cd /usr/src/asterisk &&<BR>>make clean
&&<BR>>make update &&<BR>>make &&<BR>>make
install<BR>><BR>>cat > /etc/odbcinst.ini <<
"EOF"<BR>>[FreeTDS]<BR>>Description = FreeTDS ODBC
driver for MSSQL<BR>>Driver
=
/usr/lib/libtdsodbc.so<BR>>Setup
= /usr/lib/libtdsS.so<BR>>FileUsage =
1<BR>>EOF<BR>><BR>>cat > /etc/odbc.ini <<
"EOF"<BR>>[MSSQL-asterisk]<BR>>description
= Asterisk ODBC for
MSSQL<BR>>driver
=
FreeTDS<BR>>server
=
IP.IP.IP.IP<BR>>port
=
1433<BR>>database
=
your_database_name_here<BR>>tds_version
=
7.0<BR>>language
= us_english<BR>>EOF<BR>><BR>>[ -f /etc/asterisk/cdr_tds.conf ] >
<BR>>/etc/asterisk/cdr_tds.conf<BR>><BR>>cat >
/etc/asterisk/cdr_odbc.conf <<
"EOF"<BR>>[global]<BR>>dsn=MSSQL-asterisk<BR>>username=your_sql_username_here<BR>>password=your_sql_password_here<BR>>loguniqueid=yes<BR>>EOF<BR>><BR>>cat
> cdr_table.sql << "EOF"<BR>>CREATE TABLE cdr
(<BR>>
[calldate]
[datetime]
NOT NULL <BR>>,<BR>>
[clid] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[src] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[dst] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[dcontext] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[channel] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[dstchannel] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[lastapp] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[lastdata] [varchar]
(80) NOT NULL
<BR>>,<BR>>
[duration]
[int]
NOT NULL <BR>>,<BR>>
[billsec]
[int]
NOT NULL <BR>>,<BR>>
[disposition] [varchar]
(45) NOT NULL
<BR>>,<BR>>
[amaflags]
[int]
NOT NULL <BR>>,<BR>>
[accountcode] [varchar]
(20) NOT NULL
<BR>>,<BR>>
[uniqueid] [varchar]
(32) NOT NULL
<BR>>,<BR>>
[userfield] [varchar]
(255) NOT
NULL<BR>>)<BR>>GO<BR>>EOF<BR>><BR>>echo "modify for your IP,
database, username, and
<BR>>password"<BR>><BR>>/etc/rc.d/init.d/asterisk
start<BR>><BR>><BR>><BR>><BR>>Asterisk CVS-HEAD, CDR with MSSQL
7.0 database; via <BR>>FreeTDS directly (I
like<BR>>better):<BR>><BR>>cd /usr/src &&<BR>>rm -fr
freetds-0.62.4 &&<BR>>tar -zxvf freetds-0.62.4.tar.gz
&&<BR>>cd freetds-0.62.4 &&<BR>>./configure
--prefix=/usr --with-tdsver=7.0 &&<BR>>make &&<BR>>make
install<BR>><BR>>ldconfig -v<BR>><BR>>/etc/rc.d/init.d/asterisk
stop<BR>><BR>>cd /usr/src/asterisk &&<BR>>make clean
&&<BR>>make update &&<BR>>make &&<BR>>make
install<BR>><BR>>[ -f /etc/asterisk/cdr_odbc.conf ] >
<BR>>/etc/asterisk/cdr_odbc.conf<BR>><BR>>cat >
/etc/asterisk/cdr_tds.conf <<
"EOF"<BR>>[global]<BR>>hostname=IP.IP.IP.IP<BR>>port=1433<BR>>dbname=your_database_name_here<BR>>user=your_sql_username_here<BR>>password=your_sql_password_here<BR>>charset=BIG5<BR>>EOF<BR>><BR>>cat
> cdr_table.sql << "EOF"<BR>>CREATE TABLE cdr
(<BR>> [accountcode]
[varchar] (20) NULL
,<BR>>
[src] [varchar]
(80) NULL
,<BR>>
[dst] [varchar]
(80) NULL
,<BR>>
[dcontext] [varchar]
(80) NULL
,<BR>>
[clid] [varchar]
(80) NULL
,<BR>>
[channel] [varchar]
(80) NULL
,<BR>>
[dstchannel] [varchar]
(80) NULL
,<BR>>
[lastapp] [varchar]
(80) NULL
,<BR>>
[lastdata] [varchar]
(80) NULL
,<BR>>
[start]
[datetime]
NULL ,<BR>>
[answer]
[datetime]
NULL ,<BR>>
[end]
[datetime]
NULL ,<BR>>
[duration]
[int]
NULL ,<BR>>
[billsec]
[int]
NULL ,<BR>>
[disposition] [varchar]
(20) NULL
,<BR>>
[amaflags] [varchar]
(16) NULL
,<BR>>
[uniqueid] [varchar]
(32)
NULL<BR>>)<BR>>GO<BR>>EOF<BR>><BR>>echo "modify for your IP,
database, username, and
<BR>>password"<BR>><BR>>/etc/rc.d/init.d/asterisk
start<BR>><BR>><BR>><BR>><BR>>Duane
Cox<BR>><BR>><BR>><BR>>From: <<A
href="mailto:personal@catranis.net">personal@catranis.net</A>><BR>>To:
<<A
href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</A>><BR>>Sent:
Wednesday, July 28, 2004 10:07 PM<BR>>Subject: Re: [Asterisk-Users] MS SQL
& Free TDS<BR>><BR>><BR>>> Didn't see it, but here's my reply
again... with none of<BR>>> the
garbage...<BR>>><BR>>><BR>>> Two Specific
Issues<BR>>><BR>>> 1. With cdr_odbc unixodbc (2.2.9) I
can connect with<BR>>> tsql and isql to my MS SQL server. But when I try
to <BR>>>load<BR>>> the cdr_odbc in * I get a segmentation fault
and the<BR>>> server crashes.<BR>>><BR>>> 2. With cdr_tds, I
have the .c file but that's it, I do<BR>>> not know what to do next, in
order to compile the .so to<BR>>> load the module, I'm an Idiot please
help.<BR>>><BR>>><BR>>><BR>>>
_______________________________________________<BR>>> Asterisk-Users
mailing list<BR>>> <A
href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</A><BR>>>
<A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>>>
To UNSUBSCRIBE or update options visit:<BR>>> <A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>>><BR>><BR>>_______________________________________________<BR>>Asterisk-Users
mailing
list<BR>>Asterisk-Users@lists.digium.com<BR>>http://lists.digium.com/mailman/listinfo/asterisk-users<BR>>To
UNSUBSCRIBE or update options visit:<BR>> <A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR><BR>_______________________________________________<BR>Asterisk-Users
mailing list<BR><A
href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</A><BR><A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR>To
UNSUBSCRIBE or update options visit:<BR> <A
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR></BLOCKQUOTE></BODY></HTML>