Hi,
I have created a set of time group, and I want to replicate them on another freepbx server (same versions).
Do you know where this information is stored so that I can copy paste them? There is no import button, could it be stored in a file? Or do I have to create them from scratch?
Time groups are usually pretty simple. Normally, it is faster to just recreate them than to try copying stuff around.
Now - if you are setting up a âreplicationâ kind of thing (change something on server A and it gets changed on server B), thatâs a different question. I donât know of a way to do that, but Iâm sure James @jfinstrom or Lorne @lgaetz might be able to make some suggestions.
I have 3 servers on 3 sites,
I want similar time groups for the IVR setup for the whole year around.
It is simple yes, but time consuming. We are engineers, there should be a smarter way other than writing everything 3 times.
Does anybody know where the information is stored?
Do not recommend manipulating tables manually, but you askedâŠ
[root@lgaetzdev2 ~]# mysql
mysql> use asterisk
mysql> select * from timegroups_groups;
±â±------------+
| id | description |
±â±------------+
| 2 | Bus hours |
| 3 | test |
±â±------------+
2 rows in set (0.00 sec)
@lgaetz - Iâm not curious enough to look, but curious enough to ask.
Does FreePBX read that information from the Asterisk tables, or does It get recoded from a FreePBX table? If you donât know off the top of your head, never mind. Iâm not curious enough for you look either
If it pulls from Asterisk, changing the tables manually (while never being the recommended method) would actually work reliably and still be manageable from the UI. If that was the case, setting up a cron job to copy the table data around within a server âpoolâ would be trivial.
User enters data in a FreePBX GUI form and hits submit
User data can be written internally to a number of locations, either the astdb, an asterisk MySQL table, or in rare cases a flat conf file, or a combination of these. Most modules write to mysql, follow-me is a good example of a module that writes to the astdb, and voicemail admin writes its config to voicemail.conf. When you create a new extension, all three get written to.
When the user finally clicks âApply Configâ, FreePBX writes out all the Asterisk .conf files from the user values stored in MySQL, and does an Asterisk âcore reloadâ to apply the new config to the running asterisk.
So when you say:
Trivial for some perhaps. But such a scheme has to do more than replicate the MySQL asterisk tables, there is also the critical content in the astdb and the few conf files (and *-custom.conf files) to replicate as well. And we havenât talked about the CDR database, custom system prompts, voicemail recordings, faxes, SMSs, and likely a bunch of things I am forgetting.
Some things, without looking at the code so not sure if time groups is one, also edits astdb on save. So importing a database may make something show up in the GUI but then you find out it doesnât actually work because an astdb entry is written on save and not âapply configâ.