Let me clarify this:

You have to choices of CDR modules.

mod_cdr_csv

mod_xml_cdr


cdr_csv is a template based module that was designed for back compat with the asterisk cdr format.
see config file conf/autoload_configs/cdr_csv.conf.xml

Here is the asterisk template that makes it possible for us to emulate asterisk it expands variables at the time the call ends.

<template name="asterisk">"${accountcode}","${caller_id_number}","${destination_number}","${context}","${caller_id}","${channel_name}","${bridge_channel}","
${last_app}","${last_arg}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${amaflags}","${uuid}","${userfield}"
</template>

The default behavior is to log A legs meaning if you make an inbound call then the record will be generated when that leg goes away.  This is why you see what you see, we are trying to emulate asterisk here for backward compat.

The param you want to look at is the legs param.  This controls what legs are logged.
you can set it to a, b or ab to log a b or both legs.


    <!-- may be a b or ab -->
    <param name="legs" value="a"/>

if you set it to b, then you will get logs every time a leg that was dialed via an existing leg hangs up.
which will give you a new one every time a call is transfered.


Next comes mod_xml_cdr which is the more robust choice for important call details.
conf/autoload_configs/xml_cdr.conf.xml

This module creates a single XML file per call leg with full detail of everything that happens including the time of each transfer etc.  It always logs a legs but allows an option to also log b legs too:
<param name="log-b-leg" value="true"/>

In the XML report the <callflow> represents a single trip to the dialplan.
Every time a channel is transferred, a whole new callflow will be stacked into the xml so by the end
you have a full path of every single thing that happened in the call.

See this url for an example of the xml_cdr reports.

http://www.freeswitch.org/eg/xml_cdr/





On Wed, Jul 9, 2008 at 8:53 AM, Brian West <brian@freeswitch.org> wrote:
It can log a and b legs.  Unlike Asterisk.

On Jul 9, 2008, at 8:39 AM, Faraz R. Khan wrote:

> mod_cdr_csv is from asterisk land- avoid at all costs :)

Brian West
sip:brian@freeswitch.org



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400