Added a way for extmodule to query node name and run id.
git-svn-id: http://voip.null.ro/svn/yate@1664 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
0b7a881e84
commit
b2be1f6d13
|
@ -197,6 +197,7 @@ parameter<br />
|
|||
The answer to the change request is delivered asynchronously (see below).<br />
|
||||
<name> - name of the parameter to modify, must not be empty<br />
|
||||
<value> - new value to set in the local module instance, empty to just query<br />
|
||||
For read-only parameters you must provide an empty value.<br />
|
||||
<b>Currently supported parameters:</b><br />
|
||||
id (string) - Identifier of the associated channel, if any<br />
|
||||
disconnected (bool) - Enable or disable sending "chan.disconnected" messages<br />
|
||||
|
@ -206,6 +207,8 @@ timebomb (bool) - Terminate this module instance if a timeout occured<br />
|
|||
reenter (bool) - If this module is allowed to handle messages generated by itself<br />
|
||||
selfwatch (bool) - If this module is allowed to watch messages generated by itself<br />
|
||||
restart (bool) - Restart this global module if it terminates unexpectedly. Must be turned off to allow normal termination<br />
|
||||
runid (readonly) - Get the engine's run identifier<br />
|
||||
nodename (readonly) - Get the server's node name as known by the engine<br />
|
||||
</p>
|
||||
|
||||
<p><b>Keyword: %%<setlocal</b><br />
|
||||
|
|
|
@ -1282,6 +1282,14 @@ bool ExtModReceiver::processLine(const char* line)
|
|||
val = m_selfWatch;
|
||||
ok = true;
|
||||
}
|
||||
else if (id == "nodename") {
|
||||
ok = val.null();
|
||||
val = Engine::nodeName();
|
||||
}
|
||||
else if (id == "runid") {
|
||||
ok = val.null();
|
||||
val = Engine::runId();
|
||||
}
|
||||
DDebug("ExtModReceiver",DebugAll,"Set '%s'='%s' %s",
|
||||
id.c_str(),val.c_str(),ok ? "ok" : "failed");
|
||||
String out("%%<setlocal:");
|
||||
|
|
Loading…
Reference in New Issue