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


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


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. 


First you would learn how to login the SSH: How to Log in SSH of Yeastar S-Series VoIP PBX

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.


  • 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.


Replace Files

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


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



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. and command: asterisk -rx "module reload"


Additionally, if your custom configs include dialplan changes for extensions.conf.

Execute the command: asterisk -rx "dialplan reload"

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:


[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:


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


Have more questions? Submit a request


  • 0

    Do you know if in the newer firmware version (using pjsip module instead of chan_sip), we can create pjsip_custom.conf?

  • 1

    Hi. One question about S20:

    This is a part of /etc/asterisk/extensions.conf, which i added from web-gui:
    exten = 6501,1,NoOp(without_operator)
    exten = 6501,n,Set(TIMEOUT(digit)=3)
    exten = 6501,n,Background(record/hi-pcm2)
    exten = 6501,n,WaitExten(3)
    exten = 6501,n,Goto(t,1)
    exten = 1,1,Goto(ivrs,6500,1)
    exten = 2,1,Goto(from-outside,1000,1)
    exten = 3,1,Goto(always-Hangup,h,1)
    exten = t,1,Goto(always-Hangup,h,1)
    exten = i,1,Goto(ivrs,6501,1)
    exten = unknown,1,NoOp(No Action)
    exten = fax,1,Goto(inrouter_${INROUTERNAME}_fax_detect,fax,1)


    and this is /ysdisk/support/customcfg/extensions_custom.conf

    exten = 6501,1,NoOp(without_operator)
    exten = 6501,n,Set(TIMEOUT(digit)=3)
    exten = 6501,n,Background(record/hi-pcm2)
    exten = 6501,n,WaitExten(3)
    exten = 6501,n,Goto(t,1)
    exten = 1,1,System(wget "${CALLERIDNUM}")
    exten = 1,2,Hangup()
    exten = 2,1,Goto(from-outside,1000,1)
    exten = t,1,Goto(always-Hangup,h,1)
    exten = i,1,Goto(ivrs,6501,1)
    exten = unknown,1,NoOp(No Action)
    exten = fax,1,Goto(inrouter_${INROUTERNAME}_fax_detect,fax,1)

    I do "astconfig" from customcfg dir, reload, restart asterisk, device in different orders, but extensions_custom.cfg do not applies to extensions.conf, and works rules only from /etc/asterisk/extensions.conf

    What i do wrong?


  • 1

    I support the question, only for the S100. Why is not activated extensions_custom.cfg?
    (I used the commands "astconfig" and then asterisk -rx 'module reload')

    And I also drew attention to strange mistakes after the command:
    asterisk -rx "dialplan show 272700@callin_trunk_272700"
    Could not open the specified codec configuration file '/ysdisk/ysapps/pbxcenter/etc/codec.conf' using the default built-in values
    Can not disable kernel resource limit: operation not allowed

    Is this message the reason?

    Edited by Starkomt
  • 0


    i created an iax_custom.conf and a extensions_custom.conf. The IAX ist working, but they do not jump in the from-intercom context

    and a extensions_custom.conf
    exten = 600,1,Playback(demo-echotest)
    but when i call the through the IAX they dont jump to the [from-intercom01] context
    I reload it from asterisk and restart the S20
    astconfig tells me Permission denied
    Edited by Michael Mitch Marciniak
  • 0

    Hi Michael, could you share the Asterisk logs when you test?

    Also you type command to return the result: dialplan show from-intercom01

  • 0

    hello everyone,

    I'm not so sure about the settings or the operation via ssh.

    I wanted to create a custom header, because i have some problems with call forwarding.

    I have the issue, that i want to forward a call to an external number.

    The trunk supports clip no screening.

    If i do the settings for clip no screening in the p series the original caller id is only display in the  From Display Name Part....

    But I need this in the from header.

    Any setting i do in the trunk wont solve this problem.

    Maybe you have some ideas to fix this problem.

    Kind regards


    Asllan Crmjani

  • 0

    Hello, I upload extensions_support.conf file with modified parameters but by my mistake in wrong format (ends of the lines) :(....I didnt noticed and didnt check..

    So parameters uploaded like that:


    Every line ends with "^M". And know this wrong parameters are permanently in /etc/asterisk/extensions.conf.

    I tried everything but I cannot remove paragraph [macro-realstexten]^M

    I uploaded empty file "extensions_support.conf" or with empty paragraphs [macro-realstexten] but no change.

    Please is there any "hack" how to REMOVE CONTEXT, nut just modify? I tried load PBX to default, but no change....

    Many thanks guys.

Please sign in to leave a comment.