[Asterisk-Users] Problems to use asterisk with mysql /odbc
Thomas Hoellriegel
admin at blindi.net
Sat Jan 1 16:52:57 MST 2005
hi, i.m. newbie in asterisk. asterisk 1.0.3 is my current version.
i like to store usernames and passwords in a sql database.
i like to log failed authentification-passwords, to create a blacklist for
securityreasons.
i thingk a sql-database is a good way to log these actions.
i don.t find debugging-options to output invalid login-passwords.
Ok, i have made the following:
debian is my OS. mysql is installed and working.
i has compiled astersk as follows:
Modefying:
/usr/src/asterisk-1.0.3/channels/Makefile
USE_MYSQL_FRIENDS=1
USE_SIP_MYSQL_FRIENDS=1
make, and: make install are correctly.
i have probed many choises:
chois1:
i has create a database sipfriends:
mysqladmin create sipfriends
the database:
CREATE TABLE Sipfriends (
Name varchar(40) NULL default '',
Secret varchar(40) NULL default '',
Context varchar(40) NULL default '',
Username varchar(40) default '',
paddr varchar(20) NULL default '',
Port int(6) NULL default '0',
Regseconds int(11) NULL default '0',
PRIMARY KEY (Name)
) TYPE=MyISAM;
i setting up:
/usr/asterisk/etc/asterisk/res_odbc.conf
[mysql]
dsn => sipfriends
username => root
password =>
pre-connect => yes
it is not sql-password set. i have only access to this machine.
asterisk can't authenficate users from the database.
chois2:
i copy from asterisk-sources:
contrib/scripts/retrieve_sip_conf_from_mysql.pl
in my /usr/asterisk/etc/asterisk directory.
i create a mysql database:
mysqladmin create sip
i pasted the table:
CREATE TABLE sip (
id INT(11) DEFAULT -1 NOT NULL,
keyword VARCHAR(20) NOT NULL,
data VARCHAR(50) NOT NULL,
flags INT(1) DEFAULT 0 NOT NULL,
PRIMARY KEY (id,keyword)
);
in the database.
i add the following line in sip.conf:
#include = retrieve_sip_conf_from_mysql.pl
asterisk say:
== Parsing '/usr/asterisk/etc/asterisk/sip.conf': Found
== Parsing '/usr/asterisk/etc/asterisk/=
retrieve_sip_conf_from_mysql.pl': Not
found (No such file or directory)
mysql auth is not working in asterisk.
what can i do please? thankx for your help
---------------
tel : 089 2500 7676
homepage: http://www.blindi.net
blinde-misc mailingliste für blinde. anmeldung unter:
http://www.blindi.net/mailman/listinfo/blinde-misc
More information about the asterisk-users
mailing list