Hi, I have a weird scenario. i have an agent that'...
# agents
s
Hi, I have a weird scenario. i have an agent that's supposed to start from a text-only session and then if there's no response then make an SIP call to pull the person in. I am able to hear the agent but when i try to speak from my side after picking up the call the speech isn't getting registered at all. Basically i can't seem to get the user to publish. I'm trying to setup an RPC based auto toggle based on the example here: https://docs.livekit.io/agents/build/text/#toggle-audio But even with running the session.start() with the defaults i can't get my voice track to get published in the room.
looking at the Session data i can see that the agent isn't listed as a Subscriber by default and my gut feeling is that that's the root cause. The below snippet is how I'm dispatching the agent. I wonder where the autoSubscribe is getting missed here.
Copy code
dispatch_request = api.CreateAgentDispatchRequest(
            agent_name="outbound-agent",
            room=room_name,
            metadata=json.dumps(outbound_metadata),
        )
await lkapi.agent_dispatch.create_dispatch(dispatch_request)
Can i get my agent to switch subscription to a new participant who has joined afterwards via the participant_connected hook?