我是Asterisk的新手,我試圖將星號連接到MS SQL服務器,因爲我知道Asterisk + DB會非常強大。我跟着星號™相同的步驟:權威指南(星號簿) http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html#Database_id246915Asterisk ODBC顯示爲空
/etc/odbcinst.ini
[FreeTDS]
Description = ODBC for MSSQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1
Fileusage = 1
Threading = 2
/etc/odbc.ini
[MSSQL]
Description = MSSQL Database
Driver = FreeTDS
Database = asterisk
Server = 192.168.14.193
Username = sa
Password = iti
Trace = no
TDS_Version = 8.0
Port = 1433
當我使用此聲明
echo "select 1" | isql -v MSSQL
我得到
[s1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[s1000][unixODBC][FreeTDS][SQL Server]Login failed for user ''.
[ISQL]ERROR: Could not SQLConnect
,但是當我用這個echo "select 1" | isql -v MSSQL sa iti
它的工作
繼續教程
我重新編譯Asterisk的安裝了unixODBC 我修改了res_odbc.conf文件後,感覺變化
/etc/asterisk/res_odbc.conf
[asterisk]
enabled => yes
dsn => MSSQL
username => sa
password => iti
pooling => no
pre-connect => yes
我也修改Freetds.conf
/etc/freetds/freetds.conf
[MSSQL]
Server = 192.168.14.193
TDS_Version = 8.0
Port = 1433
當我使用ODBC秀我得到這個
*CLI> odbc show
ODBC DSN Settings
-----------------
*CLI>
我已經檢查了res_odbc,func_odbc而我做菜單選擇
我正在使用安裝在我的機器上的MS SQL Server 2014和Ubuntu 16桌面
請幫我解決這個問題,並在此先感謝
我找不到res_config_odbc.conf我必須創建? – Joey
嘗試上面的命令,如果它說「no res_config_odbc.conf」,然後將res_odbc.conf移動到res_config_odbc.conf – arheops
我試過了,但仍然odbc顯示爲空 – Joey