Update the status of the peer of a ringing or answered channel in CDR.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4270 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-04-06 16:28:04 +00:00
parent 13d75e000f
commit 3954d96b85
1 changed files with 5 additions and 3 deletions

View File

@ -72,7 +72,7 @@ class CdrBuilder : public NamedList
public:
CdrBuilder(const char *name);
virtual ~CdrBuilder();
void update(int type, u_int64_t val);
void update(int type, u_int64_t val, const char* status = 0);
bool update(const Message& msg, int type, u_int64_t val);
void emit(const char *operation = 0);
String getStatus() const;
@ -304,7 +304,7 @@ String CdrBuilder::getStatus() const
return s;
}
void CdrBuilder::update(int type, u_int64_t val)
void CdrBuilder::update(int type, u_int64_t val, const char* status)
{
switch (type) {
case CdrStart:
@ -326,6 +326,8 @@ void CdrBuilder::update(int type, u_int64_t val)
m_hangup = val;
break;
}
if (!TelEngine::null(status))
m_status = status;
}
bool CdrBuilder::update(const Message& msg, int type, u_int64_t val)
@ -478,7 +480,7 @@ bool CdrHandler::received(Message &msg)
if (id.null())
id = msg.getValue("targetid");
if (id && (b = CdrBuilder::find(id))) {
b->update(type,msg.msgTime().usec());
b->update(type,msg.msgTime().usec(),msg.getValue("status"));
b->emit();
}
}