namespace AsterNET.Manager.Event { /// /// A RegistryEvent is triggered when this asterisk server attempts to register /// as a client at another SIP or IAX server.
/// This event is implemented in channels/chan_iax2.c and /// channels/chan_sip.c ///
public class RegistryEvent : ManagerEvent { private string channelType; private string domain; private string username; private string status; private string cause; /// /// Channel type /// "SIP", /// "IAX2" /// public string ChannelType { get { return this.channelType; } set { this.channelType = value; } } /// /// Get/Set the domain or host name of the SIP or IAX2 server.
/// This is the host part used in the register lines in /// iax.conf and sip.conf. ///
public string Domain { get { return domain; } set { this.domain = value; } } /// /// Get/Set the username used for registration.
/// SIP send the username in case of a registration timeout, IAX2 in case of /// a registration failure. Otherwise the username is null. ///
public string Username { get { return username; } set { this.username = value; } } /// /// Sets the username used for registration. /// /// Please do not use this method it is a workaround for Asterisk 1.0.x servers. See Asterisk bug 4916. public string User { set { this.username = value; } } /// /// Get/Set the registration state.
/// For sip this may be one of (not sure if all of these are exposed via the /// manager api, at least "Registered" and "Timeout" are used though) /// /// IAX2 only uses /// /// Successful IAX2 registrations do not use the this property at all. ///
public string Status { get { return status; } set { this.status = value; } } /// /// Get/Set the cause of a rejected registration. /// The cause of a rejected registration or "<unknown>" if the cause is unknown. /// public string Cause { get { return cause; } set { this.cause = value; } } public RegistryEvent(ManagerConnection source) : base(source) { } } }