Reference9:Concept Call Detail Record CDR PBX: Difference between revisions
Line 166: | Line 166: | ||
<code xml> | <code xml> | ||
<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" cn="A" e164="100" h323="a" dir=" | <cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" cn="A" e164="100" h323="a" dir="to" utc="1272548125" local="1272555325"> | ||
<user/> | <user/> | ||
<event msg="cf- | <event msg="setup-to" time="1" e164="101" h323="b"/> | ||
<event msg="cf-from" time="1" e164="100"> | |||
<to e164="102"/> | <to e164="102"/> | ||
</event> | </event> | ||
<event msg="alert-to" time="1" e164="102" h323="c"/> | <event msg="alert-to" time="1" e164="102" h323="c"/> | ||
<event msg="conn-to" time=" | <event msg="conn-to" time="2" e164="102" h323="c"/> | ||
<event msg="rel-to" time=" | <event msg="rel-to" time="3" cause="0"/> | ||
</cdr> | </cdr> | ||
</code> | </code> | ||
[[Category:Concept|{{PAGENAME}}]] | [[Category:Concept|{{PAGENAME}}]] |
Revision as of 15:38, 29 April 2010
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 |
node | The Node of the object for which this CDR was generated |
cn | The cn (Long Name) of the object |
e164 | The Number of the object |
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.
|
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. |
The tag <event> may contain a tag <to> to indicate a new party connected to the call.
Tag <user>
The tag <cdr> may contain a tag <user> for additional information about the object:
- Groups: For each group a tag <grp> is contained in <user>
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 Records
Basic Call
A(100) initiates a call to 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>
A(100) receives a call from B(101)
<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="to" utc="1272535862" local="1272543062">
<user/>
<event msg="setup-to" time="0" e164="101" h323="b" conf="85afc2dfe909d311906d009033102603"/>
<event msg="alert-from" time="0" e164="101" h323="b"/>
<event msg="conn-from" time="2" e164="101" h323="b"/>
<event msg="rel-from" time="3" cause="0"/>
</cdr>
Call Forward
A(100) calls B(101), which forwards with cfu to C(102)
<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" device="a" cn="A" e164="100" h323="a" dir="from" utc="1272536350" local="1272543550">
<user/>
<event msg="setup-from" time="0" conf="43abbcfee909d31192e80090331032dd"/>
<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="3" cause="0"/></cdr>
A(100) receives call from B(101) and forwards with cfu to C(102)
<cdr guid="e78cb2b8e909d31188ce0090330602e8" sys="PBX" pbx="." node="root" cn="A" e164="100" h323="a" dir="to" utc="1272548125" local="1272555325">
<user/>
<event msg="setup-to" time="1" e164="101" h323="b"/>
<event msg="cf-from" time="1" e164="100">
<to e164="102"/>
</event>
<event msg="alert-to" time="1" e164="102" h323="c"/>
<event msg="conn-to" time="2" e164="102" h323="c"/>
<event msg="rel-to" time="3" cause="0"/>
</cdr>