Click or drag to resize
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

Namespace: AsterNET.Manager.Action
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class UpdateConfigAction : ManagerActionResponse

The UpdateConfigAction type exposes the following members.

Constructors
  NameDescription
Public methodUpdateConfigAction
Creates a new UpdateConfigAction.
Public methodUpdateConfigAction(String, String)
Creates a new UpdateConfigAction.
Public methodUpdateConfigAction(String, String, Boolean)
Creates a new UpdateConfigAction.
Public methodUpdateConfigAction(String, String, String)
Creates a new UpdateConfigAction.
Top
Methods
  NameDescription
Public methodActionCompleteResponseClass (Overrides ManagerActionResponseActionCompleteResponseClass.)
Public methodAddCommand
Public methodAddCommand(String)
Public methodAddCommand(String, String)
Public methodAddCommand(String, String, String)
Public methodAddCommand(String, String, String, String)
Public methodAddCommand(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.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString (Inherited from ManagerAction.)
Top
Fields
Properties
  NameDescription
Public propertyAction
Get the name of this action.
(Overrides ManagerActionAction.)
Public propertyActionId (Inherited from ManagerAction.)
Public propertyActions
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.
Public propertyDstFileName
Get/Set the destination filename.
Public propertyProxyKey
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.)
Public propertyReload
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.
Public propertyServer
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.)
Public propertySrcFileName
Get/Set the source filename.
Top
See Also