Closed Integration-IT closed 2 months ago
After extra tests, "I" and "A" are relevant but the last partition could be not.
(cli): mi ds_set_state (TAB)
address= group= state=
...
(cli): mi ds_set_state state=I group=1 address=sip:x.x.x.x:5060
"OK"
(cli): mi ds_set_state state=A group=1 address=sip:x.x.x.x:5060
"OK"
(cli): mi ds_set_state state=A group=1 address=sip:x.x.x.x:5060 partition=default
ERROR: command 'ds_set_state' returned: -32602: Invalid params (Too few or too many parameters)
The dispatcher.php would like pass it whatever
DBG:httpd:answer_to_connection: got ContentType [3] with len [138]: {"jsonrpc":"2.0","id":1,"method":"ds_set_state","params":{"state":"I","group":"1","address":"sip:x.x.x.x:5060","partition":"default"}}
DBG:mi_http:mi_http_run_mi_cmd: got command=ds_set_state
ERROR:core:handle_mi_request: Invalid parameters
Have you properly configure the dispatcher_partition
setting in the dispatcher tool ?
Dispatcher menu, memory state. When memory state would be changed from "GREEN" state to "RED" state to isolate the destination, the MI command transmits an invalid state as a capital "i" like "Active" state.
Let's try to disable manually from opensips-cli and inspect the log request:
result: DB state is Inactive and memory state is red.
Let's try to enable manually from opensips-cli and inspect the log request:
result: DB state is Active and memory state is green.
Finally, let's try to disable a destination from dispatcher control panel (Memory State section) and inspect the MI request:
The issue could be here : change state section. Before modify the state, the actual state is stored as
$desired_state = 'I';
and this result should not be reuse to set the new val but the opposite one instead.