[asterisk-users] Problem with realtime mysql I can't seem to resolve

Jonas Kellens jonas.kellens at telenet.be
Fri May 22 03:51:10 CDT 2015


Hello

I have already several Asterisk servers running with similar 
configuration, but now I stumble into a problem.

I have mysql configuration res_config_mysql.conf :

[MyAsteriskDB]
dbhost = 127.0.0.1
dbname = MyAsteriskDB
dbuser = astadmin
dbpass = mysecret
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock
requirements=warn ; or createclose or createchar


Realtime seems to be loaded :

*CLI> realtime mysql status
general configured for asterisk on socket file /var/lib/mysql/mysql.sock 
with username asterisk.
MyAsteriskDB connected to MyAsteriskDB at 127.0.0.1, port 3306 with 
username astadmin for 12 minutes.
[May 22 10:32:02] ERROR[11269]: res_config_mysql.c:1599 mysql_reconnect: 
MySQL RealTime: Failed to connect database server asterisk on 
/var/lib/mysql/mysql.sock (err 1045). Check debug for more info.
*CLI>

However, SIP-registration for SIP peer can not be found :

[May 22 10:32:50] NOTICE[11077]: chan_sip.c:24957 
handle_request_register: Registration from 
'<sip:testacc66 at my.ip.ast.ser>' failed for '11.22.33.44:5060' - No 
matching peer found

Debug logs say :

[May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: 
Connection okay.
[May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: 
Retrieve SQL: SELECT * FROM sip_buddies WHERE name = 'testacc66' AND 
host = 'dynamic'
[May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: 
Connection okay.
[May 22 10:48:06] DEBUG[11077] res_config_mysql.c: MySQL RealTime: 
Retrieve SQL: SELECT * FROM sip_buddies WHERE name = 'testacc66'


But sip peer testacc66 really exists in my database in table 
sip_buddies. It can not be found ?!


What else is there for me to investigate ? Can u help me ?

Thanks !

Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150522/5943f361/attachment.html>


More information about the asterisk-users mailing list