Overview
Some tech skilled clients want to do some custom configuration for the Asterisk config files to meet their needs when the features are not supported by Yeastar.
If the clients modify the config file in /etc/asterisk/, the changes will be lost when you save and apply any changes on WEB GUI. PBX reboot would also make the changes lost.
- Solution
- Which Config Files Can be Customized
- Content format
- Examples
Disclaimer
Please note the risk of the custom config of misfunctioning or system stability issues. We only offer the way how to customize the config and offer suggestions. And we don't cover the support to realize your custom config.
Solution
First you would learn how to login the SSH: How to Log in SSH of Yeastar S-Series VoIP PBX
For P-Series: Access the System via SSH
As the solution all done in the SSH session.
The solution is to create “*_custom.conf” config file in the path of /ysdisk/support/customcfg/. For example, the changes of pjsip.conf must be saved in pjsip_custom.conf.
Note:
- The extensions.conf is exception for the naming rule which also has the other file called extensions_support.conf. You would see how it is going in the following part of the article.
- The operation in this article requires some basic Linux knowledge like how to use vi command etc... If you are not good at it, it could be a little difficult for you.
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.
[modifyfile]
/etc/asterisk/extensions.conf
/etc/asterisk/pjsip.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/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/udptl.conf
Replace Files
You need copy and paste all the contents including the modified contents in the custom config file.
/etc/asterisk/dahdi-channels.conf
/etc/asterisk/digital-channel.conf
Content format
The content in the custom config file consists of 2 major parts.
- Context name
- Configuration parameter
It can have several contexts with its respective configuration parameters.
[Context Name 1]
Configuration parameter 1
Configuration parameter 2
...
[Context Name 2]
Configuration parameter 1
Configuration parameter 2
...
Examples
First you would need to know every time when you save and apply any changes on WEB GUI or PBX reboot specific, PBX would read and update the data fromthe custom config files.
While if you would like to update the change instantly for test purpose in the SSH session. You could execute the command astconfig (Not Available for P-Series). and command: asterisk -rx "module reload"
Additionally, if your custom configs include dialplan changes for extensions.conf.
Execute the command: asterisk -rx "dialplan reload"
Tips:
To let the the change take effect for P-Series, you can change anything on inbound route. Click Save and Apply, then revert the change and clickd Save&Apply.
Then let's see the examples:
1. Modify Files
To modify or delete a specified field in the context of voicemail.conf.
Just pick the the configuration you need to customize and add it followed by the context.
The format of configuration files as below:
/ysdisk/support/customcfg/voicemail_custom.conf
[general] // this the context name
maxmsg = 100 // It means the default value of masmsg is 100, you could change it other value according to Asterisk config file instructions.
;maxmin = 200 // The ; means comment the configuration.
…
Also here is article for reference: Expand the Time of Customized Voicemail Greeting
2. Replaces Files
The common config file we customize is the extensions.conf.
Specifically here, you need to edit the /ysdisk/support/customcfg/extensions_support.conf. If you meet the permission to edit extensions_support.conf. You can try to execute the following commands to gain the permission.
rm /ysdisk/support/customcfg/extensions_support.conf
touch /ysdisk/support/customcfg/extensions_support.conf
After you have the edit permission, Copy the all the content of [macro-stdPrivacyexten] from /etc/asterisk/extensions.conf to the /ysdisk/support/customcfg/extensions_support.conf.
Such 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)
… (Other lines are ignore here)
In practical case, please replace the context in extensions.conf with user-defined context.
Also you can refer the example in this article: Block dialing to specific extensions in IVR
7 Comments