Asterisk-Java

org.asteriskjava.manager.event
Class DialEvent

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

public class DialEvent
extends ManagerEvent

A dial event is triggered whenever a phone attempts to dial someone.

This event is implemented in apps/app_dial.c.

Available since Asterisk 1.2.

Since:
0.2
Version:
$Id: DialEvent.java 1057 2008-05-20 00:56:28Z srt $
Author:
Asteria Solutions Group, Inc.
See Also:
Serialized Form

Field Summary
static java.lang.String DIALSTATUS_ANSWER
           
static java.lang.String DIALSTATUS_BUSY
           
static java.lang.String DIALSTATUS_CANCEL
           
static java.lang.String DIALSTATUS_CHANUNAVAIL
           
static java.lang.String DIALSTATUS_CONGESTION
           
static java.lang.String DIALSTATUS_DONTCALL
           
static java.lang.String DIALSTATUS_INVALIDARGS
           
static java.lang.String DIALSTATUS_NOANSWER
           
static java.lang.String DIALSTATUS_TORTURE
           
static java.lang.String SUBEVENT_BEGIN
           
static java.lang.String SUBEVENT_END
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DialEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getCallerId()
          Deprecated. as of 1.0.0, use getCallerIdNum() instead.
 java.lang.String getCallerIdName()
          Returns the Caller*ID Name.
 java.lang.String getCallerIdNum()
          Returns the the Caller*ID Number.
 java.lang.String getChannel()
          Returns the name of the source channel.
 java.lang.String getDestination()
          Returns the name of the destination channel.
 java.lang.String getDestUniqueId()
          Returns the unique ID of the destination channel.
 java.lang.String getDialStatus()
          For end subevents this returns whether the completion status of the dial application.
Possible values are: CHANUNAVAIL CONGESTION NOANSWER BUSY ANSWER CANCEL DONTCALL TORTURE INVALIDARGS It corresponds the the DIALSTATUS variable used in the dialplan.
 java.lang.String getDialString()
          Returns the dial string passed to the Dial application.
 java.lang.String getSrc()
          Deprecated. as of 1.0.0, use getChannel() instead.
 java.lang.String getSrcUniqueId()
          Deprecated. as of 1.0.0, use getUniqueId() instead.
 java.lang.String getSubEvent()
          Since Asterisk 1.6 the begin and the end of a dial command generate a Dial event.
 java.lang.String getUniqueId()
          Returns the unique ID of the source channel.
 void setCallerId(java.lang.String callerId)
          Sets the caller*ID.
 void setCallerIdName(java.lang.String callerIdName)
          Sets the Caller*Id Name.
 void setCallerIdNum(java.lang.String callerIdNum)
           
 void setChannel(java.lang.String channel)
          Returns the name of the source channel.
 void setDestination(java.lang.String destination)
          Sets the name of the destination channel.
 void setDestUniqueId(java.lang.String destUniqueId)
          Sets the unique ID of the destination channel.
 void setDialStatus(java.lang.String dialStatus)
           
 void setDialString(java.lang.String dialString)
          Sets the dial string passed to the Dial application.
 void setSrc(java.lang.String src)
          Sets the name of the source channel.
 void setSrcUniqueId(java.lang.String srcUniqueId)
          Sets the unique ID of the source channel.
 void setSubEvent(java.lang.String subEvent)
           
 void setUniqueId(java.lang.String srcUniqueId)
          Sets the unique ID of the source channel.
 
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

SUBEVENT_BEGIN

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

SUBEVENT_END

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

DIALSTATUS_CHANUNAVAIL

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

DIALSTATUS_CONGESTION

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

DIALSTATUS_NOANSWER

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

DIALSTATUS_BUSY

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

DIALSTATUS_ANSWER

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

DIALSTATUS_CANCEL

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

DIALSTATUS_DONTCALL

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

DIALSTATUS_TORTURE

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

DIALSTATUS_INVALIDARGS

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

DialEvent

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

getSubEvent

public java.lang.String getSubEvent()
Since Asterisk 1.6 the begin and the end of a dial command generate a Dial event. The subEvent property returns whether the dial started execution ("Begin") or completed ("End"). As Asterisk prior to 1.6 only sends one event per Dial command this always returns "Begin" for Asterisk prior to 1.6.
For an "End" sub event only the properies channel, unqiue id and dial status are available, for a "Begin" sub event all properties are available except for the dial status.

Returns:
"Begin" or "End" for Asterisk since 1.6, "Begin" for Asterisk prior to 1.6.
Since:
1.0.0

setSubEvent

public void setSubEvent(java.lang.String subEvent)

getChannel

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

Returns:
the name of the source channel.
Since:
1.0.0

setChannel

public void setChannel(java.lang.String channel)
Returns the name of the source channel.

Parameters:
channel - the name of the source channel.
Since:
1.0.0

getSrc

public java.lang.String getSrc()
Deprecated. as of 1.0.0, use getChannel() instead.

Returns the name of the source channel.

Returns:
the name of the source channel.

setSrc

public void setSrc(java.lang.String src)
Sets the name of the source channel.

Asterisk versions up to 1.4 use the "Source" property instead of "Channel".

Parameters:
src - the name of the source channel.

getDestination

public java.lang.String getDestination()
Returns the name of the destination channel.

Returns:
the name of the destination channel.

setDestination

public void setDestination(java.lang.String destination)
Sets the name of the destination channel.

Parameters:
destination - the name of the destination channel.

getCallerIdNum

public java.lang.String getCallerIdNum()
Returns the the Caller*ID Number.

Returns:
the the Caller*ID Number or "" if none has been set.
Since:
1.0.0

setCallerIdNum

public void setCallerIdNum(java.lang.String callerIdNum)

getCallerId

public java.lang.String getCallerId()
Deprecated. as of 1.0.0, use getCallerIdNum() instead.

Returns the Caller*ID.

Returns:
the Caller*ID or "" if none has been set.

setCallerId

public void setCallerId(java.lang.String callerId)
Sets the caller*ID.

Parameters:
callerId - the caller*ID.

getCallerIdName

public java.lang.String getCallerIdName()
Returns the Caller*ID Name.

Returns:
the Caller*ID Name or "" if none has been set.

setCallerIdName

public void setCallerIdName(java.lang.String callerIdName)
Sets the Caller*Id Name.

Parameters:
callerIdName - the Caller*Id Name to set.

getUniqueId

public java.lang.String getUniqueId()
Returns the unique ID of the source channel.

Returns:
the unique ID of the source channel.
Since:
1.0.0

setUniqueId

public void setUniqueId(java.lang.String srcUniqueId)
Sets the unique ID of the source channel.

Parameters:
srcUniqueId - the unique ID of the source channel.
Since:
1.0.0

getSrcUniqueId

public java.lang.String getSrcUniqueId()
Deprecated. as of 1.0.0, use getUniqueId() instead.

Returns the unique ID of the source channel.

Returns:
the unique ID of the source channel.

setSrcUniqueId

public void setSrcUniqueId(java.lang.String srcUniqueId)
Sets the unique ID of the source channel.

Asterisk versions up to 1.4 use the "SrcUniqueId" property instead of "UniqueId".

Parameters:
srcUniqueId - the unique ID of the source channel.

getDestUniqueId

public java.lang.String getDestUniqueId()
Returns the unique ID of the destination channel.

Returns:
the unique ID of the destination channel.

setDestUniqueId

public void setDestUniqueId(java.lang.String destUniqueId)
Sets the unique ID of the destination channel.

Parameters:
destUniqueId - the unique ID of the destination channel.

getDialString

public java.lang.String getDialString()
Returns the dial string passed to the Dial application.

Available since Asterisk 1.6.

Returns:
the dial string passed to the Dial application.
Since:
1.0.0

setDialString

public void setDialString(java.lang.String dialString)
Sets the dial string passed to the Dial application.

Parameters:
dialString - the dial string passed to the Dial application.
Since:
1.0.0

getDialStatus

public java.lang.String getDialStatus()
For end subevents this returns whether the completion status of the dial application.
Possible values are: It corresponds the the DIALSTATUS variable used in the dialplan.

Available since Asterisk 1.6.

Returns:
the completion status of the dial application.
Since:
1.0.0

setDialStatus

public void setDialStatus(java.lang.String dialStatus)

Asterisk-Java

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