Asterish with Mysql

Hi All,

I installed Asterisk , addon & MYSQL on linux server.
I want to store users in MYSQL database.
What to do.
Please help me in this.

regards
Chauhan_delhi

voip-info.org/wiki/view/Aste … ysql+peers
Although they write peers - same is valid for users also.

Hi,

Thanks for ur reply.

i am getting this

sip show peers
[Jul 6 12:34:05] WARNING[23387]: config.c:1969 find_engine: Realtime mapping for ‘sippeers’ found to engine ‘mysql’, but the engine is not available.

PLease suggest what to do now…

Thanks

You have to check res_mysql.conf, extconfig.conf mysql databases and tables, mysql users and permissions.
Also it is good idea to
./configure
make
make install
addons again.

Hi,
configuration is as follows:

res_mysql.conf:
[general]
dbhost = 127.0.0.1
dbname = asterisk
dbuser = root
dbpass = voicetecsql
dbport = 3306

extconfig.conf
sipusers => mysql,asterisk,sip_buddies
sippeers => mysql,asterisk,sip_buddies

In mysql Database;

CREATE TABLE sip_buddies (
id int(11) NOT NULL auto_increment,
name varchar(80) NOT NULL default ‘’,
host varchar(31) NOT NULL default ‘’,
nat varchar(5) NOT NULL default ‘no’,
type enum(‘user’,‘peer’,‘friend’) NOT NULL default ‘friend’,
accountcode varchar(20) default NULL,
amaflags varchar(13) default NULL,
call-limit smallint(5) unsigned default NULL,
callgroup varchar(10) default NULL,
callerid varchar(80) default NULL,
cancallforward char(3) default ‘yes’,
canreinvite char(3) default ‘yes’,
context varchar(80) default NULL,
defaultip varchar(15) default NULL,
dtmfmode varchar(7) default NULL,
fromuser varchar(80) default NULL,
fromdomain varchar(80) default NULL,
insecure varchar(4) default NULL,
language char(2) default NULL,
mailbox varchar(50) default NULL,
md5secret varchar(80) default NULL,
deny varchar(95) default NULL,
permit varchar(95) default NULL,
mask varchar(95) default NULL,
musiconhold varchar(100) default NULL,
pickupgroup varchar(10) default NULL,
qualify char(3) default NULL,
regexten varchar(80) default NULL,
restrictcid char(3) default NULL,
rtptimeout char(3) default NULL,
rtpholdtimeout char(3) default NULL,
secret varchar(80) default NULL,
setvar varchar(100) default NULL,
disallow varchar(100) default ‘all’,
allow varchar(100) default ‘g729;ilbc;gsm;ulaw;alaw’,
fullcontact varchar(80) NOT NULL default ‘’,
ipaddr varchar(15) NOT NULL default ‘’,
port smallint(5) unsigned NOT NULL default ‘0’,
regserver varchar(100) default NULL,
regseconds int(11) NOT NULL default ‘0’,
lastms int(11) NOT NULL default ‘0’,
username varchar(80) NOT NULL default ‘’,
defaultuser varchar(80) NOT NULL default ‘’,
subscribecontext varchar(80) default NULL,
PRIMARY KEY (id),
UNIQUE KEY name (name),
KEY name_2 (name)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;

sip show peers
[Jul 8 10:26:10] WARNING[12085]: config.c:1969 find_engine: Realtime mapping for ‘sippeers’ found to engine ‘mysql’, but the engine is not available

is there any thing insert/edit in modules.conf ?

You can try:
res_mysql.conf:
[asterisk]
Instead of
res_mysql.conf:
[general]

At least this is problem in 1.6.1.0

I’ve found that asterisk often has to be restarted, not just reloaded for it to start talking to the MySQL server.

HI,

I tried it by using [general] also in res_mysql.config but getting same.

:frowning:

tried using [asterisk] also, getting same

I am using
asterisk-1.6.0.10 and
asterisk-addons-1.6.0.2

Is it OK??

I also face this problem. And I am using Asterisk 1.8.3.2 and Asterisk Add on 1.6.2.3

[quote=“bira_more”]You have to check res_mysql.conf, extconfig.conf mysql databases and tables, mysql users and permissions.
Also it is good idea to
./configure
make
make install
addons again.[/quote]

I did try with reinstall, it does not help