Skip to content

Dispatch created but job never starts (no agent assignment, LK Cloud + outbound-caller-python) #13

Open

Description

@edengby

The issue is:
lk dispatch create returns state: created, but the job never transitions to running and no call is placed.

I'm running with Livekit Cloud Server, the project in Docker.

How to reproduce:
Run the agent using the configuration in the README.
I added SIP_OUTBOUND_TRUNK_ID in the .env file.

Then execute on the docker cli:

lk dispatch create \
  --new-room \
  --agent-name outbound-caller \
  --metadata '{"phone_number": "+1234567890", "transfer_to": "+9876543210}'

response is:

Dispatch created: id:"AD_kqj7TP9VuRD8"  agent_name:"outbound-caller"  room:"room-7hc63eYAK4B7"  metadata:"{\"phone_number\": \"+1234567890\", \"transfer_to\": \"+9876543210}"  state:{created_at:1749271842128913872}

The Docker logs:

2025-06-07 07:45:26 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2025-06-07 07:45:24 2025-06-07 04:45:24,139 - DEBUG asyncio - Using selector: EpollSelector 
2025-06-07 07:45:24 2025-06-07 04:45:24,140 - DEV  livekit.agents - Watching /app 
2025-06-07 07:45:25 2025-06-07 04:45:25,207 - DEBUG asyncio - Using selector: EpollSelector 
2025-06-07 07:45:25 2025-06-07 04:45:25,209 - INFO livekit.agents - starting worker {"version": "1.0.23", "rtc-version": "1.0.7"}
2025-06-07 07:45:25 2025-06-07 04:45:25,210 - INFO livekit.agents - preloading plugins {"packages": ["livekit.plugins.deepgram", "livekit.plugins.openai", "livekit.plugins.cartesia", "livekit.plugins.silero", "livekit.plugins.turn_detector"]}
2025-06-07 07:45:25 2025-06-07 04:45:25,218 - INFO livekit.agents - starting inference executor 
2025-06-07 07:45:26 2025-06-07 04:45:26,087 - INFO livekit.agents - initializing process {"pid": 21, "inference": true}
2025-06-07 07:45:26 2025-06-07 04:45:26,250 - DEBUG livekit.agents - initializing inference runner {"runner": "lk_end_of_utterance_en", "pid": 21, "inference": true}
2025-06-07 07:45:27 2025-06-07 04:45:27,087 - INFO livekit.agents - process initialized {"pid": 21, "inference": true, "elapsed_time": 1.0}
2025-06-07 07:45:27 2025-06-07 04:45:27,084 - DEBUG livekit.agents - inference runner initialized {"runner": "lk_end_of_utterance_en", "elapsed_time": 0.8337774990000071, "pid": 21, "inference": true}
2025-06-07 07:45:27 2025-06-07 04:45:27,086 - DEBUG asyncio - Using selector: EpollSelector {"pid": 21, "inference": true}
2025-06-07 07:45:27 2025-06-07 04:45:27,090 - INFO livekit.agents - see tracing information at http://localhost:46085/debug 
2025-06-07 07:45:27 2025-06-07 04:45:27,200 - INFO livekit.agents - registered worker {"id": "AW_rijVADXd9nZB", "url": "wss://toto-ct5xhgf3.livekit.cloud", "region": "USA", "protocol": 16}

No phone call is made.

Activity

  1. davidzhao commented on Jun 8, 2025

    @davidzhao
    Contributor

    are these running in the same project? when you run lk dispatch create, it should have printed:

    % lk sip dispatch create ...
    Using default project [......]
    
  2. edengby commented on Jun 11, 2025

    @edengby
    Author

    That's the output:

    lk dispatch create
    Using url, api-key, api-secret from environment
    NAME:
       lk dispatch create - Create an agent dispatch
    
    USAGE:
       lk dispatch create
    
    OPTIONS:
       --room string        room name
       --new-room           when set, will generate a unique room name (default: false)
       --agent-name string  agent to dispatch
       --metadata string    metadata to send to agent
       --help, -h           show help
    room or new-room is required
    

    and:

    $ lk dispatch create --new-room --agent-name sam
    Using url, api-key, api-secret from environment
    Dispatch created: id:"AD_2MrhCZNgmLMh"  agent_name:"sam"  room:"room-fhtu8zsPq9q2"  state:{created_at:1749655610869065299}
    
  3. davidzhao commented on Jun 11, 2025

    @davidzhao
    Contributor

    Using url, api-key, api-secret from environment

    this means you have a LIVEKIT_URL env var set.. could you print it out to ensure it matches wss://toto-ct5xhgf3.livekit.cloud

  4. edengby commented on Jun 11, 2025

    @edengby
    Author
    $ echo $LIVEKIT_URL
    wss://toto-ct5xhgf3.livekit.cloud
    
  5. edengby commented on Jun 20, 2025

    @edengby
    Author

    @davidzhao I want to connect the outbound call to livekit UI, is it possible to make the phone call via https://github.com/livekit-examples/voice-assistant-frontend?

  6. Anietz commented on Jun 25, 2025

    @Anietz

    @edengby Did you set your agent name as outbound-caller ?

    Also double check the payload, there is a missing double quote :

    lk dispatch create \
      --new-room \
      --agent-name outbound-caller \
      --metadata '{"phone_number": "+1234567890", "transfer_to": "+9876543210"}' 
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions