[Freeswitch-users] ODBC, FreeTDS, Microsoft SQL

Tim Meade Tim.Meade at Millicorp.com
Sun Jul 29 17:36:13 MSD 2012


Thanks Sean,

With the Microsoft drivers, FS does create all the tables.  The registrations still error out.

We have shelved it for now.  It was just a what if project.

Tim

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Sean Devoy
Sent: Saturday, July 28, 2012 10:11 PM
To: 'FreeSWITCH Users Help'
Subject: Re: [Freeswitch-users] ODBC, FreeTDS, Microsoft SQL

For what it's worth, in my past experiences porting either direction Sql Server <==> MySQL the 2 problem areas were Date vs Time vs DSateTime fields and "AutoIncrement" columns (aka surrogate keys).

HTH
Sean

From: freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org> [mailto:freeswitch-users-bounces at lists.freeswitch.org]<mailto:[mailto:freeswitch-users-bounces at lists.freeswitch.org]> On Behalf Of Tim Meade
Sent: Saturday, July 28, 2012 3:52 PM
To: FreeSWITCH Users Help
Cc: Matt Kerper; Chris St. Clair
Subject: Re: [Freeswitch-users] ODBC, FreeTDS, Microsoft SQL

I've found a work around using the Microsoft SQL drivers instead of FreeTDS.

Following most of this:

                http://msdn.microsoft.com/en-us/library/hh568454.aspx

                and download here: http://www.microsoft.com/en-us/download/details.aspx?id=28160

Great install instructions:

                                http://blog.nhaslam.com/2011/12/12/sql-server-odbc-on-linux/


and setting the obc.ini to:

[freeswitch]
Driver   = SQL Server Native Client 11.0
Description =  FS SQL Tester
Trace = No
Server = 192.168.5.10
Port = 1433
Database = FSTester

All the tables are created properly.

Tim

From: freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org> [mailto:freeswitch-users-bounces at lists.freeswitch.org]<mailto:[mailto:freeswitch-users-bounces at lists.freeswitch.org]> On Behalf Of Tim Meade
Sent: Saturday, July 28, 2012 11:25 AM
To: FreeSWITCH Users Help
Subject: [Freeswitch-users] ODBC, FreeTDS, Microsoft SQL

We wanted to run some ODBC tests using a MSSQL backend.

We setup the ODBC with MySQL and everything worked great.   Then installed FreeTDS and configured it instead of MySQL.

When FS restarted, it created some of the required tables. Calls, complete, interfaces, nat, sip_presence, sip_recovery, sip_shared_apperance_subscriptions.

What it did not create was any of the registrations tables.

When a device tries to register, FS shows in the CLI:

012-07-28 09:43:48.892312 [INFO] switch_odbc.c:285 The connection has been re-established
2012-07-28 09:43:49.912319 [ERR] switch_odbc.c:494 ERR: [create index sr_sip_host on sip_registrations (sip_host)]
[STATE: 42000 CODE 1088 ERROR: [unixODBC][FreeTDS][SQL Server]Cannot find the object "sip_registrations" because it does not exist or you do not have permissions.
]
2012-07-28 09:43:49.912319 [ERR] switch_core_sqldb.c:487 SQL ERR [STATE: 42000 CODE 1088 ERROR: [unixODBC][FreeTDS][SQL Server]Cannot find the object "sip_registrations" because it does not exist or you do not have permissions.
]
create index sr_sip_host on sip_registrations (sip_host)
2012-07-28 09:43:49.912319 [CRIT] switch_odbc.c:280 The sql server is not responding for DSN freeswitch [STATE: 42000 CODE 1088 ERROR: [unixODBC][FreeTDS][SQL Server]Cannot find the object "sip_registrations" because it does not exist or you do not have permissions.
][244]

Seems the issue is that FS didn't create all the appropriate tables on start.   Has anyone else seen something like this?   I cannot find much on using FS with FreeTDS and MSSQL.

Thanks

Tim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120729/fdb75eea/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list