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. For a discussion of the delivery mechanisms, see the respective chapters in the

Contents

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
node The Node of the object for which this CDR was generated
cn The cn (Long Name) of the object
e164 The normalized Number of the object. This number includes the node prefixes if the object is not defined in the root node.
h323 The H.323 Id (Name) of the object
device The device (if applicable) which was used for this call
dir Indicates the direction of the call.
  • from: A call originating from this object.
  • to: A call sent to this object.
  • cf: A call diverted by this object.
  • ct: A call transfered by this object.
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.
id A unique GUID identifying this CDR

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 uptime of the gateway in seconds
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. This number is a number as it can be dialed from this endpoint to call the other endpoint. This means it will include prefixes only if the other party is in a different node and it will include escapes if necessary.
root The number of the other party relative to the numbering root, 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.

The Tag <to>

Used as tag inside <event>. This is used to indicate that by the operation indicated by the message (transfer, call forward) the party to which this user is connected to will change.

The Tag <ep>

Indicates the endpoint to which the call is actually connected on this endpoint. This is mainly used on trunk objects, in the <cdr> tag itself only the number is indicated which was already dialed when the call is sent out to the trunk. With overlap sending more digits may be sent. In alert-from, conn-from, rel-to and rel-from the final number sent is indicated.

The Tags <cf> <ct>

Indicate preceding call forward (cf) or transfer (ct) endpoints. The attributes e164, h323 and dn can be present.

The Tag <makecall> (available from v10sr10)

Indicates that an application initiated this call e.g. using the SOAP API. The attribute appl contains the name of the application.

Tag <user>

The tag <cdr> may contain a tag <user> for additional information about the object:

pseudo 
If the Object is not a User, there is an attribute "pseudo", which contains the type. This type matches to the type in the LDAP config of the object, except for CDRs on the master connection there is the special value "master". Note that also an object declared as pseudo="executive" may be classified as as user-type object
<grp> 
For each group a tag <grp> is contained in <user>

Object Types

Following Object Types could appear in the CDR records:

executive Executive
trunk Trunk Line
waiting Waiting Queue
gw Gateway
vm Voicemail
broadcast Call Broadcast
bc_conf Bc Conference
mobility Mobility
map Number Map
loc PBX
conference Conference
dtmf-ctrl DTMF Features
dirsearch Directory Search
multicast MCast Announce
qdial Quick dial

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.
transfer-to The other party has transfered the call.
transferred Another call on the same object (user) has been transferred with this call. A transfer-from will be shown on this other call. The call itself will disappear from the phone as a result of the transfer.
transfer-remote The call was transferred outside the PBX.
cf-from The endpoint for this object has forwarded the call.
cf-to The other party has forwarded the call.
connected Added after a transfer, if the other call leg was already connected.

Billing

To generate billing information for a given user (object), the outgoing calls the user is responsible for must be filtered, the destination to which the user is to be billed must be found and the connected time for these calls must be calculated. All this information can be obtained from the CDRs generated for the given user.

Sample Records

Basic Call

A(100) calls B(101)

Object A CDR

<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272551262" local="1272558462">
    <user/>
    <event msg="setup-from" time="0" conf="e89277f0e909d31192e80090331032dd"/>
    <event msg="alert-to" time="1" e164="101" h323="b"/>
    <event msg="conn-to" time="2" e164="101" h323="b"/>
    <event msg="rel-to" time="4" cause="0"/>
</cdr>

Object B CDR

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="to" utc="1272551263" local="1272558463">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="e89277f0e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="1" e164="100" h323="a"/>
    <event msg="rel-from" time="3" cause="0"/>
</cdr>

Call Forward

A(100) calls B(101) cfu to C(102)

Object A CDR

<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272551788" local="1272558988">
    <user/>
    <event msg="setup-from" time="0" conf="dd95b681e909d31192e80090331032dd"/>
    <event msg="cf-to" time="1" e164="101">
        <to e164="102"/>
    </event>
    <event msg="alert-to" time="1" e164="102" h323="c"/>
    <event msg="conn-to" time="3" e164="102" h323="c"/>
    <event msg="rel-to" time="5" cause="0"/>
</cdr>

Object B CDR

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" cn="B" e164="101" h323="b" dir="cf" utc="1272551789" local="1272558989">
    <user/>
    <event msg="setup-to" time="1" e164="100" h323="a" conf="dd95b681e909d31192e80090331032dd"/>
    <event msg="cf-from" time="1" e164="101">
        <to e164="102"/>
    </event>
    <event msg="alert-to" time="1" e164="102" h323="c"/>
    <event msg="conn-to" time="3" e164="102" h323="c"/>
    <event msg="rel-to" time="5" cause="0"/>
</cdr>

Object C CDR

<cdr guid="8f47c0cfe909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="c" cn="C" e164="102" h323="c" dir="to" utc="1272551789" local="1272558989">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="dd95b681e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="2" e164="100" h323="a"/>
    <event msg="rel-from" time="4" cause="0"/>
</cdr>

A(100) calls B(101) cfnr to C(102)

Object A CDR

<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272552609" local="1272559809">
    <user/>
    <event msg="setup-from" time="0" conf="f5092783e909d31192e80090331032dd"/>
    <event msg="alert-to" time="1" e164="101" h323="b"/>
    <event msg="cf-to" time="5" e164="101" h323="b">
        <to e164="102"/>
    </event>
    <event msg="conn-to" time="8" e164="102" h323="c"/>
    <event msg="rel-to" time="9" cause="0"/>
</cdr>

Object B CDR

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="to" utc="1272552610" local="1272559810">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="f5092783e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="rel-to" time="4" cause="0"/>
</cdr>

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" cn="B" e164="101" h323="b" dir="cf" utc="1272552614" local="1272559814">
    <user/>
    <event msg="setup-to" time="5" e164="100" h323="a" conf="f5092783e909d31192e80090331032dd"/>
    <event msg="cf-from" time="5" e164="101" h323="b">
        <to e164="102"/>
    </event><event msg="conn-to" time="8" e164="102" h323="c"/>
    <event msg="rel-to" time="9" cause="0"/>
</cdr>

Object C CDR

<cdr guid="8f47c0cfe909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="c" cn="C" e164="102" h323="c" dir="to" utc="1272552614" local="1272559814">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="f5092783e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="3" e164="100" h323="a"/>
    <event msg="rel-from" time="4" cause="0"/>
</cdr>

Call Transfer

A(100) calls B(101) blind transfer without consultation to C(102)

Object A CDR

<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272607911" local="1272615111">
    <user/>
    <event msg="setup-from" time="0" conf="9b24bc13e909d31192e80090331032dd"/>
    <event msg="alert-to" time="1" e164="101" h323="b"/>
    <event msg="conn-to" time="3" e164="101" h323="b"/>
    <event msg="transfer-to" time="7" e164="101" h323="b">
        <to e164="102"/>
    </event><event msg="conn-to" time="9" e164="102" h323="c"/>
    <event msg="rel-to" time="10" cause="0"/>
</cdr>

Object B CDR

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="to" utc="1272607912" local="1272615112">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="9b24bc13e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="2" e164="100" h323="a"/>
    <event msg="rel-to" time="6" cause="26"/>
</cdr>
 
<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" cn="B" e164="101" h323="b" dir="ct" utc="1272607918" local="1272615118">
    <user/>
    <event msg="setup-to" time="7" e164="100" h323="a" conf="9b24bc13e909d31192e80090331032dd"/>
    <event msg="transfer-from" time="7" e164="101" h323="b">
        <to e164="102" h323="c"/>
    </event>
    <event msg="conn-to" time="9" e164="101" h323="b"/>
    <event msg="rel-to" time="10" cause="0"/>
</cdr>

Object C CDR

<cdr guid="8f47c0cfe909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="c" cn="C" e164="102" h323="c" dir="to" utc="1272607918" local="1272615118">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="9b24bc13e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="2" e164="100" h323="a"/>
    <event msg="rel-from" time="3" cause="0"/>
</cdr>

A(100) calls B(101) blind transfer with consultation to C(102)

Object A CDR

<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272609642" local="1272616842">
    <user/>
    <event msg="setup-from" time="0" conf="18dbf93fe909d31192e80090331032dd"/>
    <event msg="alert-to" time="2" e164="101" h323="b"/>
    <event msg="conn-to" time="4" e164="101" h323="b"/>
    <event msg="transfer-to" time="9" e164="101" h323="b">
        <to e164="102" h323="c"/>
    </event><event msg="conn-to" time="11" e164="102" h323="c"/>
    <event msg="rel-to" time="14" cause="0"/>
</cdr>

Object B CDR

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="to" utc="1272609644" local="1272616844">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="18dbf93fe909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="2" e164="100" h323="a"/>
    <event msg="rel-to" time="7" cause="26"/>
</cdr>
 
<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="from" utc="1272609647" local="1272616847">
    <user/>
    <event msg="setup-from" time="0" conf="75762ef4e909d311aff8009033102603"/>
    <event msg="alert-to" time="2" e164="102" h323="c"/>
    <event msg="transfer-from" time="4" e164="102" h323="c" conf="18dbf93fe909d31192e80090331032dd">
        <to e164="100" h323="a"/>
    </event>
    <event msg="conn-to" time="11" e164="102" h323="c"/>
    <event msg="rel-to" time="14" cause="0"/>
</cdr>

Object C CDR

<cdr guid="8f47c0cfe909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="c" cn="C" e164="102" h323="c" dir="to" utc="1272609649" local="1272616849">
    <user/>
    <event msg="setup-to" time="0" e164="101" h323="b" conf="75762ef4e909d311aff8009033102603"/>
    <event msg="alert-from" time="0" e164="101" h323="b"/>
    <event msg="transfer-to" time="2" e164="101" h323="b" conf="18dbf93fe909d31192e80090331032dd">
        <to e164="100" h323="a"/>
    </event><event msg="conn-from" time="4" e164="100" h323="a"/>
    <event msg="rel-from" time="7" cause="0"/>
</cdr>

A(100) calls B(101) transfer with consultation to C(102)

Object A CDR

<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272613531" local="1272620731">
    <user/>
    <event msg="setup-from" time="0" conf="1827b3c7e909d31192e80090331032dd"/>
    <event msg="alert-to" time="1" e164="101" h323="b"/>
    <event msg="conn-to" time="3" e164="101" h323="b"/>
    <event msg="transfer-to" time="10" e164="101" h323="b">
        <to e164="102" h323="c"/>
    </event>
    <event msg="connected" time="10" e164="102" h323="c"/>
    <event msg="rel-to" time="12" cause="0"/>
</cdr>

Object B CDR

<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="to" utc="1272613532" local="1272620732">
    <user/>
    <event msg="setup-to" time="0" e164="100" h323="a" conf="1827b3c7e909d31192e80090331032dd"/>
    <event msg="alert-from" time="0" e164="100" h323="a"/>
    <event msg="conn-from" time="2" e164="100" h323="a"/>
    <event msg="transfer-from" time="9" e164="100" h323="a">
        <to e164="102" h323="c"/>
    </event><event msg="connected" time="10" e164="102" h323="c"/>
    <event msg="rel-to" time="12" cause="0"/>
</cdr>
 
<cdr guid="9362bef8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="b" cn="B" e164="101" h323="b" dir="from" utc="1272613535" local="1272620735">
    <user/>
    <event msg="setup-from" time="0" conf="8fc0cfc0e909d311b722009033102603"/>
    <event msg="alert-to" time="2" e164="102" h323="c"/>
    <event msg="conn-to" time="4" e164="102" h323="c"/>
    <event msg="transfer-from" time="6" e164="102" h323="c" conf="1827b3c7e909d31192e80090331032dd">
        <to e164="100" h323="a"/>
    </event>
    <event msg="connected" time="4" e164="100" h323="a"/>
    <event msg="rel-from" time="6" cause="0"/>
</cdr>

Object C CDR

<cdr guid="8f47c0cfe909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="c" cn="C" e164="102" h323="c" dir="to" utc="1272613537" local="1272620737">
    <user/>
    <event msg="setup-to" time="0" e164="101" h323="b" conf="8fc0cfc0e909d311b722009033102603"/>
    <event msg="alert-from" time="0" e164="101" h323="b"/>
    <event msg="conn-from" time="2" e164="101" h323="b"/>
    <event msg="transfer-to" time="4" e164="101" h323="b" conf="1827b3c7e909d31192e80090331032dd">
        <to e164="100" h323="a"/>
    </event>
    <event msg="connected" time="4" e164="100" h323="a"/>
    <event msg="rel-from" time="6" cause="0"/>
</cdr>

CDR Buffering

CDRs are sent through the CDR0/1 interfaces which have an internal buffering capacity of 300kB (see Can CDRs get lost?). PBX CDRs can get quite large (the sample " A(100) calls B(101) transfer with consultation to C(102)" above is about 0.8kB) though.

CDR Debugging

The CDRs created by the PBX can be displayed for test-purposes in a Web-Browser. In this case the CDR0/1 - Interface must not be configured, the CDR-Generation must be enabled. This test-mode can be enabled by:

http://x.x.x.x/!config change CDR0 /test-cdr
http://x.x.x.x/!config activate

After making the desired call, the CDR0-buffer can be displayed using the URL:

http://x.x.x.x/CDR0/mod_cmd.xml?cmd=test-cdr

Please note that this test-mode must not be used in production environments, only in test systems.