[asterisk-users] Realtime - ara180
Hans Witvliet
hwit at a-domani.nl
Thu May 12 11:50:42 CDT 2011
Hi all,
A week or so down the list, i read that not many people were using
realtime on an Asterisk18, so i had this afternoon a go at it...
[sorry for the inconveneant line-wraps]
First i did:
mysql> create database asterisk;
mysql> grant all on asterisk.* to 'voipadmin'@'localhost' identified by
next i used the info from the wiki:
CREATE TABLE `sip_devices` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL DEFAULT '', `context` varchar(80) DEFAULT
NULL, ....
....
[and lots more]
and populated it with a test user:
mysql> 'secret'; insert into sip_devices (name, secret, username, host,
nat) values ('00000031756', 'geheim', '00000031756', 'dynamic', 'Yes');
tested the database:
mysql -h localhost -u voipadmin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12645
Server version: 5.0.67 SUSE MySQL RPM
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select * from sip_devices\G
ERROR 1046 (3D000): No database selected
mysql> use asterisk;
Database changed
mysql> select name,username,secret,host,nat from sip_devices;
+-------------+-------------+--------+---------+-----+
| name | username | secret | host | nat |
+-------------+-------------+--------+---------+-----+
| 00000031756 | 00000031756 | geheim | dynamic | Yes |
+-------------+-------------+--------+---------+-----+
1 row in set (0.00 sec)
mysql>
So-far all looked, as expected, great
Changed the *-config files:
(method, db-name, table-name)
;
;iaxusers => odbc,asterisk
;iaxpeers => odbc,asterisk
;sipusers => odbc,asterisk
sipusers => mysql,asterisk,sip_devices
sippeers => mysql,asterisk,sip_devices
;sippeers => odbc,asterisk
;sipregs => odbc,asterisk
;voicemail => odbc,asterisk
And restarted the asterisk-process...
Some lines from /var/log/asterisk/messages:
May 12 14:05:33] WARNING[2585] config.c: Realtime mapping for 'sippeers'
found to engine 'mysql', but the engine is not available
[May 12 14:05:33] WARNING[2585] config.c: Realtime mapping for
'sippeers' found to engine 'mysql', but the engine is not available
[May 12 14:05:55] WARNING[2630] config.c: Realtime mapping for
'sippeers' found to engine 'mysql', but the engine is not available
And on the asterisk console:
kc3054*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
00000277611 (Unspecified) D N 0 Unmonitored
j.witvliet (Unspecified) D N 0 Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2
offline] [May 12 14:17:47] WARNING[2630]: config.c:2045 find_engine:
Realtime mapping for 'sippeers' found to engine 'mysql', but the engine
is not available
CLI> sip show users
Username Secret Accountcode Def.Context ACL ForcerPort
j.witvliet geheim default No Yes
00000277611 25b06d3a0b5ef73 default No Yes
CLI>
====================================================
1) as shown above, access to mysql seems to be OK,
2) * did not complain at "sip-show-users" but only for "sip-show-peers"
fyi, i use: asterisk180-1.8.3.2-87.1.x86_64.rpm
Any suggesions?
Hans
More information about the asterisk-users
mailing list