Let's have a closer look at the variables we can define here:
${CDR(clid)} = callerid for the call (with the name)
${CDR(src)} = callerid number for the call
${CDR(dst)} = destination extension
${CDR(dcontext)} = Destination context
${CDR(channel)} = Src channel
${CDR(dstchannel)} = Destination channel if appropriate
${CDR(lastapp)} = this is the last application in the dialplan used, on an outgoing call this will be DIAL.
${CDR(lastdata)} = these are the parameters given to the last application used in the dialplan
${CDR(start)} = time of the start of the call
${CDR(answer)} = time when the call was answered
${CDR(end)} = time when the call got hung up
${CDR(duration)} = duration of the call
${CDR(billsec)} = duration of the actual call (without the ringing)
${CDR(disposition)} = status of the call (ANSWERED, BUSY, NO ANSWER)
${CDR(amaflags)} = flag for the type of CDR (can be set in a.o. sip.conf)
default: Sets the system default.
omit: Do not record calls.
billing: Mark the entry for billing
documentation: Mark the entry for documentation.
${CDR(accountcode)} = the accountcode as set for this channel with for example SetAccountcode in the dialplan (Extensions.conf) or in the channel configuration file (e.g. per user in sip.conf, iax.conf and per channel in zaptel.conf)
${CDR(uniqueid)} = a unique id for this call
{CDR(userfield)} = a userfield set by the dialplan command SetCDRUserfield
As you can see, it is possible to define different "layouts" for different files.
The default file is Master.csv, but if you specify a different accountcode (with SetAccount or in sip.conf or iax.conf or zaptel.conf) the filename will change.
Related links:
cdr_manager.conf- disable or enable sending of cdr's to the manager interface
User Comments
pandu (kavitha1206 at gmail dot com) 08 May 2009 10:29:33 hi
josh from america (jnkmail02 at yahoo dot com) 06 May 2009 22:56:28 Some one up there mentioned windows, that does not belong in a workplace / production environment.
If you keep that for the only thing it does well ( play games at your house ) it will be ok, but prepare to suffer if you even dream that windows belongs in an office.
josh from america (jnkmail02 at yahoo dot com) 06 May 2009 22:55:36 Some one up there mentioned windows, that does not belong in a workplace / production environment.
If you keep that for the only thing it does well ( play games at your house ) it will be ok, but prepare to suffer if you even dream that windows belongs in an office.
Mohammad (malimoradi at thepanico dot com) 10 December 2007 13:30:34 Hi
I have a SQL database on windows 2003. How to make an application that can work on Asterisk and get data from this database.
Plz, give me a solution for do it.
Best Regards,
Mohammad
Asish (imon_u at yahoo dot co dot in) 28 September 2007 09:33:47 hi all!
i want to add a userfield in my master.cvs as there are 18 userfields existing there. If it is possible to add a new field then how can i do it. plz tell.
ANdres Gorostidi (andres at europesip dot com) 20 January 2007 12:18:29 What about Radius support at Asterisk 1.4 ?
I thought that cdr could be stored on radius, even better, thatyou can use radius for authentication and therefore, for billing issues.
I am looking for sus as info everywhere, with no results... Any point to any reference, or a detail about how to integrate cdr / billling / radius would be appreciatted.
Phani (vphani at inforica dot com) 10 January 2007 10:19:43 I had created the CDR table structure like above CSV file but i am not getting details inserted.
Can you please give me the solution for this.
ramank (ramank24 at gmail dot com) 12 October 2006 11:46:12 How to make the asterisk to write the cdr in the table in the mysql. And the table ( fields in the table) itself is configuarable through the configuaration file?
Ok By using the addon we can generate the cdr in the cdr table in the mysql.
But the second part how to configure the table is using the conf file is what I can not have the idea.
The advantage of using the conf file for configuring the table is that one can generate the logs for only those value/data/field that one realy need.
ANYONE to help me out in this.
Please reply on the abve email id.
Thanks in advance....
Ramesh (ramesh at pixgrafx dot com) 28 March 2006 03:07:41 oye.. enna panikittu irukra?? y no calls, mails, offlines??
Mohan W (mohanw at aftek dot com) 02 March 2006 12:18:03 Hello Aparna ,
You missing the header path for asterisk pbx install.
By default if looks for usr/include/asterisk/*.h file.
By providing this Include path to make include directive , depending on your install tree , will solve your problem.
Thanks And Regards
Mohan W
Embedded Architect
Aparna Ramakrishnan (aparna_grk at yahoo dot com) 02 December 2005 11:02:36 Hi.. another question.
I downloaded asterisk-addons, but am unable to install it.
The make fails with the error:
# make
make -C format_mp3 all
make[1]: Entering directory `/home/aparna/asterisk-addons-1.0.9/format_mp3'
gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o common.o common.c
common.c:1:29: asterisk/logger.h: No such file or directory
common.c: In function `decode_header':
common.c:93: warning: implicit declaration of function `ast_log'
common.c:93: error: `LOG_WARNING' undeclared (first use in this function)
common.c:93: error: (Each undeclared identifier is reported only once
common.c:93: error: for each function it appears in.)
make[1]: *** [common.o] Error 1
make[1]: Leaving directory `/home/aparna/asterisk-addons-1.0.9/format_mp3'
make: *** [format_mp3/format_mp3.so] Error 2
Can you plz provide me a solution to this?? I do not know what changes I need to make now.
Thanks again in advance,
Aparna
Aparna Ramakrishnan (aparna_grk at yahoo dot com) 02 December 2005 10:58:56 Hallo!
I do not even have teh cdr_custom.conf file in my /etc/asterisk directory. Can u guide further??