I am supposed to be implementing a backend Microsoft SQL connection from our Asterisk SIP server for CDR reports. Disclosure: I am a rookie with Asterisk, I am unfamiliar how it was originally setup, and I have limited experience in a Linux(CentOS) environment.
I have been following the link here: http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html
I have the FreeTDS drivers installed and have verified they are visible with the command:
]# odbcinst -q -d
[FreeTDS]
Inside /etc/odbc.ini I have the following defined connector:
[asterisk-connector]
Description = MSSQL connection to 'asterisk' database
Driver = FreeTDS
Database = Asterisk
Address = x.x.x.x
Port = 52199
UserName = <username here>
Password = <password here>
Trace = No
TDS_Version = 7.0
The step after that is to verify that you can connect to the database with the specified connector with the 'isql' command... However, when I just type in "isql -v asterisk-connector" I receive the error:
]# isql -v asterisk-connector
[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 ''. The user is not associated with a trusted SQL Server connection.
[ISQL]ERROR: Could not SQLConnect
When I enter in the command and specify the username and password at command line, it is able to connect!
]# isql -v asterisk-connector <username here> <password here>
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
My question: Why will it not pick up my username and password defined in odbc.ini?
Furthermore, the step after that is to recompile the asterisk source files, but there are no source files for Asterisk 1.8 on the server. Like I mentioned before, I do not know how Asterisk was originally installed and setup on this server.
Is there a way I can get source files for Asterisk and recompile them to work with what is already installed and running? If yes, would it erase everything that is currently defined in our phone system such as extensions, ring groups, IVRs, etc.?
Any help would be greatly appreciated! If you need additional information, please let me know and I can retrieve it. I didn't know how much info would be required for this.