https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi retell team, has anyone configured secure trunk...
# ❓・ai-evy-support
a
@AI Evy
a
Thanks for tagging me @ayazmomin.. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Twilio Secure Trunking Prevents Calls](https://discord.com/channels/1186424376300679209/1368909691211747419) [[2] Custom Telephony Overview](https://docs.retellai.com/deploy/custom-telephony) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer To configure secure trunking with Twilio and Retell AI, you need to ensure that TLS transport is enabled in both Twilio and your SIP setup. Specifically, in Twilio’s SIP Domain, you should use the format sips:yourdomain.pstn.twilio.com:5061 and allow port 5061 in your firewall rules. This enables secure (TLS) signaling. Additionally, testing TLS connectivity can be done using the command:
Copy code
openssl s_client -connect yourdomain.pstn.twilio.com:5061
[(1) ]() Retell’s SIP server supports TLS as a transport method [(2) ]() . If you’re seeing a 488 error, it often indicates a codec or transport negotiation issue—double-check that both ends are set to use TLS (not UDP) and that your firewall allows the required ports. If secure trunking is required for compliance (like HIPAA) , both TLS and SRTP should be enabled , [(1) ]() . If you still have issues, verify all settings in your Twilio SIP trunk and Retell import configuration to ensure they match.
Thanks for the feedback, glad I was helpful.
a
Sip domain configuration with port 5061 on twilio? If so, Twilio doesn’t have that option to define as such
a
Thanks for the follow-up, @ayazmomin.. I'll get back to you soon.
### Answer According to the available sources, Retell AI primarily operates SIP connections over TCP port 5060. Support for TCP port 5061 (commonly used for secure SIP/TLS traffic) is not officially documented as supported for SIP domain configuration with Twilio. If you need to use TCP port 5061, there is no official configuration guidance or confirmation of support in the public documentation. You may need to check with the Retell AI team for any custom configuration options [(1) ]() .
​ To learn more, see the sources I considered: [[1] TCP port 5061](https://discord.com/channels/1186424376300679209/1350848274780655836) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
I need encryption and tls with twilio setup for outbound and inbound
c
at the end of the sip domain put ;transport=tls
a
On retell? Or twilio ?
When setting up custom sip trunking in twilio, it’s asking for termination URL. I tried add there above and didn’t work
Inbound and outbound both fail
@Colin - Integrations @ Retell AI
c
please follow our sip trunking guide exactly
a
@Colin - Integrations @ Retell AI Is this the guide? https://docs.retellai.com/deploy/twilio
c
yes
a
That guide doesn’t have instructions for secure trunking.
The guide provided works without secure trunking as expected. I am trying to enable secure trunking with tls
w
@ayazmomin. did you get an answer for this? I am unable to get Twilio "Secure Trunking" working either.