Added duration of call to cdrbuild status report.

git-svn-id: http://voip.null.ro/svn/yate@1980 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-05-10 17:37:46 +00:00
parent 115f88d2eb
commit f795aa6558

View file

@ -239,6 +239,10 @@ String CdrBuilder::getStatus() const
{
String s(m_status);
s << "|" << getValue("caller") << "|" << getValue("called");
unsigned int sec = 0;
if (m_start)
sec = (Time::now() - m_start + 500000) / 1000000;
s << "|" << sec;
return s;
}
@ -388,7 +392,7 @@ bool StatusHandler::received(Message &msg)
const char *sel = msg.getValue("module");
if (sel && ::strcmp(sel,"cdrbuild"))
return false;
String st("name=cdrbuild,type=cdr,format=Status|Caller|Called");
String st("name=cdrbuild,type=cdr,format=Status|Caller|Called|Duration");
st << ";cdrs=" << s_cdrs.count();
if (msg.getBoolValue("details",true)) {
st << ";";