# Asterisk Project : Asterisk 13 ManagerEvent_VarSet

Created by wikibot on Aug 08, 2014

# VarSet

### Synopsis

Raised when a variable local to the gosub stack frame is set due to a subroutine call.

### Description

### Syntax

    Event: VarSet
    Channel: <value>
    ChannelState: <value>
    ChannelStateDesc: <value>
    CallerIDNum: <value>
    CallerIDName: <value>
    ConnectedLineNum: <value>
    ConnectedLineName: <value>
    AccountCode: <value>
    Context: <value>
    Exten: <value>
    Priority: <value>
    Uniqueid: <value>
    Variable: <value>
    Value: <value>

##### Arguments

- `Channel`
- `ChannelState` - A numeric code for the channel's current state, related to ChannelStateDesc
- `ChannelStateDesc`
  - `Down`
  - `Rsrvd`
  - `OffHook`
  - `Dialing`
  - `Ring`
  - `Ringing`
  - `Up`
  - `Busy`
  - `Dialing Offhook`
  - `Pre-ring`
  - `Unknown`
- `CallerIDNum`
- `CallerIDName`
- `ConnectedLineNum`
- `ConnectedLineName`
- `AccountCode`
- `Context`
- `Exten`
- `Priority`
- `Uniqueid`
- `Variable` - The LOCAL variable being set.

  Note

  Icon

  The variable name will always be enclosed with `LOCAL()`

- `Value` - The new value of the variable.

### Class

DIALPLAN

### See Also

- Asterisk 13 Application_GoSub
- Asterisk 13 AGICommand_gosub
- Asterisk 13 Function_LOCAL
- Asterisk 13 Function_LOCAL_PEEK

### Synopsis

Raised when a variable is shared between channels.

### Description

### Syntax

    Event: VarSet
    Channel: <value>
    ChannelState: <value>
    ChannelStateDesc: <value>
    CallerIDNum: <value>
    CallerIDName: <value>
    ConnectedLineNum: <value>
    ConnectedLineName: <value>
    AccountCode: <value>
    Context: <value>
    Exten: <value>
    Priority: <value>
    Uniqueid: <value>
    Variable: <value>
    Value: <value>

##### Arguments

- `Channel`
- `ChannelState` - A numeric code for the channel's current state, related to ChannelStateDesc
- `ChannelStateDesc`
  - `Down`
  - `Rsrvd`
  - `OffHook`
  - `Dialing`
  - `Ring`
  - `Ringing`
  - `Up`
  - `Busy`
  - `Dialing Offhook`
  - `Pre-ring`
  - `Unknown`
- `CallerIDNum`
- `CallerIDName`
- `ConnectedLineNum`
- `ConnectedLineName`
- `AccountCode`
- `Context`
- `Exten`
- `Priority`
- `Uniqueid`
- `Variable` - The SHARED variable being set.

  Note

  Icon

  The variable name will always be enclosed with `SHARED()`

- `Value` - The new value of the variable.

### Class

DIALPLAN

### See Also

- Asterisk 13 Function_SHARED

### Synopsis

Raised when a variable is set to a particular value.

### Description

### Syntax

    Event: VarSet
    Channel: <value>
    ChannelState: <value>
    ChannelStateDesc: <value>
    CallerIDNum: <value>
    CallerIDName: <value>
    ConnectedLineNum: <value>
    ConnectedLineName: <value>
    AccountCode: <value>
    Context: <value>
    Exten: <value>
    Priority: <value>
    Uniqueid: <value>
    Variable: <value>
    Value: <value>

##### Arguments

- `Channel`
- `ChannelState` - A numeric code for the channel's current state, related to ChannelStateDesc
- `ChannelStateDesc`
  - `Down`
  - `Rsrvd`
  - `OffHook`
  - `Dialing`
  - `Ring`
  - `Ringing`
  - `Up`
  - `Busy`
  - `Dialing Offhook`
  - `Pre-ring`
  - `Unknown`
- `CallerIDNum`
- `CallerIDName`
- `ConnectedLineNum`
- `ConnectedLineName`
- `AccountCode`
- `Context`
- `Exten`
- `Priority`
- `Uniqueid`
- `Variable` - The variable being set.
- `Value` - The new value of the variable.

### Class

DIALPLAN

### See Also

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538