[sr-dev] xmlrpc interfaces

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Jul 6 14:35:08 CEST 2009


On Jul 04, 2009 at 12:14, Juha Heinanen <jh at tutpro.com> wrote:
> in situation where both k and s modules are in use, is there a need for
> two different xmlrpc clients or can s or k xmlrpc interface be used to
> issue all xmlrpc commands?
> 
> i have noticed that serctl has mi argument after which a k ctl command
> can be given via ser ctl transport.  does the same apply also to ser
> xmlrpc transport?

Theoretically yes, but in practice there might be some change needed.
For example the mi_rpc module seems to include the reason
 (e.g. 200 Ok) among the parameters and then it prints some extra info
 for the value, e.g.:

sercmd> mi pwd
200 OK

+ WD:: /home/andrei/sr.git

The same info will appear in xmlrpc and I assume that this is not what
is expected (it should be only "/home/andrei/sr.git", at least that's
the output of core.pwd).
Another possible problem is the ARRAY type for xmlrpc (the xmlrpc
specifications doesn't support multiple return values in the same reply,
but it does support returning an array). So far in ser an rpc function
returning an array must be marked explicitly (the RET_ARRAY flag).
That would be a problem for mi commands that return multiple values
(either the mi_rpc modules should know them somehow and add the RET_ARRAY
flag automatically for them, or we should change the xmlrpc value to
automatically detect if an array is needed). Note that this problem
appears only for the xmlrpc transport, for the binrpc/ctl transport it
doesn't matter since it supports multiple values in replies.

What we would need are some example mi_xmlrpc replies from kamailio and the
 same replies from sr xmlrpc via mi_rpc.

Andrei



More information about the sr-dev mailing list