rhythmic-furniture-71949
08/11/2025, 4:14 AMtall-airline-16756
08/11/2025, 4:14 AMtall-airline-16756
08/11/2025, 4:14 AMawait
on a boolean value — which unfortunately isn’t allowed. The await
keyword works only with awaitable things like coroutines or futures.
Here are a few common reasons this might happen and how you can fix them:
• Awaiting a Boolean Variable: Double-check that the thing you’re awaiting is actually a coroutine or future, not just a True or False. For example, instead of await True
, try using a condition like if condition:
.
• Returning a Boolean in an Async Function: Async functions should return awaitable objects, so try to avoid returning a boolean directly from them.
• Awaiting Expressions That Evaluate to Booleans: If a function gives back a boolean, don’t put await
in front of it. Just save the result and use it in an if-statement or wherever you need.
To get this sorted, take a look at where the error shows up and make sure every await
is used with something awaitable. If you want, feel free to share your code snippet, and I’d be happy to help you troubleshoot it more specifically!rhythmic-furniture-71949
08/11/2025, 4:15 AMcreate_sip_participant
starts dialing the user_
_try_:
await ctx.api.sip.create_sip_participant(
api.CreateSIPParticipantRequest(
_room_name_=ctx.room.name,
_sip_trunk_id_=outbound_trunk_id,
_sip_call_to_=phone_number,
_participant_identity_=participant_identity,
# function blocks until user answers the call, or if the call fails
_wait_until_answered_=True,
)
)
# wait for the agent session start and participant join
await session_started
participant = await ctx.wait_for_participant(identity=participant_identity)
logger.info(f"participant joined: {participant.identity}")
agent.set_participant(participant)
except api.TwirpError as e:
logger.error(
f"error creating SIP participant: {e.message}, "
f"SIP status: {e.metadata.get('sip_status_code')} "
f"{e.metadata.get('sip_status')}"
)
ctx.shutdown()
if name == "__main__":
cli.run_app(
WorkerOptions(
_entrypoint_fnc_=entrypoint,
_agent_name_="outbound-caller",
)
)tall-airline-16756
08/11/2025, 4:16 AMMultilingualModel
or EnglishModel
, here are some friendly tips to help you troubleshoot:
• Make Sure Async/Await is Used Properly: Double-check that all your async functions—like those in your turn detection models—are awaited correctly. Missing this can cause unexpected errors.
• STT and Model Setup: Confirm that your STT plugin is set up right and matches the language your turn detection model expects.
• Initialization: Make sure your AgentSession
includes everything it needs—STT, VAD, and the turn detection models—before you start.
• Logging: Turn on detailed logging to keep an eye on what your models are outputting. Adding some custom logs can also give you extra clarity.
• Error Handling: Wrap your async calls in try/catch blocks to catch and log any errors smoothly.
• Performance: Consider using compute-optimized instances to keep things running quickly during inference.
If you want, feel free to share the exact part of your code that’s giving you trouble—I’d be happy to help you dive deeper and find a solution together!