<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>I'm having trouble with any MI command that has parameters over
UDP MI_DATAGRAM.</p>
<p>Below are a couple of captured packets:</p>
<p>U 2020/07/05 20:24:55.472104 185.222.222.247:34176 ->
185.222.222.247:9061 #3<br>
{"jsonrpc":"2.0","method":"get_statistics","id":"1075","params":["dialog:","tm:"]}<br>
</p>
<p><br>
U 2020/07/05 20:24:55.472233 185.222.222.247:9061 ->
185.222.222.247:34176 #4<br>
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid
params"},"id":"1075"}<br>
</p>
<p>The request is identical to the example given in <a
moz-do-not-send="true"
href="https://opensips.org/docs/modules/3.0.x/mi_datagram.html">https://opensips.org/docs/modules/3.0.x/mi_datagram.html</a>
But as you can see I get an invalid params error (dialog and tm
modules are both loaded).</p>
<p>A command without params is fine, see below:</p>
<p><br>
U 2020/07/05 20:24:23.650924 185.222.222.247:48846 ->
185.222.222.247:9061 #1<br>
{"jsonrpc":"2.0","method":"which","id":"1065"}<br>
<br>
</p>
<p>U 2020/07/05 20:24:23.651093 185.222.222.247:9061 ->
185.222.222.247:48846 #2<br>
{"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"}<br>
<br>
</p>
<p>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.<br>
</p>
<div class="moz-signature"> <br>
</div>
<font face="Verdana, Helvetica, Sans-Serif" color="#000000">Kind
regards,<br>
<br>
Adrian Fretwell<br>
<br>
Sibthorpe<br>
Nottinghamshire<br>
UK.<br>
</font>
<p><br>
</p>
<small><small><small>
</small></small></small>
</body>
</html>