Superfecta module for MS SQL

Our CRM data is stored in a MS SQL database. I would like to be able to retrieve the Customer name from our database from the caller ID number. I came across this thread: https://community.freepbx.org/t/caller-id-from-ms-sql-database/31944, but I didn’t have success with the module that is referenced at the end of that post. It either doesn’t have the correct syntax, or I don’t know how to install it.

Here is how I installed that module:

  • I copied the file into /var/www/html/admin/modules/superfecta/sources/
  • Set the correct permissions for asterisk:
  • [root@freepbx sources]# chown asterisk:asterisk ./source-MSSQL_DB.module
  • [root@freepbx sources]# chmod 664 ./source-MSSQL_DB.module

The webconsole just kept producing syntax errors. I tried to resolve some of them but was not successful. I will provide them if they are helpful to someone.

I really would like to find a solution to this. Would someone either help me install this module, or maybe someone would be willing to do custom developement on this? Of course, community support is the best, but I am willing to consider paid options as well.

Your route is through FreeTDS (reverse engineered MSoft code) and ODBC (Open Source database connector) , here is one recipe

https://portal.perforce.com/s/article/Configuring-a-Linux-Server-to-Connect-to-an-MSSQL-Database-Using-ODBC

1 Like

Thanks for your reply. That is a nice guide for getting the database accessible on the distro, but then how do I reference that from the Superfecta module. Can I use the SFDatabase source that is designed to connect to a mysql database? I am just trying to get the pieces pulled together to make this work.

No, that’s what I meant by ‘through ODBC’, does not Superfecta already talk to the FreePBX mysql/mariadb database through an ODBC connection ?

Yes, thanks for the reminder. I will try that. I am a little confused because database connection settings can be placed in /etc/odbc.ini or in the settings of the SFDatabase module, but I will see how it goes for me. :grinning: