Asterisk Realtime

Hello everyone,
Im trying to use MySQL to add sip user in asterisk but I encountered a problem. The msg error in asterisk CLI " WARNING[21433]: config.c:1231 find_engine: Realtime mapping for ‘sippeers’ found to engine ‘mysql’, but the engine is not available".

I already installed the asterisk-addons, configured the extconfig.conf, res_mysql.conf. The configurations are as follows:

extconfig.con

sip.conf => mysql,asterisk,sippeers
sipusers => mysql,asterisk,sippeers
sippeers => mysql,asterisk,sippeers

res_mysql.conf

[general]
dbhost = 219.93.67.77
dbname = asterisk
dbuser = esky
dbpass = esky
dbport = 3306
dbsock = /var/lib/mysql/mysqld.sock

My database name is asterisk and the table name sippeers. Really appreciate if anyone can resolve this matter.

Many thanks,
Aby Azid

System info:
OS: Fedora Core 6
Asterisk Ver: 1.4 8)

Check IPtables to make sure that is has the port open. Also check MySQL config to make sure that the port is not restricted to just 127.0.0.1 (local host). If the database is on the localhost change the IP address to 127.0.0.1 and see if that works.

Currently I have disabled the Firewall in Fedora. Means all the ports can be accessed. Yesterday I able to load the res_config_mysql.so modules into asterisk…but when i type “realtime mysql status” in the asterisk CLI…it says there failed to connect to database… any suggestion man…and by the way tq for the reply leemason

Finally after hours of configuring i managed to connect asterisk to Mysql server. Now i can add the SIP users/peers dynamically without restarting or reloading asterisk.

Hi,

have you enabled rtcachefriends in sip.conf ??

Hi Dan,

nope, i didn’t enable rtcachefriend in my sip.conf, Im still new with this asterisk stuff…but y do we need to enable it?..I read it in a forum somewhere…this rtcachefriend is for 2 asterisk server to talk to each other…if im not mistaken…by the way I’m using Asterisk as SIP Proxy Server…

rtcachefriends is set to “no” by default. you should find it somewhere in sip.conf
This function is used for caching of sip peers information. Otherwise “sip show peers” will not show anything when realtime configuration is used .
I use asterisk 1.2. In this version when I set rtcachefriends=yes, realtime stops working and I need reload sip.conf after every change in mySql database.
Could test you this case in 1.4 ?

Thanks

For your information, I did the configuration of sip.conf from scratch, I didn’t use the default setting. The global configuration of my sip.conf are as follows:

sip.conf

[general]
context=default
srvlookup=yes
bindport=5060
bindaddr=219.93..
videosupport=yes
allowguest=yes
dbname=asterisk
dbhost=*******
dbuser=****
dbpass=********

I’m able to see the “sip show peers” output…try upgrade to version 1.4