[OpenSIPS-Users] May I ask for some help with MI interface please

Adrian Fretwell adrian.fretwell at topgreen.co.uk
Sun Jul 5 19:48:43 EST 2020


Hello,

I'm having trouble with any MI command that has parameters over UDP 
MI_DATAGRAM.

Below are a couple of captured packets:

U 2020/07/05 20:24:55.472104 185.222.222.247:34176 -> 
185.222.222.247:9061 #3
{"jsonrpc":"2.0","method":"get_statistics","id":"1075","params":["dialog:","tm:"]}


U 2020/07/05 20:24:55.472233 185.222.222.247:9061 -> 
185.222.222.247:34176 #4
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid 
params"},"id":"1075"}

The request is identical to the example given in 
https://opensips.org/docs/modules/3.0.x/mi_datagram.html But as you can 
see I get an invalid params error  (dialog and tm modules are both loaded).

A command without params is fine, see below:


U 2020/07/05 20:24:23.650924 185.222.222.247:48846 -> 
185.222.222.247:9061 #1
{"jsonrpc":"2.0","method":"which","id":"1065"}

U 2020/07/05 20:24:23.651093 185.222.222.247:9061 -> 
185.222.222.247:48846 #2
{"jsonrpc":"2.0","result":["get_statistics","list_statistics","reset_statistics","uptime","version","pwd","arg","which","ps","kill","log_level","xlog_level","shm_check","cache_store","cache_fetch","cache_remove","event_subscribe","events_list","subscribers_list","list_tcp_conns","mem_pkg_dump","mem_shm_dump","mem_rpm_dump","reload_routes","help","list_blacklists","t_uac_dlg","t_uac_cancel","t_hash","t_reply","dlg_list","dlg_list_ctx","dlg_end_dlg","dlg_db_sync","dlg_restore_db","dlg_cluster_sync","profile_get_size","profile_list_dlgs","profile_get_values","list_all_profiles","profile_end_dlgs","dlg_push_var","dlg_send_sequential","ul_rm","ul_rm_contact","ul_dump","ul_flush","ul_add","ul_show_contact","ul_sync","ul_cluster_sync","nh_enable_ping","refreshWatchers","refresh_watchers","cleanup","pres_expose","pres_phtable_list","subs_phtable_list","pua_publish","pua_subscribe","rls_update_subscriptions","tcp_trace"],"id":"1065"}

Most of the documentation for the modules still shows the old non JSON 
way of communicating.  Can someone point me in the right direction please.


Kind regards,

Adrian Fretwell

Sibthorpe
Nottinghamshire
UK.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200705/f50b5fd8/attachment.html>


More information about the Users mailing list