In the current situation FreePBX a cronjob calls ‘fwconsole -r’ to reload the initial values of variables in a inbound routing script.
Is it possible to reload 1 configuration file (eg globals.conf) via fwconsole, so variables get the default values as intended at the beginning of the day without a full reload of all configuration files ?
What’s the actual problem? Unchanged files don’t get reloaded, although I’m not sure how that works with includes.
fwconsole reload will always rebuild all the .conf files from it’s mysql tables then call ‘core reload’ ,
rasterisk -x 'core reload' will just reload all the .conf files , so it depends on how you built your personalizations, it is not possible to selectively reload any .conf file with ‘globals’
I originally confused the fwconsole operation with the Asterisk one that forms part of it. fwconsole will touch all the .conf files, then issues a reload for everything, and therefore forces Asterisk to read all of them.
If what you are trying to do is to manipulate global variables externally, the correct way to do this is with AMI (although, if you have initial values in custom .conf files, you will need to update those, in parallel.
Asterisk can reload less than all .conf files, even if they have been touched. I haven’t investigated how fine grained you can get, but I think it is basically module level, as I think telling it to reload a file really means reload the module that uses that file. I also know that it looks at modification dates on included files, but don’t know if it is clever enough to only process those that have changed, rather than the whole tree (it would need to know from which file a particular setting came, as it needs to tentatively delete everything that might have changed.)
Thanks for this info. Have to find another way to reset the global variable values to the reload/restart/initiate values as defined.
Background info: I use global variables to set a start value at the beginning of the day. During the day these values can be adjusted, but at the end of the workingday I want these back to the initial value. Currently I use fwconsole -r for that, but I would like to refine this
After reading this explaination again, I decided to change my crontab to asterisk -x ‘core reload’. Job runs at 5pm, so it shoulb be clear afterwards. I don’t need configurations files to be generated, only a reload. See if this makes the difference
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.