Hello Everyone,
Does anyone know of a way to use a MSSQL database as a caller ID lookup source?
Regards,
Josh
lgaetz
(Lorne Gaetz)
November 17, 2015, 2:19am
2
CallerID Superfecta has a MS SQL module.
Are you referring to the SFDatabase module?
From what I understand it uses MSSQL PDO driver it used has been discontinued & is not compatible with the current PHP versions. The pdo-mssql packages doesn’t seem to be available in the repo either.
tm1000
(Andrew Nagy)
November 17, 2015, 3:08am
4
Not sure where you read that but it’s factually incorrect: http://php.net/manual/en/ref.pdo-dblib.php
Also considering PDO has a driver for ODBC you can practically use ANY database with PHP PDO. http://php.net/manual/en/ref.pdo-odbc.php
Hello Andrew,
That’s good to know.
It was in an old article I came across, but I wasn’t able to find much more information on the module, so assumed it was true.
In the SFDatabase module under DB Driver, it only lists mysql & sqlite. Is there another package I need to install?
lgaetz
(Lorne Gaetz)
November 17, 2015, 4:01am
6
Sorry, the module did exist once but was never migrated to the current version:
<?php
//this file is designed to be used as an include that is part of a loop.
//If a valid match is found, it should give $caller_id a value
//available variables for use are: $thenumber
//retreive website contents using get_url_contents($url);
//configuration / display parameters
//The description cannot contain "a" tags, but can contain limited HTML. Some HTML (like the a tags) will break the UI.
$source_desc = "Query a local or remote MS SQL database. Requires non-standard dependancy, MS SQL for PHP";
$source_param = array();
$source_param['DB_Host']['desc'] = 'Host address of the database. (localhost if the database is on the same server as FreePBX)';
$source_param['DB_Host']['type'] = 'text';
$source_param['DB_Name']['desc'] = 'schema name of the database';
$source_param['DB_Name']['type'] = 'text';
$source_param['DB_User']['desc'] = 'Username used to connect to the database';
$source_param['DB_User']['type'] = 'text';
$source_param['DB_Password']['desc'] = 'Password used to connect to the database';
$source_param['DB_Password']['type'] = 'password';
$source_param['SQL_Query']['desc'] = 'SQL Query used to retrieve the Dialer Name. select result as data from table where telfield like [NUMBER]. "as data" is important, NUMMBER will be replaced by the called number';
$source_param['SQL_Query']['type'] = 'text';
This file has been truncated. show original
Hello Lorne,
Yes, I did find that one in my searches, but ignored it for that reason.