Skip to content
DocsStart free

Set up a call queue

Create a queue, staff it with an agent, and route callers to it.

  1. Create the queue. Pick a distribution strategy, a max wait, wrap-up time, and a timeout overflow.

    {
    "id": "q_01j160r23gw5zkpfjme3fwzs5k", "account_id": "acc_01jf18ah3jeb5w6dfp27sgjsbt", "name": "Support",
    "strategy": "longest_idle",
    "agent_ring_timeout_sec": 20,
    "max_wait_sec": 600,
    "wrap_up_sec": 10,
    "max_no_answer": 3,
    "moh_mode": "stream",
    "timeout_dest_kind": "voicemail", "timeout_dest_id": "vm_01jg8asp59ps9rtt7azhrhvcre",
    "no_agents_dest_kind": "voicemail", "no_agents_dest_id": "vm_01jg8asp59ps9rtt7azhrhvcre"
    }
  2. Make a user an agent. Set is_agent = 1 on the sip_user, and register a device for them.

    { "id": "us_01jatt0336xwzg2zbf3q9pyfm5", "account_id": "acc_01jf18ah3jeb5w6dfp27sgjsbt", "username": "1001", "display_name": "Dana", "is_agent": 1 }
  3. Add the agent to the queue with a skill tier (lower tier rings first) and a membership mode.

    { "queue_id": "q_01j160r23gw5zkpfjme3fwzs5k", "user_id": "us_01jatt0336xwzg2zbf3q9pyfm5", "tier_level": 1, "position": 0, "mode": "static" }
  4. Bring the agent online. The agent app calls the /agent endpoint:

    Terminal window
    curl -X POST https://nodes.sip.io/agent \
    -H 'content-type: application/json' \
    -d '{ "accountId": "acc_01jf18ah3jeb5w6dfp27sgjsbt", "userId": 1001, "event": "available", "queues": [{ "queueId": "q_01j160r23gw5zkpfjme3fwzs5k", "level": 1 }] }'
  5. Route callers to the queue. Either point a number straight at it…

    { "e164": "12025550123", "dest_kind": "queue", "dest_id": "q_01j160r23gw5zkpfjme3fwzs5k" }

    …or use an enqueue node inside a flow.

  6. Test it. Call in: with Dana available you’ll connect instantly (instant connect). With Dana busy, you’ll wait on hold music until she’s free; the reserve fence guarantees one caller, one agent.