Added peer id to status messages.

git-svn-id: http://yate.null.ro/svn/yate/trunk@410 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2005-06-17 18:34:16 +00:00
parent 891db9cf7e
commit a9b5d2c4e2
3 changed files with 10 additions and 2 deletions

View File

@ -763,7 +763,7 @@ void Driver::msgStatus(Message& msg)
void Driver::statusModule(String& str)
{
Module::statusModule(str);
str.append("format=Status|Address",",");
str.append("format=Status|Address|Peer",",");
}
void Driver::statusParams(String& str)
@ -780,7 +780,7 @@ void Driver::statusChannels(String& str)
ObjList* l = m_chans.skipNull();
for (; l; l=l->skipNext()) {
Channel* c = static_cast<Channel*>(l->get());
str.append(c->id(),",") << "=" << c->status() << "|" << c->address();
str.append(c->id(),",") << "=" << c->status() << "|" << c->address() << "|" << c->getPeerId();
}
}

View File

@ -180,6 +180,7 @@ ConfChan::ConfChan(const String& name)
Lock lock(&__plugin);
ConfRoom* room = ConfRoom::get(name,true);
if (room) {
m_address = name;
setSource(room);
room->deref();
room->channels().append(this);

View File

@ -801,6 +801,13 @@ public:
inline CallEndpoint* getPeer() const
{ return m_peer; }
/**
* Get the connected peer call id
* @return Connected peer call id or empty string
*/
inline const String& getPeerId() const
{ return m_peer ? m_peer->id() : String::empty(); }
/**
* Connect the call endpoint to a peer.
* @param peer Pointer to the peer call endpoint.