Can anyone help me identify if the configuration for static realtime changed in 1.6.1.x? I have been following the compiled resources from voip-info and some other locations to get these settings:
— modules.conf
[modules]
autoload=yes
preload => res_config_mysql.so
preload => func_strings.so
noload => pbx_gtkconsole.so
load => res_musiconhold.so
noload => chan_alsa.so
noload => chan_console.so
— res_mysql.conf
[general]
dbhost = (retracted)
dbname = asterisk
dbuser = asterisk
dbpass = (retracted)
dbport = 3306
;dbsock = /tmp/mysql.sock
;dbsock = /var/lib/mysql/mysql.sock
requirements=createclose ; warn or createclose or createchar
— extconfig.conf
[settings]
extensions.conf => mysql,general,static_config
features.conf => mysql,general,static_config
sip.conf => mysql,general,static_config
sipusers => mysql,general,sip_buddies
sippeers => mysql,general,sip_buddies
sipregs => mysql,general,sip_buddies
extensions => mysql,general,extensions
queues => mysql,general,queues
queue_members => mysql,general,queue_members
voicemail => mysql,general,voicemessages
— MySQL db/table setup
Implemented table for static realtime according to the voip-info link (except I changed ast_config to static_config):
voip-info.org/wiki/view/Aste … ime+Static
mysql> show databases ;
+--------------------+
| Database |
+--------------------+
| information_schema |
| asterisk |
| mysql |
| test |
+--------------------+
mysql> use asterisk
mysql> show tables
-> ;
+--------------------+
| Tables_in_asterisk |
+--------------------+
| extensions |
| queue_members |
| queues |
| sip_buddies |
| static_config |
| voicemessages |
+--------------------+
mysql> select * from static_config ;
+----+------------+------------+-----------+-----------------+----------+-----------------+------------------------+
| id | cat_metric | var_metric | commented | filename | category | var_name | var_val |
+----+------------+------------+-----------+-----------------+----------+-----------------+------------------------+
| 1 | 0 | 0 | 0 | extensions.conf | general | static | yes |
| 2 | 0 | 1 | 0 | extensions.conf | general | writeprotect | no |
| 3 | 0 | 2 | 0 | extensions.conf | general | clearglobalvars | no |
| 4 | 1 | 0 | 0 | extensions.conf | globals | CONSOLE | Console/dsp |
| 5 | 1 | 1 | 0 | extensions.conf | globals | IAXINFO | guest |
| 6 | 1 | 2 | 0 | extensions.conf | globals | TRUNK | DAHDI/G2 |
| 7 | 1 | 3 | 0 | extensions.conf | globals | TRUNKMSD | 1 |
| 8 | 1 | 4 | 0 | extensions.conf | globals | RINGTIME | 20 |
| 9 | 1 | 5 | 0 | extensions.conf | globals | PAGING_HEADER | Intercom |
| 10 | 1 | 6 | 0 | extensions.conf | globals | PAGING_TIMEOUT | 60 |
| 11 | 1 | 7 | 0 | extensions.conf | globals | CID_6000 | User 1 |
| 12 | 2 | 0 | 0 | extensions.conf | default | exten | 2000,1,VoicemailMain() |
| 13 | 2 | 1 | 0 | extensions.conf | default | switch | Realtime/@extensions |
| 14 | 2 | 2 | 0 | extensions.conf | default | exten | 4001,1,Dial(SIP/4001) |
+----+------------+------------+-----------+-----------------+----------+-----------------+------------------------+
The extensions and sip_buddies tables have been populated as well.
— Notes:
I renamed the .conf files that I defined in the database to .old names to keep them from conflicting.
I have the mysql server on a separate system than the asterisk server. This seems to be fine as I did had the dynamic realtime extensions working before I tried to configure static realtime, so I am pretty sure my db connection is good. Also, I can run the mysql client from the asterisk system and read any of the values I need with the correct user/password from the res_mysql.conf.
“core show config mappings” seems to be correct:
Config Engine: mysql
===> voicemail (db=general, table=voicemessages)
===> queue_members (db=general, table=queue_members)
===> queues (db=general, table=queues)
===> extensions (db=general, table=extensions)
===> sipregs (db=general, table=sip_buddies)
===> sippeers (db=general, table=sip_buddies)
===> sipusers (db=general, table=sip_buddies)
===> sip.conf (db=general, table=static_config)
===> features.conf (db=general, table=static_config)
===> extensions.conf (db=general, table=static_config)
and “realtime mysql status” returns good connection info:
general connected to asterisk@192.168.243.129, port 3306 with username asterisk for 1 hours, 7 minutes.
— Problem:
When I use “dialplan show” at the CLI, it doesn’t show me any extensions I have defined in the static_config table, nor the dynamic realtime “extensions” table. In addition the extensions actually don’t work, so it doesn’t seem to be just a display issue at the CLI.
— Questions:
I haven’t seen anything definitive either way; Can I do BOTH static realtime and dynamic realtime?
The information I have come across suggests the static config worked very well with MySQL on 1.6.0.x, but I have found some indication that it broke for someone with 1.6.1.x. Can anyone confirm?
Am I totally missing anything?
Any other files, logs, etc which would be helpful?