Upgrade 3CX to v18 and get it hosted free!

Asterisk Manager API Action UpdateConfig

Author image

UpdateConfig

  • CLI> manager show command updateconfig

Action: UpdateConfig
Synopsis: Update basic configuration
Privilege: config,all
Description: A ‘UpdateConfig’ action will modify, create, or delete
configuration elements in Asterisk configuration files.
Variables (X’s represent 6 digit number beginning with 000000):
SrcFilename: Configuration filename to read(e.g. foo.conf)
DstFilename: Configuration filename to write(e.g. foo.conf)
Reload: Whether or not a reload should take place (or name of specific module)
Action-XXXXXX: Action to Take (NewCat,RenameCat,DelCat,EmptyCat (Version 1.6),Update,Delete,Append,Insert(version 1.6))
Cat-XXXXXX: Category to operate on
Var-XXXXXX: Variable to work on
Value-XXXXXX: Value to work on
Match-XXXXXX: Extra match required to match line
Line-XXXXXX: Line in category to operate on (used with delete and insert actions) (Version 1.6)

Example:

action:updateconfig
reload:yes
srcfilename:manager.conf
dstfilename:manager.conf
Action-000000:append
Cat-000000:newuser
Var-000000:secret
Value-000000:nottelling

To modify extensions.conf one need to prefix the value by ‘>’.
Example:

action:updateconfig
reload:yes
srcfilename: extensions.conf
dstfilename: extensions.conf
Action-000000:append
Cat-000000: ami-test
Var-000000:exten
Value-000000:>999,1,Dial(SIP/Bob)

 

Action: Delete

action: updateconfig
srcfilename: manager.conf
dstfilename: manager.conf
action-000000: delete
cat-000000: newuser
var-000000: secret
value-000000: nottelling
match-000000: nottelling

Both “value” and “match” must be set to delete an entry. Not setting “match” will delete all entries with the variable name in “var”.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.