livekit-cli
livekit-cli copied to clipboard
Missing Rule error on Creating a new dispatch rule
VERSION: 2.4.10
will creating a new dispatch rule using CLI
dispatch-rule.json example used
{ "rule": { "dispatchRuleIndividual": { "roomPrefix": "call" } }, "trunkIds": [ "ST_XXXX" ], "name": "XXXX-rule", "roomConfig": { "agents": [{ "agentName": "XXXX-XXX-agent" }] } }
CLI command - lk sip dispatch create dispatch-rule.json
Error:- Using default project [my-local] missing rule
I’m experiencing the same issue, downgrading to version 2.4.9 fixes it
I'm not sure if this was intentional, but it seems some of our protocol types have changed, and the JSON you're passing is no longer valid. You now need to wrap each rule in a dispatchRule object. I tried modifying the payload and it worked:
{
"dispatchRule": {
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call"
}
}
},
"trunkIds": ["ST_XXXX"],
"name": "XXXX-rule",
"roomConfig": {
"agents": [
{
"agentName": "XXXX-XXX-agent"
}
]
}
}
cc @dennwc in case this is unintended.