Hi
I Have 1 My PBX U510 .
Hi
I Have 1 My PBX U510 .
Introduction
The system configuration files including asterisk configurations are stored into database first and then logistically generated by the background applications. Now during the usage, some of the customers (asterisk specialist) would like to manually modify the configurations sometimes. If they operate directly to the configurations of /etc/asterisk/, the configuration file will be updated when customers apply the changes on WEB GUI next time. Reboot the device will result in the update of configuration file as well. Namely, the customized modifications by clients can’t be saved successfully.
Solution
If we want to save the user-defined data, we must save it to the database.
Now in the directory of “/persistent/var/lib/asterisk/db/”, we create a directory “custom-cfg” to store user-defined data. If users want, they can supplement or modify an appropriate configuration file under this directory.
Modified data must saved in this format “*_custom.conf”, such as the changes of sip.conf must be saved in “/persistent/custom-cfg/sip_custom.conf”.
Every time, when background application generates a configuration according to database, there will be a specific thread to check the contents of custom-cfgdirectory and modify the configuration file again.
The items that supports customized are listed in /persistent/custom-cfg/gncustom.conf
Note:
The conf files you can customize are as follows:
[modifyfile]
/etc/asterisk/extensions.conf
/etc/asterisk/sip.conf
/etc/asterisk/users.conf
/etc/asterisk/iax.conf
/etc/asterisk/queues.conf
/etc/asterisk/features.conf
/etc/asterisk/voicemail.conf
/etc/asterisk/meetme.conf
/etc/asterisk/rc_org.conf
/etc/asterisk/rtp.conf
/etc/asterisk/http.conf
/etc/asterisk/musiconhold.conf
/etc/asterisk/followme.conf
/etc/asterisk/logger.conf
/etc/asterisk/manager.conf
/etc/asterisk/chan_dahdi.conf
/etc/asterisk/digital-channel.conf
[replacefile]
/etc/asterisk/dahdi-channels.conf
For example:
The format of configuration files as below:
/persistent/custom-cfg/voicemail_custom.conf
[general]
maxmsg = 100 // It means the default value of masmsg is 100
;maxmin = 200 // It means the deletion of this configuration
…
As these configuration changes are generally for a configuration item’s value, this approach should work well.
Every time, system read the configuration item that users require to operate, and then operate this item from the corresponding configuration file.
Search the configuration item by the format “configuration item=“, such as search maxmsg=
Format as:
[macro-stdPrivacyexten]
exten => s,1,Dial(${ARG2},20,p)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(u${ARG1})
exten => s-NOANSWER,2,Goto(default,s,1)
…
It mainly used for extensions.conf modification.
Replace the context in extensions.conf with user-defined context.