开发者

Looking for an explanation of Asterisk's cdr log fields

Asterisk has the following fields

   CREATE TABLE `cdr` (
  `calldate` datetime NOT NULL default '0000-00-00 00:00:00',
  `clid` varchar(80) NOT NULL default '',
  `src` var开发者_如何学Gochar(80) NOT NULL default '',
  `dst` varchar(80) NOT NULL default '',
  `dcontext` varchar(80) NOT NULL default '',
  `channel` varchar(80) NOT NULL default '',
  `dstchannel` varchar(80) NOT NULL default '',
  `lastapp` varchar(80) NOT NULL default '',
  `lastdata` varchar(80) NOT NULL default '',
  `duration` int(11) NOT NULL default '0',
  `billsec` int(11) NOT NULL default '0',
  `disposition` varchar(45) NOT NULL default '',
  `amaflags` int(11) NOT NULL default '0',
  `accountcode` varchar(20) NOT NULL default '',
  `uniqueid` varchar(32) NOT NULL default '',
  `userfield` varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Most field names are self explanatory, however some fields contain non-self-explanatory data. For instance dst = "s", is anyone aware of documentation that explains this and other pieces of data logged in the CDR table?


dst is the extension where your call lands


The cdr will show dst="s" when the context where the call lands has no other matching extension. This is sometimes used as an extension of last resort as described Asterisk+s+extension. The article also mentions the use of the s extension in macros which is also a possible reason. Depending on how you setup Asterisk, you may not realize that your calls are being handled by the Asterisk stdexten macro which only uses the s extension.

One way to augment the cdr with the intention of providing a clearer representation of your call flows, is to log your cdr to a database using the cdr_adaptive_odbc module. Making this change to adaptive CDR puts you in a position to add additional columns to the CDR. The additional columns will help to clarify all the different types of call flows you will see as your dialplan becomes more complex. If we were to use the stdexten as an example, even though the dst=s, you can bring further clarity to the cdr record by populating another cdr field with the actual extension. This can be done using the cdr function in this manner CDR(xdst)=${ARG2}.


Here you go: http://www.asteriskguide.com/mediawiki/index.php/Asterisk_Call_Detail_Records


The wiki has a good reference for many of those fields: https://wiki.asterisk.org/wiki/display/AST/CDR+Fields

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜