Asterisk-Java

org.asteriskjava.manager.event
Class TransferEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.asteriskjava.manager.event.ManagerEvent
          extended by org.asteriskjava.manager.event.TransferEvent
All Implemented Interfaces:
java.io.Serializable

public class TransferEvent
extends ManagerEvent

A TransferEvent is triggered when a SIP channel is transfered.

It is implemented in channels/chan_sip.c.

Available since Asterisk 1.6 for SIP channels.

Since:
1.0.0
Version:
$Id: TransferEvent.java 1117 2008-08-16 16:43:57Z srt $
Author:
srt
See Also:
Serialized Form

Field Summary
static java.lang.String TRANSFER_METHOD_SIP
           
static java.lang.String TRANSFER_TYPE_ATTENDED
           
static java.lang.String TRANSFER_TYPE_BLIND
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TransferEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getChannel()
          Returns the name of the transfering channel.
 java.lang.String getSipCallId()
          Returns the SIP call id.
 java.lang.String getTargetChannel()
          Returns the name of the target channel.
 java.lang.String getTargetUniqueId()
          Returns the unique id of the target channel.
 java.lang.Boolean getTransfer2Parking()
          Returns whether this is a transfer to a parking extension.
 java.lang.String getTransferContext()
          Returns the target context (in the dialplan) the call is transfered to.
 java.lang.String getTransferExten()
          Returns the target extension the call is transfered to.
 java.lang.String getTransferMethod()
          Returns the transfer method.
 java.lang.String getTransferType()
          Returns whether this is an attended or a blind transfer.
 java.lang.String getUniqueId()
          Returns the unique id of the transfering channel.
 boolean isAttended()
          Checks whether this is an attended transfer or not.
 boolean isBlind()
          Checks whether this is a blind transfer or not.
 boolean isParking()
          Convenience method to check if this is a transfer to a parking extension.
 void setChannel(java.lang.String channel)
           
 void setSipCallId(java.lang.String sipCallId)
           
 void setTargetChannel(java.lang.String targetChannel)
           
 void setTargetUniqueId(java.lang.String targetUniqueId)
           
 void setTransfer2Parking(java.lang.Boolean transfer2Parking)
           
 void setTransferContext(java.lang.String transferContext)
           
 void setTransferExten(java.lang.String transferExten)
           
 void setTransferMethod(java.lang.String transferMethod)
           
 void setTransferType(java.lang.String transferType)
           
 void setUniqueId(java.lang.String uniqueId)
           
 
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent
appendPropertyIfNotNull, getDateReceived, getFile, getFunc, getLine, getPrivilege, getSequenceNumber, getServer, getTimestamp, setDateReceived, setFile, setFunc, setLine, setPrivilege, setSequenceNumber, setServer, setTimestamp, 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
 

Field Detail

TRANSFER_METHOD_SIP

public static final java.lang.String TRANSFER_METHOD_SIP
See Also:
Constant Field Values

TRANSFER_TYPE_ATTENDED

public static final java.lang.String TRANSFER_TYPE_ATTENDED
See Also:
Constant Field Values

TRANSFER_TYPE_BLIND

public static final java.lang.String TRANSFER_TYPE_BLIND
See Also:
Constant Field Values
Constructor Detail

TransferEvent

public TransferEvent(java.lang.Object source)
Method Detail

getChannel

public java.lang.String getChannel()
Returns the name of the transfering channel.

Returns:
channel the name of the transfering channel.

setChannel

public void setChannel(java.lang.String channel)

getUniqueId

public java.lang.String getUniqueId()
Returns the unique id of the transfering channel.

Returns:
the unique id of the transfering channel.

setUniqueId

public void setUniqueId(java.lang.String uniqueId)

getTransferMethod

public java.lang.String getTransferMethod()
Returns the transfer method. Currently this is always "SIP".

Returns:
the transfer method ("SIP").

setTransferMethod

public void setTransferMethod(java.lang.String transferMethod)

getTransferType

public java.lang.String getTransferType()
Returns whether this is an attended or a blind transfer. Possible values are "Attended" and "Blind".

Returns:
"Attended" if this an attended transfer, "Blind" if it is a blind transfer.
See Also:
TRANSFER_TYPE_ATTENDED, TRANSFER_TYPE_BLIND

isAttended

public boolean isAttended()
Checks whether this is an attended transfer or not.

Returns:
true if this is an attended transfer, false if not.

isBlind

public boolean isBlind()
Checks whether this is a blind transfer or not.

Returns:
true if this is an blind transfer, false if not.

setTransferType

public void setTransferType(java.lang.String transferType)

getSipCallId

public java.lang.String getSipCallId()
Returns the SIP call id.

Returns:
the SIP call id.

setSipCallId

public void setSipCallId(java.lang.String sipCallId)

getTargetChannel

public java.lang.String getTargetChannel()
Returns the name of the target channel.

Returns:
the name of the target channel.

setTargetChannel

public void setTargetChannel(java.lang.String targetChannel)

getTargetUniqueId

public java.lang.String getTargetUniqueId()
Returns the unique id of the target channel.

Returns:
the unique id of the target channel.

setTargetUniqueId

public void setTargetUniqueId(java.lang.String targetUniqueId)

getTransferExten

public java.lang.String getTransferExten()
Returns the target extension the call is transfered to. This is only available for blind transfers. If the call is transfered to a parking extension, the parking extension is returned.

Returns:
the target extension the call is transfered to or null for attended transfers.

setTransferExten

public void setTransferExten(java.lang.String transferExten)

getTransferContext

public java.lang.String getTransferContext()
Returns the target context (in the dialplan) the call is transfered to. This is only available for blind transfers. If the call is transfered to a parking extension null is returned.

Returns:
the target context the call is transfered to or null for attended transfers and transfers to a parking extension.

setTransferContext

public void setTransferContext(java.lang.String transferContext)

getTransfer2Parking

public java.lang.Boolean getTransfer2Parking()
Returns whether this is a transfer to a parking extension.

Returns:
Boolean.TRUE if this is a transfer to a parking extension, null otherwise.

setTransfer2Parking

public void setTransfer2Parking(java.lang.Boolean transfer2Parking)

isParking

public boolean isParking()
Convenience method to check if this is a transfer to a parking extension.

Returns:
true if this is a transfer to a parking extension, false otherwise.

Asterisk-Java

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