How to Create Custom Conf Files in Yeastar S-Series VoIP PBX

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 the customers 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 /ysdisk/support, we create a directory custom-cfg to store user-defined data.We need to create a directory customcfg to store user-defined data.

Modified data must saved in the format “*_custom.conf”. For example,  the changes of sip.conf must be saved in /ysdisk/support/customcfg/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 customcfg directory and modify the configuration file again.

To make the custom config file take effect, you need to run the command astconfig under the customcfg folder.

__1.png

Which Config Files Can be Customized

The following config files can be customized in Yeastar S-Series VoIP PBX.

Modify Files

You can write only the modified context in the custom config file.

/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

Replace File

You need copy and paste all the contents including the modified contents in the custom config file.

/etc/asterisk/dahdi-channels.conf

Examples

To modify or delete a specified field in the context of voicemail.conf.

The format of configuration files as below:

/ysdisk/support/customcfg/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.

extensions.conf special processing: replace specified context

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.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.