Reference9:Concept Call Detail Record CDR PBX
If enabled the PBX generates Call Detail Records (CDR) for each call and each object, which means if a call is made from one user to another a CDR for an outgoing call is generated at the first user object and a CDR for an incoming call is generated at the other user object. The CDRs are generated at the end of the call and sent via the CDR0 and CDR1 interfaces. XML is used for the content of the CDRs.
Content
Top-Level Tag <cdr>
Each CDR uses the top-level tag <cdr>. The following attributes are used with this tag:
guid | The GUID identifying the object this call belongs to. |
sys | The system name (Gatekeeper Identifier) of the PBX |
pbx | The PBX this CDR was generated on |
cn | The cn (Long Name) of the object |
e164 | The Number of the object |
h323 | The H.323 Id (Name) of the object |
dir | Indicates the direction of the call.
|
utc | The time when this call was started as UTC time. This is an integer with the standard ctime semantic. |
local | The local time the call was started. |
The Tag <event>
For each state a call goes thru a tag <event> is added to the CDR. The following attributes are used with this tag:
msg | A string identifying the message which caused the state change of the call |
time | The time in seconds from the beginning of the call |
type | The Type of the other party of the call if available. A value of 'ext' indicates an external party. |
e164 | The number of the other party of the call if available |
h323 | The H.323 Id (Name) of the other party of the call if available |
conf | A GUID identifying the call (conferenceID). This GUID can be used to associated CDRs from outgoing calls to the CDRs of incoming calls even across different PBXs. The first event within a CDR always contains this attribute. The conferenceID may change during a call (e.g. because of a call transfer). In this case another conf attribute is present containing the new conferenceID. |
cause | The cause code used when the call was cleared. The value is defined in Q.931. Common values are 16 - Normal Clearing, 17 - User Busy, 18 - No response. |
Available messages (values of msg)
setup-from | A call originating from the object was initiated |
setup-to | A call to the object was initiated |
alert-from | The endpoint for this object is alerting |
alert-to | The other party is alerting |
conn-from | The endpoint for this object has connected the call |
conn-to | The other party has connected the call |
rel-from | The endpoint for this object has released the call |
rel-to | The other party has released the call |
transfer-from | The endpoint for this call has transfered the call. The call should be released shortly after this event. |
transfer-to | The other party has transfered the call. |
cf-from | The endpoint for this object has forwarded the call. The call should be released shortly after this event. |
cf-to | The other party has forwarded the call. |
Sample Billing Records
User A (100) initiates a call to User B (101)
<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272534995" local="1272542195">
<user/>
<event msg="setup-from" time="0" e164="101" conf="817dcbd6e909d31192e80090331032dd"/>
<event msg="alert-to" time="0" e164="101" h323="b"/>
<event msg="conn-to" time="1" e164="101" h323="b"/>
<event msg="rel-to" time="2" cause="0"/>
</cdr>