Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
refacto: Simplify code
Clémence Lesné68a723bfc2a1
diff --git a/Makefile b/Makefileindex 1a6dea3..bf718af 100644--- a/Makefile+++ b/Makefile@@ -146,7 +146,6 @@ post-deploy:$(MAKE) eventgrid-register \endpoint=$(app_url) \- name=$(name) \source=$(communication_id)@echo "🚀 Claim AI is running on $(app_url)"diff --git a/persistence/communication_services.py b/persistence/communication_services.pyindex 1cd584f..8cf0388 100644--- a/persistence/communication_services.py+++ b/persistence/communication_services.py@@ -36,7 +36,7 @@ class CommunicationServicesSms(ISms):responses: list[SmsSendResult] = await client.send(from_=str(self._config.phone_number),message=content,- to=str(phone_number),+ to=phone_number,)response = responses[0]if response.successful:@@ -62,7 +62,6 @@ class CommunicationServicesSms(ISms):credential=self._config.access_key.get_secret_value(),endpoint=self._config.endpoint,)-try:yield clientfinally:diff --git a/persistence/twilio.py b/persistence/twilio.pyindex aa79132..adbed80 100644--- a/persistence/twilio.py+++ b/persistence/twilio.py@@ -46,7 +46,7 @@ class TwilioSms(ISms):res = self._client.messages.create(body=content,from_=str(self._config.phone_number),- to=str(phone_number),+ to=phone_number,)# TODO: How to check the delivery status? Seems present in "res.status" but not documentedif res.error_message: