AsterNet Class Library (Sandcastle documentation)

| UpdateConfigAction Class

The UpdateConfigAction sends an UpdateConfig command to the asterisk server. Please take note that unlike the manager documentation, this command does not dump back the config file upon success -- it only tells you it succeeded. You should use the handy addCommand method this class provides for specifying what actions you would like to take on the configuration file. It will generate appropriate sequence numbers for the command. You may use the static ACTION_* fields provided by this action to specify what action you would like to take, while avoiding handling the strings required. Plain fields:
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)
Repeatable fields:
Action-XXXXXX: Action to Take (NewCat,RenameCat,DelCat,Update,Delete,Append)
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
Inheritance Hierarchy
System
Object
AsterNET.Manager.Action
ManagerAction
AsterNET.Manager.Action
ManagerActionResponse
AsterNET.Manager.Action
UpdateConfigAction

Namespace: AsterNET.Manager.Action
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy

    public class UpdateConfigAction : ManagerActionResponse

    Public Class UpdateConfigAction
    	Inherits ManagerActionResponse

    public ref class UpdateConfigAction : public ManagerActionResponse

    type UpdateConfigAction =
        class
            inherit ManagerActionResponse
        end

The UpdateConfigAction type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| UpdateConfigAction | Creates a new UpdateConfigAction.
| UpdateConfigAction(String, String) | Creates a new UpdateConfigAction.
| UpdateConfigAction(String, String, Boolean) | Creates a new UpdateConfigAction.
| UpdateConfigAction(String, String, String) | Creates a new UpdateConfigAction.

Top
Methods

| Name | Description
--- | --- | ---
| ActionCompleteResponseClass | (Overrides ManagerActionResponse ActionCompleteResponseClass .)
| AddCommand |
| AddCommand(String) |
| AddCommand(String, String) |
| AddCommand(String, String, String) |
| AddCommand(String, String, String, String) |
| AddCommand(String, String, String, String, String) | Adds a command to update a config file while sparing you the details of the Manager's required syntax. If you want to omit one of the command's sections, provide a null value to this method. The command index will be incremented even if you supply a null for all parameters, though the action will be unaffected.
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
| ToString | (Inherited from ManagerAction.)

Top
Fields

| Name | Description
--- | --- | ---
| ACTION_APPEND |
| ACTION_DELCAT |
| ACTION_DELETE |
| ACTION_NEWCAT |
| ACTION_RENAMECAT |
| ACTION_UPDATE |

Top
Properties

| Name | Description
--- | --- | ---
| Action | Get the name of this action. (Overrides ManagerAction Action.)
| ActionId | (Inherited from ManagerAction.)
| Actions | Dictionary of the action's desired operations where Map keys contain: action,cat,var,value,match pairs followed by -XXXXXX, and the values contain the values for those keys. This method will typically only be used by the ActionBuilder to generate the actual strings to be sent to the manager interface.
| DstFileName | Get/Set the destination filename.
| ProxyKey | You can use this as a simple authentication mechanism. Rather than have to login with a username & password, you can specify a ProxyKey that must be passed from a client before requests are processed. This is helpful in situations where you would like to authenticate and execute an action in a single step. (Inherited from ManagerAction.)
| Reload | Get/Set the reload behavior of this action (yes), or sets a specific module (name) to be reloaded. Set to empty string to update without reload.
| Server | Specify a server to which to send your commands (x.x.x.x or hostname). This should match the server name specified in your config file's "host" entry. If you do not specify a server, the proxy will pick the first one it finds -- fine in single-server configurations. (Inherited from ManagerAction.)
| SrcFileName | Get/Set the source filename.

Top
See Also

#### Reference

AsterNET.Manager.Action Namespace