public class ExtensionStatusEvent extends ManagerEvent
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
manager.c
, values for state are defined in
include/asterisk/pbx.h
.Modifier and Type | Field and Description |
---|---|
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.
|
source
Constructor and Description |
---|
ExtensionStatusEvent(Object source) |
Modifier and Type | Method and Description |
---|---|
String |
getCallerId()
Returns the Caller*ID in the form
"Some Name" <1234> . |
String |
getContext()
Returns the context of the extension.
|
String |
getExten()
Returns the extension.
|
String |
getHint()
Returns the hint assigned to the extension.
|
Integer |
getStatus()
Returns the state of the extension.
|
void |
setCallerId(String callerId)
Sets the Caller*ID.
|
void |
setContext(String context)
Sets the context of the extension.
|
void |
setExten(String exten)
Sets the extension.
|
void |
setHint(String hint) |
void |
setStatus(Integer status)
Sets the state of the extension.
|
appendPropertyIfNotNull, getDateReceived, getFile, getFunc, getLine, getPrivilege, getSequenceNumber, getServer, getTimestamp, setDateReceived, setFile, setFunc, setLine, setPrivilege, setSequenceNumber, setServer, setTimestamp, toString
getSource
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
public ExtensionStatusEvent(Object source)
public String getExten()
public void setExten(String exten)
public String getContext()
public void setContext(String context)
public String getHint()
Available since Asterisk 1.6.
public void setHint(String hint)
public Integer getStatus()
Possible values are:
public void setStatus(Integer status)
public String getCallerId()
"Some Name" <1234>
.
public void setCallerId(String callerId)
callerId
- the Caller*ID.Copyright © 2004–2016. All rights reserved.