|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.asteriskjava.manager.event.ManagerEvent
org.asteriskjava.manager.event.ExtensionStatusEvent
public class ExtensionStatusEvent
An ExtensionStatusEvent is triggered when the state of an extension changes.
For this to work for you must provide appropriate hints in your dialplan to map channels to extensions.
Example:exten => 1234,1,Dial(SIP/myuser) exten => 1234,hint,SIP/myuserHints can also be used to map the state of multiple channels to an extension:
exten => 6789,hint,SIP/user1&SIP/user2 It is implemented inmanager.c
, values for state are defined ininclude/asterisk/pbx.h
.
Field Summary | |
---|---|
static int |
BUSY
All devices BUSY. |
static int |
INUSE
One or more devices INUSE. |
static int |
NOT_INUSE
No device INUSE or BUSY. |
static int |
RINGING
One or more devices RINGING. |
static int |
UNAVAILABLE
All devices UNAVAILABLE/UNREGISTERED. |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
ExtensionStatusEvent(java.lang.Object source)
|
Method Summary | |
---|---|
java.lang.String |
getCallerId()
Returns the Caller*ID in the form "Some Name" <1234> . |
java.lang.String |
getContext()
Returns the context of the extension. |
java.lang.String |
getExten()
Returns the extension. |
java.lang.String |
getHint()
Returns the hint assigned to the extension. |
java.lang.Integer |
getStatus()
Returns the state of the extension. |
void |
setCallerId(java.lang.String callerId)
Sets the Caller*ID. |
void |
setContext(java.lang.String context)
Sets the context of the extension. |
void |
setExten(java.lang.String exten)
Sets the extension. |
void |
setHint(java.lang.String hint)
|
void |
setStatus(java.lang.Integer status)
Sets the state of the extension. |
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 |
---|
public static final int NOT_INUSE
public static final int INUSE
public static final int BUSY
public static final int UNAVAILABLE
public static final int RINGING
Constructor Detail |
---|
public ExtensionStatusEvent(java.lang.Object source)
Method Detail |
---|
public java.lang.String getExten()
public void setExten(java.lang.String exten)
public java.lang.String getContext()
public void setContext(java.lang.String context)
public java.lang.String getHint()
Available since Asterisk 1.6.
public void setHint(java.lang.String hint)
public java.lang.Integer getStatus()
Possible values are:
public void setStatus(java.lang.Integer status)
public java.lang.String getCallerId()
"Some Name" <1234>
.
This property is only available on BRIstuffed Asterisk servers.
public void setCallerId(java.lang.String callerId)
callerId
- the Caller*ID.
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |