I’m using Asterisk@Home, and I’m trying to get the MySQL Realtime configuration working, without any luck. According to voip-info.org/wiki/view/Asterisk+RealTime, I’m doing this right, but it still doesn’t work. (when I do ‘sip show peers’ in the asterisk console, I don’t get any of the peers in the MySQL database)
Asterisk@Home comes with the following mysql tables in the asteriskrealtime database:
mysql> show tables;
+----------------------------+
| Tables_in_asteriskrealtime |
+----------------------------+
| extensions |
| iax_buddies |
| queue_member_table |
| queue_table |
| sip_buddies |
| voicemail_users |
+----------------------------+
6 rows in set (0.01 sec)
The really important tables (extensions and sip_buddies) look like this:
mysql> desc extensions;
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | | MUL | NULL | auto_increment |
| context | varchar(20) | | PRI | | |
| exten | varchar(20) | | PRI | | |
| priority | tinyint(4) | | PRI | 0 | |
| app | varchar(20) | | | | |
| appdata | varchar(128) | | | | |
+----------+--------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
mysql> desc sip_buddies;
+----------------+--------------+------+-----+-------------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+-------------------------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| name | varchar(80) | | UNI | | |
| accountcode | varchar(20) | YES | | NULL | |
| amaflags | varchar(7) | YES | | NULL | |
| callgroup | varchar(10) | YES | | NULL | |
| callerid | varchar(80) | YES | | NULL | |
| canreinvite | char(3) | YES | | yes | |
| context | varchar(80) | YES | | NULL | |
| defaultip | varchar(15) | YES | | NULL | |
| dtmfmode | varchar(7) | YES | | NULL | |
| fromuser | varchar(80) | YES | | NULL | |
| fromdomain | varchar(80) | YES | | NULL | |
| fullcontact | varchar(80) | YES | | NULL | |
| host | varchar(31) | | | | |
| insecure | varchar(4) | YES | | NULL | |
| language | char(2) | YES | | NULL | |
| mailbox | varchar(50) | YES | | NULL | |
| md5secret | varchar(80) | YES | | NULL | |
| nat | varchar(5) | | | no | |
| deny | varchar(95) | YES | | NULL | |
| permit | varchar(95) | YES | | NULL | |
| mask | varchar(95) | YES | | NULL | |
| pickupgroup | varchar(10) | YES | | NULL | |
| port | varchar(5) | | | | |
| qualify | char(3) | YES | | NULL | |
| restrictcid | char(1) | YES | | NULL | |
| rtptimeout | char(3) | YES | | NULL | |
| rtpholdtimeout | char(3) | YES | | NULL | |
| secret | varchar(80) | YES | | NULL | |
| type | varchar(6) | | | friend | |
| username | varchar(80) | | | | |
| disallow | varchar(100) | YES | | all | |
| allow | varchar(100) | YES | | g729;ilbc;gsm;ulaw;alaw | |
| musiconhold | varchar(100) | YES | | NULL | |
| regseconds | int(11) | | | 0 | |
| ipaddr | varchar(15) | | | | |
| regexten | varchar(80) | | | | |
| cancallforward | char(3) | YES | | yes | |
+----------------+--------------+------+-----+-------------------------+----------------+
38 rows in set (0.00 sec)
And this is the contents of my extconfig.conf:
[settings]
sipusers => mysql,asteriskrealtime,sip_buddies
sippeers => mysql,asteriskrealtime,sip_buddies
extensions => mysql,asteriskrealtime,extensions