joaquincorrales
07/30/2025, 5:37 PMAI Evy
07/30/2025, 5:37 PMAI Evy
07/30/2025, 5:37 PMwss:// prefix for secure WebSocket connections
- HTTP Endpoints: Use ws:// prefix for standard WebSocket connections
Step 3: Check for Trailing Slash
Some server setups might not allow a trailing slash in the URL :
- Correct Format: `
- Incorrect Format (sometimes) : `
Step 4: Check for Retell Server Response
Add logging to verify your websocket is receiving data from Retell :
- Add logging in your websocket code to see if the websocket is connected
- Add logging in your websocket message code to check if you receive the message from Retell server
If your call disconnects after a couple seconds, check if your server setup supports WebSocket - for example, Vercel edge functions and serverless functions cannot act as a websocket server .AI Evy
07/30/2025, 5:37 PMAI Evy
07/30/2025, 5:37 PMjoaquincorrales
07/30/2025, 5:38 PMjoaquincorrales
07/30/2025, 5:39 PMAI Evy
07/30/2025, 5:39 PMAI Evy
07/30/2025, 5:39 PMAI Evy
07/30/2025, 5:39 PMAI Evy
07/30/2025, 5:39 PMjoaquincorrales
07/30/2025, 5:48 PMAI Evy
07/30/2025, 5:48 PMAI Evy
07/30/2025, 5:48 PMAI Evy
07/30/2025, 5:48 PMAI Evy
07/30/2025, 5:48 PMjoaquincorrales
07/30/2025, 5:49 PMAI Evy
07/30/2025, 5:49 PMAI Evy
07/30/2025, 5:49 PMsip:5t4n6j0wnrl.sip.livekit.cloud
Step 2: Move Numbers to Elastic SIP Trunking
Move your existing Twilio numbers to the elastic SIP trunk you created .
Step 3: Import Numbers to Retell
Import the number to Retell using the termination SIP URI from Step 1 . You can do this through the dashboard or programmatically using the Import Number API [(2) ]() .
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.import({
phone_number: '+14157774444',
termination_uri: 'someuri.pstn.twilio.com',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
Once imported, the number will show up in your Retell dashboard and you can make and receive calls just like numbers purchased directly from Retell [(1) ]() .
## Alternative Options
You can also port your existing numbers to Twilio and then use them with Retell [(3) ]() . Additionally, call forwarding from your existing number to a Retell/Twilio number is another indirect option .AI Evy
07/30/2025, 5:49 PMAI Evy
07/30/2025, 5:49 PM