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

chore: Remove dead code

Clémence Lesné67112293733a
diff --git a/Makefile b/Makefile
index 83aa0ef..3f3f263 100644
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,6 @@ start:
$(MAKE) eventgrid-register \
endpoint=$(tunnel_url) \
name=$(tunnel_name) \
- phone_number=$(bot_phone_number) \
source="/subscriptions/2e41c463-3dfb-4760-8161-60e8cefa6d28/resourceGroups/$(name)/providers/Microsoft.Communication/communicationServices/$(name)"
@echo "🚀 Claim AI is running on $(tunnel_url)"
@@ -128,7 +127,6 @@ deploy:
$(MAKE) eventgrid-register \
endpoint=$(shell az deployment sub show --name $(name) | yq '.properties.outputs["appUrl"].value') \
name=$(name) \
- phone_number=$(bot_phone_number) \
source=$(shell az deployment sub show --name $(name) | yq '.properties.outputs["communicationId"].value')
@echo "🚀 Claim AI is running on $(shell az deployment sub show --name $(name) | yq '.properties.outputs["appUrl"].value')"
diff --git a/main.py b/main.py
index 4b0aafa..320b753 100644
--- a/main.py
+++ b/main.py
@@ -127,7 +127,6 @@ api = FastAPI(
CALL_EVENT_URL = f'{CONFIG.api.events_domain.strip("/")}/call/event'
-CALL_INBOUND_URL = f'{CONFIG.api.events_domain.strip("/")}/call/inbound'
SENTENCE_R = r"[^\w\s+\-/'\",:;()@=]"
MESSAGE_ACTION_R = rf"action=([a-z_]*)( .*)?"
MESSAGE_STYLE_R = rf"style=([a-z_]*)( .*)?"
@@ -310,9 +309,6 @@ async def communication_event_worker(
)
)
- await asyncio.sleep(
- 0.5
- ) # 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_ivr_language(
call=call, client=client
) # Every time a call is answered, confirm the language