microscopic-airport-67304
06/27/2025, 7:52 PMtall-airline-16756
06/27/2025, 7:52 PMtall-airline-16756
06/27/2025, 7:52 PMmicroscopic-airport-67304
06/27/2025, 7:53 PMtall-airline-16756
06/27/2025, 7:54 PM@ctx.room.on("participant_connected")
def on_participant_connected(participant: rtc.RemoteParticipant):
<http://logger.info|logger.info>(f"new participant joined {participant.identity}")
if not "sip_" in participant.identity:
return
# Get the task from attributes
task = participant._info.attributes.get("task")
<http://logger.info|logger.info>(f"task: {task}")
# Initialize user data
userdata = UserData(task=task)
# Create and start the agent session
session = AgentSession(
userdata=userdata,
stt=deepgram.STT(),
llm=openai.LLM(base_url="<https://api.deepseek.com/v1>",
model="deepseek-chat",
api_key=os.getenv("DEEPSEEK_API_KEY")),
tts=cartesia.TTS(),
vad=silero.VAD.load(),
min_endpointing_delay=0.75
)
# Start the navigator agent
asyncio.create_task(
session.start(
room=ctx.room,
agent=NavigatorAgent()
)
)
This approach helps you smoothly welcome and handle SIP participants in your room. Pretty cool, right? 😊 Sources: Building an Automated IVR Menu Caller | LiveKit Docsmicroscopic-airport-67304
06/27/2025, 7:56 PMtall-airline-16756
06/27/2025, 7:56 PMmicroscopic-airport-67304
06/27/2025, 7:56 PMtall-airline-16756
06/27/2025, 7:57 PM