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?
@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”.