[sr-dev] RPC WEB interface

Ovidiu Sas osas at voipembedded.com
Wed Nov 2 19:23:11 CET 2011


Hello all,


I plan to build a small embedded web interface into sip-router for
executing RPC commands from a web page.
I already have part of the infrastructure working (re-using the HTTP
part from core and the xhttp module).
I would like to provide a simple and clean interface, organizing the
access to RPC comands based on the module that provides them.
The issue is that once an RPC command is registered into the core, the
module that provides the command is not available.
I'm looking foe a way to capture this information.  One way to capture
this information would be to change the signature of the
rpc_lookup.h:rpc_register_array() and provide the module name along
with the  rpc_exports.  I know that some modules set the name of their
rpc commands based on the following pattern: <module>.<rpc_command>,
but his is not fully enforced (there are rpc commands that are not
following this pattern).  One option would be to change the name of
those commands and provide the old names as an alias.
Also, there are modules that register the rpc_exports via the sr
interface before the modules init and modules that registers the
rpc_exports during init (via the rpc_register_array).
This means that the list of rpc commands is not complete until all
modules are initialized.  It would be good to be more strict and
enforce rpc registration for all modules before init (this will
require a new interface and I think there was a plan to merge the ser
module interface with the kamailio module interface).

To summarize, I'm trying to solve two issues here:
 1. trace back the module that provides an rpc command based on command name;
 2. enforcing a common module interface for both ser and kamailio modules.


Regards,
Ovidiu Sas



More information about the sr-dev mailing list