Need to intregrate with a Freepbx/Asterisk SIP Trunk

I need to integrate with a freebpx with asteriks sip trunk.

Is this possible?

Where can I find documentationt o integrate with generic sip trunk providers?

Thank you,

Antony

Yes, integrating Retell AI with FreePBX/Asterisk is possible. Retell AI supports custom telephony providers via SIP.(1)

Documentation for Generic SIP Trunk Integration

For generic SIP trunk providers, you can find comprehensive documentation at the Custom Telephony Overview.(1)

Two Integration Methods

Retell AI provides two ways to integrate with your telephony provider:(1)

1. Elastic SIP Trunking (Recommended)(1)
This is the recommended way to integrate with telephony providers that support elastic SIP trunking.(1) You’ll need to set up a SIP trunk and configure your number to point to it, then import that number to Retell.(1)

2. Dial to SIP URI(1)
If your telephony provider doesn’t support elastic SIP trunking, or you have more complicated telephony setup, you can dial the call to a specific SIP URI.(1)

Retell SIP Server Details

  • Retell SIP server URI: sip:sip.retellai.com(1)
  • IP block for traffic: 18.98.16.120/30 (All regions), 143.223.88.0/21 (certain United States traffic), 161.115.160.0/19 (certain United States traffic)(1)

Transport Methods Supported

For different transport methods for inbound calls:(1)

  • For TCP: sip:sip.retellai.com;transport=tcp(1)
  • For UDP: sip:sip.retellai.com;transport=udp(1)
  • For TLS: sip:sip.retellai.com;transport=tls(1)

Media Encryption

SRTP is supported (Transport should be set to TLS to use SRTP).(1)

Additional Resources

The documentation also provides detailed guides for specific telephony providers like Twilio, Telnyx, and Vonage, which you can use as references for your FreePBX/Asterisk setup.(1)

Unfortunately I couldnt find the documentation for my freepbx/asterisk setup.
Please provide me the documentation to setup a custom sip trunk with another provider.

Here’s the step-by-step documentation for setting up a custom SIP trunk with Retell AI using Elastic SIP Trunking (the recommended method):

Step 1: Create Elastic SIP Trunking in Your Provider

You’ll need to create a SIP trunk in your telephony provider (FreePBX/Asterisk).(1)

Configure Termination (Outbound Calls)

Specify the termination SIP URI.(2) For authentication, you can choose between:(2)

  • IP whitelisting: Whitelist Retell’s IP ranges: 18.98.16.120/30 (All regions), 143.223.88.0/21, 161.115.160.0/19(1)
  • Credentials: Set up a username and password(2)

Configure Origination (Inbound Calls)

Set Retell AI’s SIP server address as the origination SIP URI: sip:sip.retellai.com(1)

For transport protocol, you can specify:(1)

  • TCP: sip:sip.retellai.com;transport=tcp(1)
  • UDP: sip:sip.retellai.com;transport=udp(1)
  • TLS: sip:sip.retellai.com;transport=tls(1)

Step 2: Assign Numbers to the SIP Trunk

Purchase new numbers or migrate existing ones to the configured SIP trunk within your telephony provider’s platform.(3)

Step 3: Import Numbers into Retell AI

You can import numbers via the Retell AI dashboard or programmatically using the Import Number API.(2)(4)

When importing, you’ll need to provide:(2)

  • phone_number: The number in E.164 format (e.g., "+14157774444")(2)
  • termination_uri: The termination URI to uniquely identify your elastic SIP trunk (e.g., "someuri.pstn.twilio.com")(2)
  • sip_trunk_auth_username: The username for authentication(2)
  • sip_trunk_auth_password: The password for authentication(2)
  • inbound_agent_id: Agent ID for inbound calls(2)
  • outbound_agent_id: Agent ID for outbound calls(2)

Step 4: Configure Voice Agents

Within the Retell AI dashboard, create and customize AI voice agents according to your requirements.(3) Assign the imported phone numbers to the corresponding voice agents to handle inbound and outbound calls.(3)

Reference Example: Telnyx Setup

While there’s no FreePBX-specific guide, you can reference the Telnyx integration guide as it follows the same elastic SIP trunking pattern.(4)

**