Added chan.masquerade handler.

git-svn-id: http://yate.null.ro/svn/yate/trunk@1635 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2008-01-16 10:00:13 +00:00
parent b69264c528
commit 7bb175f618
1 changed files with 15 additions and 0 deletions

View File

@ -2482,6 +2482,7 @@ void AnalogDriver::initialize()
if (!m_init) {
m_init = true;
setup();
installRelay(Masquerade);
installRelay(Halt);
installRelay(Progress);
installRelay(Update);
@ -2674,6 +2675,20 @@ bool AnalogDriver::received(Message& msg, int id)
String target;
switch (id) {
case Masquerade:
// Masquerade a recorder message
target = msg.getValue("id");
if (target.startsWith(recPrefix())) {
Lock lock(this);
AnalogCallRec* rec = findRecorder(target);
if (rec) {
msg = msg.getValue("message");
msg.clearParam("message");
msg.userData(rec);
return false;
}
}
break;
case Status:
case Drop:
target = msg.getValue("module");