Search:
     
3CX Phone System for Windows Download the Free Edition

Asterisk Manager API Action UpdateConfig

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".
Created by: justhamade,Last modification on Sat 16 of Oct, 2010 [20:19 UTC] by hetojoan


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

 





Search: