Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
fix: Make sure HTTP sessions are closed on shutdown
Clémence Lesné09deebbd65f3
diff --git a/app/main.py b/app/main.pyindex 79546c7..3dcb862 100644--- a/app/main.py+++ b/app/main.py@@ -57,7 +57,7 @@ from app.helpers.call_events import ()from app.helpers.call_utils import ContextEnum as CallContextEnumfrom app.helpers.config import CONFIG-from app.helpers.http import azure_transport+from app.helpers.http import aiohttp_session, azure_transportfrom app.helpers.logging import loggerfrom app.helpers.monitoring import SpanAttributes, span_attribute, tracerfrom app.helpers.pydantic_types.phone_numbers import PhoneNumber@@ -152,6 +152,9 @@ async def lifespan(app: FastAPI): # noqa: ARG001if queue_tasks:queue_tasks.cancel()+ # Close HTTP session+ await (await aiohttp_session()).close()+# FastAPIapi = FastAPI(