Re: Wants to get Call duration after call end At least on my 1.2 version of Asterisk compiled "out of the box" from the downloaded sources, Asterisk will write "call records" to /var/log/asterisk/cdr-csv/Master.csv
That is a text file in "comma separated values" format that can be opened in a spreadsheet program like Excel. One of the columns/fields is "billsec" (Billable seconds) which will be non-zero for calls that are answered. There is another field called "duration" that gives the total time including setup. You easily can set the values of the "amaflags" and/or "accountcode" fields in your dial plan which is useful for keeping track of billable calls and to which client or ITSP carried the call.
As with most things Asterisk, you can configure things greatly. So if you are running some pre-packaged version of Asterisk and/or a different version your mileage may vary (location of call record files, fields in them, format, etc.). |