[asterisk-users] MSSQL connection

Kevin Smith kevin.smith at mercury.net
Sat Sep 9 09:19:23 MST 2006


Thanks Tim,

That was my first thought as well but then I thought, might as well give 
it a try. But it is turning into a hassle more then anything. I already 
have a PHP script wrote to for MySQL so the conversion to MSSQL 
shouldn't be bad.

Thanks,
Kevin



Tim Panton wrote:
>
> On 9 Sep 2006, at 00:42, Kevin Smith wrote:
>
>> Hi everyone,
>>
>> I am looking to log CDR records to our MSSQL database for further 
>> examination on the records. From what I gathered from the wiki I have 
>> to choose between FreeTDS and unixODBC. Is there a better choice? 
>> Which option would be better in the log run?
>>
>> Also configuration asterisk to use both modules. Any good tips on 
>> that, I followed the steps provided by the following pages:
>>
>> http://www.voip-info.org/wiki/view/FreeTDS
>> http://www.voip-info.org/wiki/view/Asterisk+app_dbodbc
>>
>> But this is the error I get: (note: some information has been changed 
>> for security, such as 'user' and pass was changed to phone)
>>
>> # isql -v MSSQL-astersik phone phone
>> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
>> [28000][unixODBC][FreeTDS][SQL Server]Login incorrect.
>> [][unixODBC][FreeTDS][SQL Server]Login failed for user 'phone'.
>> [][unixODBC][FreeTDS][SQL Server]Cannot open database requested in 
>> login 'cdr'.
>> Login fails.
>> [ISQL]ERROR: Could not SQLConnect
>>
>> from odbcinst
>> [MSSQL-FreeTDS]
>> Description     = FreeTDS ODBC driver for MSSQL
>> Driver          = /usr/lib/libtdsodbc.so
>> Setup           = /usr/lib/libtdsS.so
>> FileUsage       = 1
>>
>> from odbc
>> [MSSQL-asterisk]
>> description     = Asterisk ODBC for MSSQL
>> driver          = MSSQL-FreeTDS
>> server          = XXX.XXX.XXX.XXX
>> port            = 1433
>> database        = cdr
>> user            = phone
>> password        = phone
>> tds_version     = 7.0
>> language        = us_english
>>
>>
>> Maybe I am just overlooking something or there is something that 
>> isn't registering with me that is under my nose. Any help would be 
>> appreciated. My guess is it is an error between the keyboard and 
>> chair  ;).
>
> We have just been through this - but with Oracle - and came to the 
> conclusion that
> we didn't want to tightly couple asterisk with the DB, we felt it 
> could be a performance
> hit - on both sides - plus it meant allowing ODBC traffic over a 
> network we couldn't
> secure.
>
> In the end we got a script written that reads the Master.csv file, 
> turns the new
> data into XML and does an HTTP Post of the data to a web service running
> on the Oracle system which parses the XML and inserts the records in 
> the database.
>
> We plan to run the script every few minutes (from cron).
>
>
> Tim Panton
>
> www.mexuar.com
>
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users


More information about the asterisk-users mailing list