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.
|
callerIdName, callerIdNum, channelState, channelStateDesc, connectedLineName, connectedLineNum, context, exten, priority
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 |
getHint()
Returns the hint assigned to the extension.
|
Integer |
getStatus()
Returns the state of the extension.
|
String |
getStatustext() |
void |
setCallerId(String callerId)
Sets the Caller*ID.
|
void |
setHint(String hint) |
void |
setStatus(Integer status)
Sets the state of the extension.
|
void |
setStatustext(String statustext) |
appendPropertyIfNotNull, getCallerIdName, getCallerIdNum, getChannelState, getChannelStateDesc, getConnectedLineName, getConnectedLineNum, getContext, getDateReceived, getExten, getFile, getFunc, getLine, getPriority, getPrivilege, getSequenceNumber, getServer, getSystemName, getTimestamp, setCallerIdName, setCallerIdNum, setChannelState, setChannelStateDesc, setConnectedLineName, setConnectedLineNum, setContext, setDateReceived, setExten, setFile, setFunc, setLine, setPriority, setPrivilege, setSequenceNumber, setServer, setSystemName, 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 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.public String getStatustext()
public void setStatustext(String statustext)
Copyright © 2004–2020. All rights reserved.