Skip to content

Connect Retell AI with SIP trunks

Last updated View as Markdown (opens in a new tab)

Send calls to a Retell AI voice agent and let it make outbound calls on your numbers.

This guide connects a Retell AI voice agent to your PBX, so it can answer calls to your number and make outbound calls with your caller ID. Retell AI needs two SIP trunks in the PBX: one for inbound calls and one for outbound calls.

For help with Retell AI itself, such as building agents, contact Retell AI.

  • Order two trunk licences and enough channels: go to Services › SIP trunking, set the number of Channels (one per simultaneous call), click Add licence twice, tick Agree to service terms and conditions and click Submit order.
  • Have a Retell AI account with at least one agent.

This trunk sends incoming calls to Retell AI.

  1. Go to the PBX tab. Drag SIP trunk from the Accept, make and divert calls group onto the canvas and click the gear icon.
  2. Enter a Name, such as “Retell inbound”, and set the Number of channels.
  3. For Mode, choose IP authentication.
  4. In SIP URI address, enter your phone number followed by Retell AI’s SIP server, for example 61XXXXXXXXX@sip.retellai.com:5060. Use the number in international format without spaces. Check Retell AI’s own SIP trunking help for its current server address.
  5. Click Save.
  6. Connect the Inbound number for that phone number to the SIP trunk. You can also connect it from a voice menu or time condition, so only some calls go to the agent.

This trunk lets Retell AI sign in to the PBX and make calls.

  1. Drag another SIP trunk onto the canvas and click the gear icon.
  2. Enter a Name, such as “Retell outbound”, and set the Number of channels.
  3. For Mode, choose SIP registration.
  4. Choose a SIP trunk call plan. Without one, outgoing calls won’t work.
  5. Choose the Caller ID for outgoing calls.
  6. Click Save, then click Apply configuration.

Open the outbound trunk’s settings again and note the SIP credentials: Domain, Username and Password. Also note the Transport protocol: TCP, or TLS if TLS encryption is turned on in Settings › General.

  1. In Retell AI, click Phone Numbers, then click + and choose Connect to your number via SIP trunking.

    Retell AI Phone Numbers page with the Connect to your number via SIP trunking option

  2. Fill in the form:

    Retell AI field Enter
    Phone Number Your phone number, the same one as in the inbound trunk’s SIP URI.
    Termination URI The outbound trunk’s Domain, including the port.
    SIP Trunk User Name The outbound trunk’s Username.
    SIP Trunk Password The outbound trunk’s Password.
    Nickname Optional.
  3. Click Save.

Connect to your number via SIP trunking form in Retell AI

You can also add the number twice: once without a username and password for inbound calls, and once with them for outbound calls.

  1. Click the number in Phone Numbers.
  2. Choose your agent under Inbound call agent for calls the PBX sends to Retell AI.
  3. Choose your agent under Outbound call agent for calls the agent makes.

Retell AI phone number settings with the Inbound call agent list open

  1. Call your number from a mobile. The Retell AI agent should answer.
  2. Start an outbound call from Retell AI to a mobile. The mobile should show the caller ID you chose.

The outbound trunk can show Offline in the PBX. That’s expected with Retell AI: outbound calls still work.

  • SIP trunk for every setting, including the No answer and Failed paths if the agent doesn’t pick up.
  • Route only after-hours calls to the agent with Time conditions.