<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>UpdateConfig</title><link rel="stylesheet" href="styles.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /><link rel="start" href="index.html" title="Asterisk™: The Future of Telephony" /><link rel="up" href="asterisk-APP-F.html" title="Appendix F. Asterisk Manager Interface Actions" /><link rel="prev" href="asterisk-APP-F-41.html" title="UnpauseMonitor" /><link rel="next" href="asterisk-APP-F-43.html" title="UserEvent" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">UpdateConfig</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-F-41.html">Prev</a> </td><th width="60%" align="center">Appendix F. Asterisk Manager Interface Actions</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-F-43.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-F-42"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>UpdateConfig — Updates a config file</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4229549"></a><h2></h2><p><a id="I_indexterm_tt2910" class="indexterm"></a>Dynamically updates an Asterisk configuration file.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4229567"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"> <code class="literal">SrcFilename</code> </span></dt><dd><p>[<span class="optional">required</span>] The filename of the configuration file from which to read the current information.</p></dd><dt><span class="term"> <code class="literal">DstFilename</code> </span></dt><dd><p>[<span class="optional">required</span>] The filename of the configuration file to be written.</p></dd><dt><span class="term"> <code class="literal">Reload</code> </span></dt><dd><p>[<span class="optional">optional</span>] Specifies whether or not a reload should take place after the configuration update, or the name of a specific module that should be reloaded.</p></dd><dt><span class="term"> <code class="literal">Action-<em class="replaceable"><code>XXXXXX</code></em> </code> </span></dt><dd><p>[<span class="optional">required</span>] An action to take. Can be one of <code class="literal">NewCat</code>, <code class="literal">RenameCat</code>, <code class="literal">DelCat</code>, <code class="literal">Update</code>, <code class="literal">Delete</code>, or <code class="literal">Append</code>.</p></dd><dt><span class="term"> <code class="literal">Cat-<em class="replaceable"><code>XXXXXX</code></em> </code> </span></dt><dd><p>[<span class="optional">required</span>] The name of the category to operate on.</p></dd><dt><span class="term"> <code class="literal">Var-<em class="replaceable"><code>XXXXXX</code></em> </code> </span></dt><dd><p>[<span class="optional">optional</span>] The name of the variable to operate on.</p></dd><dt><span class="term"> <code class="literal">Value-<em class="replaceable"><code>XXXXXX</code></em> </code> </span></dt><dd><p>[<span class="optional">optional</span>] The value of the variable to operate on.</p></dd><dt><span class="term"> <code class="literal">Match-<em class="replaceable"><code>XXXXXX</code></em> </code> </span></dt><dd><p>[<span class="optional">optional</span>] If set, an extra parameter that must be matched on the line.</p></dd><dt><span class="term"> <code class="literal">ActionID</code> </span></dt><dd><p>[<span class="optional">optional</span>] An identifier that can be used to identify the response to this action.</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4229845"></a><h2>Privilege</h2><p><code class="literal">config</code>, <code class="literal">all</code></p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4229864"></a><h2>Example</h2><a id="I_programlisting_tt2911"></a><pre class="programlisting">Action: UpdateConfig SrcFilename: sip.conf DstFilename: test.conf Action-000000: update Cat-000000: linksys Var-000000: mailbox Value-000000: 101@lab <code class="computeroutput"> Response: Success</code> </pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4229887"></a><h2>Notes</h2><p>Note that the first set of parameters should be numbered <code class="literal">000000</code>, the second <code class="literal">000001</code>, and so on. This allows you to update many different configuration values at the same time. It should also be noted that the Asterisk GUI uses this its primary mechanism for updating the configuration of Asterisk.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-F-41.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-F.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-F-43.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">UnpauseMonitor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> UserEvent</td></tr></table></div><div xmlns="" id="svn-footer"><hr /><p>You are reading <em>Asterisk: The Future of Telephony</em> (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.<br /> This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works License v3.0</a>.<br /> To submit comments, corrections, or other contributions to the text, please visit <a href="http://oreilly.com/catalog/9780596510480/">http://www.oreilly.com/</a>.</p></div></body></html>