AsterNet Class Library (Sandcastle documentation)
AsterNet Class Library (Sandcastle documentation)
AsterNET.Manager.Event
PeerStatusEvent Class
PeerStatusEvent Constructor
PeerStatusEvent Methods
PeerStatusEvent Properties

| PeerStatusEvent Class

A PeerStatusEvent is triggered when a SIP or IAX client attempts to registrer at this asterisk server.
This event is implemented in channels/chan_iax2.c and channels/chan_sip.c
Inheritance Hierarchy
System
Object
System
EventArgs
AsterNET.Manager.Event
ManagerEvent
AsterNET.Manager.Event
PeerStatusEvent

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

    public class PeerStatusEvent : ManagerEvent

    Public Class PeerStatusEvent
    	Inherits ManagerEvent

    public ref class PeerStatusEvent : public ManagerEvent

    type PeerStatusEvent =
        class
            inherit ManagerEvent
        end

The PeerStatusEvent type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| PeerStatusEvent | Initializes a new instance of the PeerStatusEvent class

Top
Methods

| Name | Description
--- | --- | ---
| 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.)
| Parse | Unknown properties parser (Inherited from ManagerEvent.)
| ParseSpecial | Unknown properties parser. (Inherited from ManagerEvent.)
| ToString | Convert all properties to string (Inherited from ManagerEvent.)

Top
Properties

| Name | Description
--- | --- | ---
| Attributes | Store all unknown (without setter) keys from manager event. Use in default Parse method Parse(String, String) (Inherited from ManagerEvent.)
| Cause | Returns the cause of a rejection or unregistration. For IAX peers this is set only if the status equals "Rejected". For SIP peers this is set if the status equals "Unregistered" and the peer was unregistered due to an expiration. In that case the cause is set to "Expired".
| Channel | Get/Set the name of the channel. (Inherited from ManagerEvent.)
| ChannelType | Channel type "SIP", "IAX2
| DateReceived | Get/Set the point in time this event was received from the Asterisk server. Pseudo events that are not directly received from the asterisk server (for example ConnectEvent and DisconnectEvent) may return null. (Inherited from ManagerEvent.)
| Peer | Returns the name of the peer that registered. The peer's name starts with "IAX2/" if it is an IAX client or "SIP/" if it is a SIP client. It is followed by the username that is used for registration.
| PeerStatus | Returns the registration state. This may be one of Registered Unregistered Reachable Lagged Unreachable Rejected (IAX only)
| Privilege | Get/Set the AMI authorization class of this event. This is one or more of system, call, log, verbose, command, agent or user. Multiple privileges are separated by comma. Note: This property is not available from Asterisk 1.0 servers. (Inherited from ManagerEvent.)
| 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 ManagerEvent.)
| Source | The ManagerConnection the Event was sourced from. (Inherited from ManagerEvent.)
| Time | Returns the ping time of the client if status equals "Reachable" or "Lagged"; if the status equals "Unreachable" it returns how long the last response took (in ms) for IAX peers or -1 for SIP peers.
| Timestamp | Returns the timestamp for this event. The timestamp property is available in Asterisk since 1.4 if enabled in manager.conf by setting timestampevents = yes. In contains the time the event was generated in seconds since the epoch. (Inherited from ManagerEvent.)
| UniqueId | Get/Set the unique id of the channel. (Inherited from ManagerEvent.)

Top
See Also

#### Reference

AsterNET.Manager.Event Namespace