public class CdrEvent extends ManagerEvent
To enable CdrEvents you have to add enabled = yes to the general section in
cdr_manager.conf.
This event is implemented in cdr/cdr_manager.c
| Modifier and Type | Field and Description |
|---|---|
static String |
AMA_FLAG_BILLING |
static String |
AMA_FLAG_DOCUMENTATION |
static String |
AMA_FLAG_OMIT |
static String |
AMA_FLAG_UNKNOWN |
static String |
DISPOSITION_ANSWERED |
static String |
DISPOSITION_BUSY |
static String |
DISPOSITION_FAILED |
static String |
DISPOSITION_NO_ANSWER |
static String |
DISPOSITION_UNKNOWN |
callerIdName, callerIdNum, channelState, channelStateDesc, connectedLineName, connectedLineNum, context, exten, prioritysource| Modifier and Type | Method and Description |
|---|---|
String |
getAccountCode()
Returns the account number that is usually used to identify the party to bill for the call.
|
String |
getAmaFlags()
Returns the AMA (Automated Message Accounting) flags.
|
String |
getAnswerTime()
Returns when the call was answered.
|
Date |
getAnswerTimeAsDate()
Returns the answer time as Date object.
|
Date |
getAnswerTimeAsDate(TimeZone tz)
Returns the answer time as Date object.
|
Integer |
getBillableSeconds()
Returns the total time (in seconds) the call was up from answer to hangup.
|
String |
getCallerId()
Returns the Caller*ID with text.
|
String |
getChannel()
Returns the name of the channel, for example "SIP/1310-asfe".
|
String |
getDestination()
Returns the destination extension.
|
String |
getDestinationChannel()
Returns the name of the destination channel if appropriate.
|
String |
getDestinationContext()
Returns the destination context.
|
String |
getDisposition()
Returns what happened to the call.
|
Integer |
getDuration()
Returns the total time (in seconds) the caller spent in the system from dial to hangup.
|
String |
getEndTime()
Returns when the call has ended.
|
Date |
getEndTimeAsDate()
Returns the end time as Date object.
|
Date |
getEndTimeAsDate(TimeZone tz)
Returns the end time as Date object.
|
String |
getLastApplication()
Returns the last application if appropriate, for example "VoiceMail".
|
String |
getLastData()
Returns the last application's data (arguments), for example "s1234".
|
String |
getRecordfile()
Returns record filename.
|
String |
getSrc()
Returns the Caller*ID number.
|
String |
getStartTime()
Returns when the call has started.
|
Date |
getStartTimeAsDate()
Returns the start time as Date object.
|
Date |
getStartTimeAsDate(TimeZone tz)
Returns the start time as Date object.
|
String |
getUniqueId()
Returns the unique id of the channel.
|
String |
getUserField()
Returns the user-defined field as set by
Set(CDR(userfield)=Value). |
void |
setAccountCode(String accountCode)
Sets the account number.
|
void |
setAmaFlags(String amaFlags)
Sets the AMA (Automated Message Accounting) flags.
|
void |
setAnswerTime(String answerTime)
Sets the date/time when the call was answered.
|
void |
setBillableSeconds(Integer billableSeconds)
Sets the total time in call.
|
void |
setCallerId(String callerId)
Sets the Caller*ID with text.
|
void |
setChannel(String channel)
Sets the name of the channel.
|
void |
setDestination(String destination)
Sets the destination extension.
|
void |
setDestinationChannel(String destinationChannel)
Sets the name of the destination channel.
|
void |
setDestinationContext(String destinationContext)
Sets the destination context.
|
void |
setDisposition(String disposition)
Sets the disposition.
|
void |
setDuration(Integer duration)
Sets the total time in system.
|
void |
setEndTime(String endTime)
Sets the date/time when the call has ended.
|
void |
setLastApplication(String lastApplication)
Sets the last application.
|
void |
setLastData(String lastData)
Set the last application's data.
|
void |
setRecordfile(String recordfile)
Sets record filename.
|
void |
setSrc(String source)
Sets the Caller*ID number.
|
void |
setStartTime(String startTime)
Sets the date/time when the call has started.
|
void |
setUniqueId(String uniqueId)
Sets the unique id of the channel.
|
void |
setUserField(String userField)
Sets the user-defined field.
|
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, toStringgetSourcepublic static final String DISPOSITION_NO_ANSWER
public static final String DISPOSITION_FAILED
public static final String DISPOSITION_BUSY
public static final String DISPOSITION_ANSWERED
public static final String DISPOSITION_UNKNOWN
public static final String AMA_FLAG_OMIT
public static final String AMA_FLAG_BILLING
public static final String AMA_FLAG_DOCUMENTATION
public static final String AMA_FLAG_UNKNOWN
public CdrEvent(Object source)
source - public String getAccountCode()
Corresponds to CDR field accountcode.
public void setAccountCode(String accountCode)
accountCode - the account number.public String getSrc()
Corresponds to CDR field src.
public void setSrc(String source)
source - the Caller*ID number.public String getDestination()
Corresponds to CDR field dst.
public void setDestination(String destination)
destination - the destination extension.public String getDestinationContext()
Corresponds to CDR field dcontext.
public void setDestinationContext(String destinationContext)
destinationContext - the destination context.public String getCallerId()
Corresponds to CDR field clid.
public void setCallerId(String callerId)
callerId - the Caller*ID with text.public String getChannel()
Corresponds to CDR field channel.
public void setChannel(String channel)
channel - the name of the channel.public String getDestinationChannel()
Corresponds to CDR field dstchannel.
null if not available.public void setDestinationChannel(String destinationChannel)
destinationChannel - the name of the destination channel.public String getLastApplication()
Corresponds to CDR field lastapp.
null if not avaialble.public void setLastApplication(String lastApplication)
lastApplication - the last application.public String getLastData()
Corresponds to CDR field lastdata.
null if not avaialble.public void setLastData(String lastData)
lastData - the last application's data.public String getStartTime()
This corresponds to CDR field start.
public Date getStartTimeAsDate()
This method asumes that the Asterisk server's timezone equals the default timezone of your JVM.
public Date getStartTimeAsDate(TimeZone tz)
tz - the timezone of the Asterisk server.public void setStartTime(String startTime)
startTime - the date/time when the call has started.public String getAnswerTime()
This corresponds to CDR field answered.
public Date getAnswerTimeAsDate()
This method asumes that the Asterisk server's timezone equals the default timezone of your JVM.
public Date getAnswerTimeAsDate(TimeZone tz)
tz - the timezone of the Asterisk server.public void setAnswerTime(String answerTime)
answerTime - the date/time when the call was answered.public String getEndTime()
This corresponds to CDR field end.
public Date getEndTimeAsDate()
This method asumes that the Asterisk server's timezone equals the default timezone of your JVM.
public Date getEndTimeAsDate(TimeZone tz)
tz - the timezone of the Asterisk server.public void setEndTime(String endTime)
endTime - the date/time when the call has ended.public Integer getDuration()
Corresponds to CDR field duration.
public void setDuration(Integer duration)
duration - total time in system in seconds.public Integer getBillableSeconds()
Corresponds to CDR field billsec.
public void setBillableSeconds(Integer billableSeconds)
billableSeconds - the total time in call in seconds.public String getDisposition()
This is one of
Corresponds to CDR fielddisposition.public void setDisposition(String disposition)
disposition - the disposition.public String getAmaFlags()
This is one of
Corresponds to CDR fieldamaflags.public void setAmaFlags(String amaFlags)
amaFlags - the AMA (Automated Message Accounting) flags.public String getUniqueId()
public void setUniqueId(String uniqueId)
uniqueId - the unique id of the channel.public String getUserField()
Set(CDR(userfield)=Value).
Corresponds to CDR field userfield.
public void setUserField(String userField)
userField - the user-defined fieldpublic String getRecordfile()
public void setRecordfile(String recordfile)
recordfile - record filename.Copyright © 2004–2021. All rights reserved.