Daniel-Constantin Mierla writes:
several days ago, a new module named mi_rpc was introduced to source tree. The goal is to be able to execute MI commands using RPC interface from sip router core.
Back to mi_rpc, one issue that needs to be sorted out is the output format. Right now doing a pretty-format printing which is not suitable for xmlrpc.
Feedback is very much appreciated, thanks,
i tried to get core stats out using xmlrcp. using serctl, i can do it like this:
srctl mi get_statistics core:200 OK
+ :: core:rcv_requests = 10 + :: core:rcv_replies = 0 + :: core:fwd_requests = 0 + :: core:fwd_replies = 0 + :: core:drop_requests = 0 + :: core:drop_replies = 0 + :: core:err_requests = 0 + :: core:err_replies = 0 + :: core:bad_URIs_rcvd = 0 + :: core:unsupported_methods = 10 + :: core:bad_msg_hdr = 0
using xmlrpc interface, i tried by giving command called "mi" with argument list "get_statistics" and "core":, but it didn't work:
c.mi(['get_statistics', 'core:']) ... xmlrpclib.Fault: <Fault 500: 'command parameter missing'>
how is the actual command and and its arguments supplied?
-- juha
On Jul 13, 2009 at 16:48, Juha Heinanen jh@tutpro.com wrote:
Daniel-Constantin Mierla writes:
[...]
Feedback is very much appreciated, thanks,
i tried to get core stats out using xmlrcp. using serctl, i can do it like this:
[...]
using xmlrpc interface, i tried by giving command called "mi" with argument list "get_statistics" and "core":, but it didn't work:
c.mi(['get_statistics', 'core:']) ... xmlrpclib.Fault: <Fault 500: 'command parameter missing'>
how is the actual command and and its arguments supplied?
It was a bug in xmlrpc support for optional parameters (used only by mi_rpc for now). It should be fixed now.
Andrei
Andrei Pelinescu-Onciul writes:
It was a bug in xmlrpc support for optional parameters (used only by mi_rpc for now). It should be fixed now.
thanks, c.mi('get_statistics', 'core:') now correctly returns:
['200 OK\n', '+ :: core:rcv_requests = 3', '+ :: core:rcv_replies = 0', '+ :: core:fwd_requests = 0', '+ :: core:fwd_replies = 0', '+ :: core:drop_requests = 0', '+ :: core:drop_replies = 0', '+ :: core:err_requests = 0', '+ :: core:err_replies = 0', '+ :: core:bad_URIs_rcvd = 0', '+ :: core:unsupported_methods = 3', '+ :: core:bad_msg_hdr = 0']
couple of questions:
- why is 200 OK followed by newline?
- what information does prefix "+ :: " in values provide?
- could both be removed?
-- juha