livekit-cli icon indicating copy to clipboard operation
livekit-cli copied to clipboard

Missing Rule error on Creating a new dispatch rule

Open manpreetsingh78 opened this issue 5 months ago • 2 comments
trafficstars

manpreetsingh78 avatar Jun 13 '25 08:06 manpreetsingh78

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

manpreetsingh78 avatar Jun 13 '25 08:06 manpreetsingh78

I’m experiencing the same issue, downgrading to version 2.4.9 fixes it

samirsalman avatar Jun 18 '25 08:06 samirsalman

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.

rektdeckard avatar Jul 17 '25 20:07 rektdeckard