net.sf.asterisk.manager.event
Class RegistryEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sf.asterisk.manager.event.ManagerEvent
          extended by net.sf.asterisk.manager.event.RegistryEvent
All Implemented Interfaces:
java.io.Serializable

public class RegistryEvent
extends ManagerEvent

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

Version:
$Id: RegistryEvent.java,v 1.7 2005/08/28 10:37:55 srt Exp $
Author:
srt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RegistryEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getCause()
          Returns the cause of a rejected registration.
 java.lang.String getChannel()
          Returns the type of channel that is registered, i.e.
 java.lang.String getDomain()
          Returns 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.
 java.lang.String getStatus()
          Returns 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) Registered Unregistered Request Sent Auth.
 java.lang.String getUsername()
          Returns the username used for registration.
SIP send the username in case of a registration timeout, IAX2 in case of a registration failure.
 void setCause(java.lang.String cause)
          Sets the cause of a rejected registration.
 void setChannel(java.lang.String channel)
          Sets the type of channel that is registered.
 void setDomain(java.lang.String domain)
          Sets the domain or host name of the SIP or IAX2 server.
 void setStatus(java.lang.String status)
          Sets the registration state.
 void setUser(java.lang.String username)
          Deprecated. Please do not use this method it is a workaround for Asterisk 1.0.x servers. See Asterisk bug 4916.
 void setUsername(java.lang.String username)
          Sets the username used for registration.
 
Methods inherited from class net.sf.asterisk.manager.event.ManagerEvent
getDateReceived, getPrivilege, setDateReceived, setPrivilege, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegistryEvent

public RegistryEvent(java.lang.Object source)
Parameters:
source -
Method Detail

getChannel

public java.lang.String getChannel()
Returns the type of channel that is registered, i.e. "IAX2" for an IAX2 channel or "SIP" for a SIP channel.


setChannel

public void setChannel(java.lang.String channel)
Sets the type of channel that is registered.


getDomain

public java.lang.String getDomain()
Returns 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.


setDomain

public void setDomain(java.lang.String domain)
Sets the domain or host name of the SIP or IAX2 server.


getUsername

public java.lang.String getUsername()
Returns 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.


setUsername

public void setUsername(java.lang.String username)
Sets the username used for registration.


setUser

public void setUser(java.lang.String username)
Deprecated. Please do not use this method it is a workaround for Asterisk 1.0.x servers. See Asterisk bug 4916.

Sets the username used for registration.


getStatus

public java.lang.String getStatus()
Returns 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.


setStatus

public void setStatus(java.lang.String status)
Sets the registration state.


getCause

public java.lang.String getCause()
Returns the cause of a rejected registration.

Returns:
the cause of a rejected registration or "<unknown>" if the cause is unknown.
Since:
0.2

setCause

public void setCause(java.lang.String cause)
Sets the cause of a rejected registration.

Parameters:
cause - the cause of a rejected registration.
Since:
0.2


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.