diff --git a/exotel-chatbot/inbound/README.md b/exotel-chatbot/inbound/README.md index 54a560bd..994a1592 100644 --- a/exotel-chatbot/inbound/README.md +++ b/exotel-chatbot/inbound/README.md @@ -154,6 +154,8 @@ Update your Voicebot Applet configuration to use your production server: - `ORGANIZATION_NAME` with your organization ID - Update custom parameters as needed for your production environment +- If the bot is deployed to a region other than us-west (default), update the websocket url with region. For example, if deployed in `eu-central`, the url becomes `"wss://eu-central.api.pipecat.daily.co/ws/exotel"` + ### Call your Bot diff --git a/exotel-chatbot/outbound/README.md b/exotel-chatbot/outbound/README.md index 68233246..a056d60c 100644 --- a/exotel-chatbot/outbound/README.md +++ b/exotel-chatbot/outbound/README.md @@ -185,6 +185,7 @@ Update your bot number's Voicebot Applet configuration for production: - `ORGANIZATION_NAME` with your organization ID > Alternatively, you can test your Pipecat Cloud deployment by keeping your bot number pointed to your local server via ngrok. +> If the bot is deployed to a region other than us-west (default), update the websocket url with region. For example, if deployed in `eu-central`, the url becomes `"wss://eu-central.api.pipecat.daily.co/ws/exotel"` ### Call your Bot diff --git a/plivo-chatbot/inbound/server.py b/plivo-chatbot/inbound/server.py index 3bd1c833..507781bd 100644 --- a/plivo-chatbot/inbound/server.py +++ b/plivo-chatbot/inbound/server.py @@ -39,7 +39,12 @@ def get_websocket_url(host: str, body_data: dict = None): service_host = f"{agent_name}.{org_name}" query_params.append(f"serviceHost={service_host}") + print("If deployed in a region other than us-west (default), update websocket url!") base_url = "wss://api.pipecat.daily.co/ws/plivo" + # uncomment appropriate region url: + # base_url = wss://us-east.api.pipecat.daily.co/ws/plivo + # base_url = wss://eu-central.api.pipecat.daily.co/ws/plivo + # base_url = wss://ap-south.api.pipecat.daily.co/ws/plivo else: base_url = f"wss://{host}/ws" diff --git a/plivo-chatbot/outbound/server.py b/plivo-chatbot/outbound/server.py index 8b4c3716..dcd07f37 100644 --- a/plivo-chatbot/outbound/server.py +++ b/plivo-chatbot/outbound/server.py @@ -72,7 +72,13 @@ def get_websocket_url(host: str): env = os.getenv("ENV", "local").lower() if env == "production": - return "wss://api.pipecat.daily.co/ws/plivo" + print("If deployed in a region other than us-west (default), update websocket url!") + ws_url = "wss://api.pipecat.daily.co/ws/plivo" + # uncomment appropriate region url: + # ws_url = wss://us-east.api.pipecat.daily.co/ws/plivo + # ws_url = wss://eu-central.api.pipecat.daily.co/ws/plivo + # ws_url = wss://ap-south.api.pipecat.daily.co/ws/plivo + return ws_url else: return f"wss://{host}/ws" diff --git a/telnyx-chatbot/inbound/README.md b/telnyx-chatbot/inbound/README.md index e2760c67..b852373a 100644 --- a/telnyx-chatbot/inbound/README.md +++ b/telnyx-chatbot/inbound/README.md @@ -147,6 +147,8 @@ Replace: - `AGENT_NAME` with the name of the agent you deployed in the previous stepyour deployed agent name - `ORGANIZATION_NAME` with your Pipecat Cloud organization name +> If the bot is deployed to a region other than us-west (default), update the websocket url with region. For example, if deployed in `eu-central`, the url becomes `"wss://eu-central.api.pipecat.daily.co/ws/telnyx?serviceHost=AGENT_NAME.ORGANIZATION_NAME"` + ### Call your Bot Your bot file is now deployed to Pipecat Cloud and Telnyx is configured to receive calls. Dial the number associated with your bot to start a conversation! diff --git a/telnyx-chatbot/outbound/server.py b/telnyx-chatbot/outbound/server.py index 5f80e81f..87627cca 100644 --- a/telnyx-chatbot/outbound/server.py +++ b/telnyx-chatbot/outbound/server.py @@ -79,7 +79,15 @@ def get_websocket_url(host: str): env = os.getenv("ENV", "local").lower() if env == "production": - return "wss://api.pipecat.daily.co/ws/telnyx" + print("If deployed in a region other than us-west (default), update websocket url!") + + ws_url = "wss://api.pipecat.daily.co/ws/telnyx" + # uncomment appropriate region url: + # ws_url = wss://us-east.api.pipecat.daily.co/ws/telnyx + # ws_url = wss://eu-central.api.pipecat.daily.co/ws/telnyx + # ws_url = wss://ap-south.api.pipecat.daily.co/ws/telnyx + + return ws_url else: return f"wss://{host}/ws" diff --git a/twilio-chatbot/inbound/README.md b/twilio-chatbot/inbound/README.md index 9458a8ed..41f7c6ae 100644 --- a/twilio-chatbot/inbound/README.md +++ b/twilio-chatbot/inbound/README.md @@ -160,6 +160,8 @@ where: - `AGENT_NAME` is the name of the agent that you deployed to Pipecat Cloud - `ORGANIZATION_NAME` is the name of your Pipecat Cloud organization +> If the bot is deployed to a region other than us-west (default), update the websocket url with region. For example, if deployed in `eu-central`, the url becomes `"wss://eu-central.api.pipecat.daily.co/ws/twilio"` + ### Call your Bot Place a call to the number associated with your bot. The bot will answer and start the conversation. diff --git a/twilio-chatbot/outbound/server_utils.py b/twilio-chatbot/outbound/server_utils.py index a19c39bc..39ff8dcb 100644 --- a/twilio-chatbot/outbound/server_utils.py +++ b/twilio-chatbot/outbound/server_utils.py @@ -162,7 +162,14 @@ def get_websocket_url() -> str: ws_url = local_server_url.replace("https://", "wss://") return f"{ws_url}/ws" else: - return "wss://api.pipecat.daily.co/ws/twilio" + print("If deployed in a region other than us-west (default), update websocket url!") + + ws_url = "wss://api.pipecat.daily.co/ws/twilio" + # uncomment appropriate region url: + # ws_url = wss://us-east.api.pipecat.daily.co/ws/twilio + # ws_url = wss://eu-central.api.pipecat.daily.co/ws/twilio + # ws_url = wss://ap-south.api.pipecat.daily.co/ws/twilio + return ws_url def generate_twiml(twiml_request: TwimlRequest) -> str: