Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: Random issues when app is too quick compared to the call backend

Clémence Lesné9d1687b7d1de
diff --git a/main.py b/main.py
index 89c7519..7ee78bb 100644
--- a/main.py
+++ b/main.py
@@ -300,6 +300,7 @@ async def communication_event_worker(
)
if len(call.messages) == 1: # First call
+ await asyncio.sleep(1) # Wait for the call to be ready, sometimes an error "(8501) Action is invalid when call is not in Established state" is raised
await handle_recognize_text(
call=call,
client=client,