Added setting of "peerid" in call.execute to most modules.
git-svn-id: http://voip.null.ro/svn/yate@404 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
b01f7ca157
commit
cab5861ebb
|
@ -209,6 +209,7 @@ bool ConferenceDriver::msgExecute(Message& msg, String& dest)
|
|||
if (ch) {
|
||||
ConfChan *c = new ConfChan(dest);
|
||||
if (ch->connect(c)) {
|
||||
msg.setParam("peerid",c->id());
|
||||
c->deref();
|
||||
msg.setParam("room",prefix()+dest);
|
||||
return true;
|
||||
|
|
|
@ -453,8 +453,10 @@ bool SoundDriver::msgExecute(Message& msg, String& dest)
|
|||
CallEndpoint* ch = static_cast<CallEndpoint*>(msg.userData());
|
||||
if (ch) {
|
||||
DSoundChan *ds = new DSoundChan;
|
||||
if (ch->connect(ds))
|
||||
if (ch->connect(ds)) {
|
||||
msg.setParam("peerid",ds->id());
|
||||
ds->deref();
|
||||
}
|
||||
else {
|
||||
ds->destruct();
|
||||
return false;
|
||||
|
|
|
@ -870,7 +870,8 @@ bool IAXDriver::msgExecute(Message& msg, String& dest)
|
|||
Channel *ch = static_cast<Channel*>(msg.userData());
|
||||
if (ch && conn->connect(ch))
|
||||
{
|
||||
msg.addParam("targetid",conn->id());
|
||||
msg.setParam("peerid",conn->id());
|
||||
msg.setParam("targetid",conn->id());
|
||||
conn->deref();
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -700,9 +700,10 @@ bool PriChan::call(Message &msg, const char *called)
|
|||
CallEndpoint *ch = static_cast<CallEndpoint*>(msg.userData());
|
||||
if (ch) {
|
||||
openData(lookup(layer1,dict_str2law),msg.getIntValue("cancelecho",dict_numtaps));
|
||||
connect(ch);
|
||||
if (connect(ch))
|
||||
msg.setParam("peerid",id());
|
||||
m_targetid = msg.getValue("id");
|
||||
msg.addParam("targetid",id());
|
||||
msg.setParam("targetid",id());
|
||||
}
|
||||
else
|
||||
msg.userData(this);
|
||||
|
|
|
@ -298,8 +298,10 @@ bool MOHHandler::received(Message &msg)
|
|||
CallEndpoint* ch = static_cast<CallEndpoint*>(msg.userData());
|
||||
if (ch) {
|
||||
MOHChan *mc = new MOHChan(name);
|
||||
if (ch->connect(mc))
|
||||
if (ch->connect(mc)) {
|
||||
msg.setParam("peerid",mc->id());
|
||||
mc->deref();
|
||||
}
|
||||
else {
|
||||
mc->destruct();
|
||||
return false;
|
||||
|
|
|
@ -430,7 +430,8 @@ bool OssHandler::received(Message &msg)
|
|||
Debug(DebugInfo,"We are routing to device '%s'",dest.matchString(1).c_str());
|
||||
if (ch && chan->connect(ch)) {
|
||||
chan->setTarget(msg.getValue("id"));
|
||||
msg.addParam("targetid",dest);
|
||||
msg.setParam("peerid",dest);
|
||||
msg.setParam("targetid",dest);
|
||||
chan->answer();
|
||||
chan->deref();
|
||||
}
|
||||
|
|
|
@ -243,8 +243,10 @@ bool ToneGenDriver::msgExecute(Message& msg, String& dest)
|
|||
CallEndpoint* ch = static_cast<CallEndpoint*>(msg.userData());
|
||||
if (ch) {
|
||||
ToneChan *tc = new ToneChan(dest);
|
||||
if (ch->connect(tc))
|
||||
if (ch->connect(tc)) {
|
||||
msg.setParam("peerid",tc->id());
|
||||
tc->deref();
|
||||
}
|
||||
else {
|
||||
tc->destruct();
|
||||
return false;
|
||||
|
|
|
@ -541,6 +541,7 @@ bool WaveFileDriver::msgExecute(Message& msg, String& dest)
|
|||
dest.matchString(2).c_str());
|
||||
WaveChan *c = new WaveChan(dest.matchString(2),meth,maxlen);
|
||||
if (ch->connect(c)) {
|
||||
msg.setParam("peerid",c->id());
|
||||
c->deref();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1583,6 +1583,7 @@ bool SIPDriver::msgExecute(Message& msg, String& dest)
|
|||
if (conn->getTransaction()) {
|
||||
CallEndpoint* ch = static_cast<CallEndpoint*>(msg.userData());
|
||||
if (ch && conn->connect(ch)) {
|
||||
msg.setParam("peerid",conn->id());
|
||||
msg.setParam("targetid",conn->id());
|
||||
conn->deref();
|
||||
return true;
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
|
||||
#include <modules/libypri.h>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#error This module is not for Windows
|
||||
#else
|
||||
|
||||
extern "C" {
|
||||
#include <linux/zaptel.h>
|
||||
};
|
||||
|
@ -417,4 +421,6 @@ void ZapDriver::initialize()
|
|||
init("zapchan");
|
||||
}
|
||||
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
/* vi: set ts=8 sw=4 sts=4 noet: */
|
||||
|
|
Loading…
Reference in New Issue