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: Cannot handle calls with a trailing slash on "events_domain"

Clémence Lesnéc9adea8bba89
diff --git a/main.py b/main.py
index 89d76b1..cc6113a 100644
--- a/main.py
+++ b/main.py
@@ -74,8 +74,8 @@ sms_client = SmsClient(
credential=AZ_CREDENTIAL, endpoint=CONFIG.communication_service.endpoint
)
-CALL_EVENT_URL = f"{CONFIG.api.events_domain}/call/event"
-CALL_INBOUND_URL = f"{CONFIG.api.events_domain}/call/inbound"
+CALL_EVENT_URL = f'{CONFIG.api.events_domain.strip("/")}/call/event'
+CALL_INBOUND_URL = f'{CONFIG.api.events_domain.strip("/")}/call/inbound'
class Context(str, Enum):