Hi Carlos Sosa,
The timeout error log from your Twilio Function indicates this error
ServiceBusError: ETIMEDOUT: connect ETIMEDOUT 20.62.63.31:5671
This means the function was unable to establish a TCP connection to the Azure Service Bus IP address on port 5671 (the AMQP port) within the configured timeout.
- Your Function App is running inside Azure network, which should typically have good outbound connectivity.
- However, frequent connection timeouts (e.g., failing 3 out of 5 connections) usually indicate network reachability or firewall issues, or port blocking.
- Port 5671 (AMQP) must be open outbound for the Azure Service Bus SDK to connect.
- The error is a kernel-level TCP timeout (ETIMEDOUT) before establishing any SSL or AMQP communication.
- This could be intermittent due to:
- Network Security Groups (NSGs) or Azure Firewall rules restricting outbound TCP on port 5671 intermittently.
Reference
Service Bus, Event Hubs, and Web Sockets | Microsoft Community Hub
Troubleshooting guide for Azure Service Bus - Azure Service Bus | Microsoft Learn
ServiceBusClientOptions interface | Microsoft Learn
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Upvote" if the information helped you. This will help us and others in the community as well.
Thanks