Hi Juha,
with the new MI interface there is no difference between the functions
accessible via fifo or xmlrpc, via sockunix or whatever - the function
name and its implementation is unique and it can be triggered via all
present transport mechanism (fifo & xmlrpc for the moment) - the name
and the parameters are the same, disregarding the transport.
so, yes, you can access the "lcr_reload" command via xmlrpc.
As said, the params are the same, but in MI there is no line concept;
the parameter are nodes and the mapping between the nodes and input is
done by the transport layer.
How fifo maps, see:
http://www.openser.org/docs/modules/1.2.x/mi_fifo.html#AEN40
(basically a node is a line, but a node can be multi-line if quoted).
For xmlrpc, things are much simpler - an xml param node is a MI node.
Ex:
FIFO
:get_statistics:xxxxxx
core:
XMLRPC
<methodCall>
<methodName>get_statistics</methodName>
<params>
<param>
<value><string>core:</string></value>
</param>
<param>
<value><string>sl:</string></value>
</param>
</params>
</methodCall>
regarding the security concerns - I agree it is good to have, but I
think it is easier and more powerful do do it from iptables.
Regards,
Bogdan
Juha Heinanen wrote:
i was going to try out Xmlrpc Module, but documentation is not very
clear.
- does each fifo command map to an xmlrpc function with the same name?
for example, if i want to execute lcr_reload fifo command, do i call
an xmprpc function with name "lcr_reload".
- if i want to execute a fifo command that has parameters, such
as t_uac_dlg, do i pass each line as a value of an array data element
or how?
in order to improve security, it would be a good idea to have a database
table which would contain the ip addresses of the allowed clients.
there could also be a shared secret that would be used to calculate a
md5 hash over the function name and parameters.
-- juha
_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel
_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel