Fields in General
The main element of both pivot and detailed reports is the field. Fields are defined by the actual Asterisk CDR and queue structure. Pivot reports let you move those fields into different field areas and thus structure the report to your own needs. Detailed reports let you filter and group to build a drill-down report.
SAM Reports 2 divides fields into five categories:
- Quantitative fields
- Date and Time fields
- Calculated fields
- Element fields
- Descriptive fields
Quantitative fields
Quantitative fields are original values taken form the Asterisk CDR and queue logs. They have not been changed in any way, only aggregated to display accordingly to the current report view in the pivot/detailed gird. Or displayed as they are when shown in drill down detailed reports.
They are:
- Count
- CDR:
- Queue:
In detailed reports there are no “Sum” (summary) and “Avg” (average) fields, just the actual filed value (for example Duration or Talk time).
Count Field
Count field tells you the number of calls for a given date, time and some other field constellation in a report.
It is not present in detailed reports, for it counts a number of calls, and detailed reports display one call per line. In that case the value of count would always be 1.
If you group fields in detailed reports you do get a count of that group though.
Billable Sum and Billable Avg
Fields that show the accrued or average billable seconds for a given time period and currently selected fields in the pivot gird.
Duration Sum and Duration Avg
Fields that show the accrued or average duration in seconds.
Talk Sum and Talk Avg
They show the accrued or average talk time in seconds for a given period and currently selected fields in the pivot grid.
Hold Sum and Hold Avg
They show the accrued or average hold time in seconds for a given period and currently selected fields in the pivot grid.
Hold time field has either hold time or wait time from the original Asterisk queue log file. Some events in queue_log report hold time (time that caller was holding), and others have wait time instead. This field combines the two. queue_log never has both times together in the same event.
Date and Time fields
Date and time fields are generated from CDR’s start and end time stamps. There are six date fields (Year, Quarter, WeekNo, Month Name, Day Of Month, Day Of Week ) and one time field (Hour).
Year Field
Year field carries just the year portion of log file’s time stamp.
Quarter Field
Quarter field breaks a year into four quarters.
Month Name Field
This field displays the month name using current Windows local settings. So the month will appear in you language.
Week Number Field
This field shows the current week number of the year.
Day Of Week Field
Shows the name of current weekday in local language.
Day of Month Field
Shows the number of a day in a month.
Hour Field
Shows the hour of day.
Calculated fields
Calculated fields are those whose value was not obvious from the Asterisk’s logs. It had to be calculated taking into account additional data about the particular Asterisk PBX installation.
They are:
Direction
Direction determines whether the call was incoming or outgoing. This is a calculated field, which means that it’s value was determined by the SAM Reports upon processing the data from Asterisk PBX.
The possible values are:
- Incoming call does not necessarily mean that the call came from the outside. It could be Peter calling Ann while sitting next to each other. Incoming, for Ann’s extension, just means that it received a call from some destination, no matter where from.
- Outgoing call, also, does not assume placing a call to some destination outside a host PBX, it just denotes the direction which the call took.
Origin
This field is also calculated by SAM Reports. Origin may be internal and external. Internal call is a call between extensions of the same Asterisk PBX. External call is a call between local extension and an outside extension, destination.
The possible values are:
- Internal call means that the caller and the callee are both the extensions of the same host PBX.
- External call, in contrary, means that one of the sides in the call was from some other destination than our host PBX.
Status
Status field tells you whether the call was successful or not.
It has three possible values:
- Normal : the call was successful.
- inc_noans : the call failed and it was an incoming call.
- our_noans : the call failed and it was an outgoing call.
Way
This field informs of whether a call had one or two participants. One-way call would be when you dial an extension to check your voicemail.
It has two possible values :
- way_one: one-way call.
- way_two: two-way call.
Kind
Kind field informs on whether a call was direct or not.
It has two possible values:
- direct: means that a call was a direct call.
- indirect: means that a call was transferred, or made using a “local” channel.
Answered/Failed
Answered/Failed field tells you whether the call was answered by an agent or not.
Possible values are:
- answered: the call was answered by an agent
- failed: the call was not answered
Hangup
Hangup field tells you how this particular call has ended. Whether it ended by an agent or the caller, or perhaps transferred to another agent or extension.
Possible values are:
- Agent: agent has ended the call
- Caller: caller ended the call
- Transfer: agent transferred the call to another agent or extension.
Exit
Exit field just records the last queue event (queue action) on call completion. That way you can determine whether the caller hung up the phone (ABANDON event), or perhaps was he kept waiting on the line for too long and gave up (EXITWITHTIMEOUT event).
Possible values for this field may differ from one report to another. They depend on the current available data, filtering …
Element fields
Element fields represent the elements for which the report is created. The purpose of creating any Asterisk log file report is to know about performance and behaviur of these elements.
They are:
Phone Number
This field shows a phone number that was present id either CDR or queue log file.
Contact
This field was generated from CallerID either form CDR or queue log file.
Channel
Lists all channel available for the current selection in the grid.
Trunk
Lists all trunks available for the current selection in the grid.
Agent
Shows Agents present in the current report selection.
Queue
Lists queues available in the grid.
Descriptive fields
Descriptive fields add additional information to the report and are original fields from the log files.
They are:
- CDR:
- Queue:
Destination Context
Shows all destination contexts available for the current selection.
Transfer
Shows all transfer extensions and CallerIDs available.
Entry Position
Shows all entry positions available for the current data in the grid.
Exit Position
Lists all exit positions available.

























