Custom SIP

Integrate your Regal AI phone agents into another telephony provider

In this guide, we will show you how to integrate Regal AI agents with other telephony or call tracking providers, using their numbers in a way that's seamless for your customers.

Regal has native telephony (leveraging Twilio) so there is no need to have custom telephony. But this guide is for customers who want to continue using a separate telephony provider to initiate calls that are handled by Regal's AI agents.

📘

If you would like use your telephony platform, please send your CCaaS provider an email with these instructions

I would like to set up a SIP Trunk with Regal. Here are the instructions they sent me.

  1. Regal uses Twilio for SIP, and we will set up a unique url for your SIP calls. Please email [email protected] if you have not yet received yours.
  2. Send Regal ([email protected]) your SIP FQDN/IPs.
  3. Allow access from Twilio’s North America IPs listed here.
  4. Set up a SIP REFER to the url we give you in formal [custom domain].sip.twilio.com. If SIP REFER is not available, then use SIP INVITE (this will leave Regal on the SIP).
  5. Please make sure Custom SIP X- headers are on in both directions (some CCaaS require this to be turned on separately). We use this to pass context to/from the AI agent.

Use Case 1: You have an existing telephony provider with phone numbers that your customers are familiar with, and you want to let customers call into those but have one of your Regal AI phone agents handle the call.

Use Case 2: You want your Regal AI phone agents to be able to transfer calls back to your human agents in your telephony provider.

Why use SIP transfers instead of PSTN transfers?

SIP is a widely used protocol because it’s flexible—it can route calls over the internet, between VoIP systems, or even connect to the traditional phone network (PSTN) via SIP trunks.

It also allows you to share metadata about the call between Regal and your telephony provider.

For example, perhaps your Regal AI agent needs to know what source a lead was acquired from. SIP transfers allow that metadata to be sent along with the call in custom headers (X-headers) to Regal, so that you can route appropriately or present the right data to your AI agents to personalize the conversation.

And perhaps after your Regal agent qualifies the lead, you want to transfer the call back to a licensed agent in your telephony provider, and both preserve the lead source as well as enrich the transfer call with context about the customer collected by the AI agent, such as the customer's zip code. Again, you can add SIP headers on the way back with that data so that you can route appropriately, present the right data to your human agents in their "screen pops", and conduct attribution analytics.

🚧

Twilio Limitation

Twilio does not support SIP transfers between accounts that aren’t owned by the same parent organization.

👉 Regal natively supports both Twilio application transfers (recommended) or PSTN transfers for Twilio-based clients.

Sending a SIP call to Regal

Your telephony provider likely provides you with two options to send SIP calls to Regal:

  1. SIP trunking: In your telephony provider, you will need to set up a SIP trunk and configure your number to point to it.
  2. Dial to SIP Endpoint: If your telephony provider supports dialing SIP endpoints, you can directly dial Regal's SIP endpoint.

Regal will provide a unique SIP domain for you to point to/dial. It will look something like sip:<SIP URI>.sip.twilio.com

In order for Regal to configure a SIP domain for you, you need to provide the following information to Regal:

  • What is your preferred Authentication type? IP or Credentials If IP, please provide the IP addresses or ranges we should allow
  • Secure Real-Time Transport Protocol (SRTP) - Will incoming SIP calls encrypt media with SRTP? Yes or No
  • Your telephony provider may also require you to whitelist Regal's IP address range to send SIP calls to Regal:

Signaling IPs Port 5060 (UDP/TCP), 5061 (TLS)
North America Virginia

  • 54.172.60.0
  • 54.172.60.1
  • 54.172.60.2
  • 54.172.60.3

Custom SIP Headers

You can configure custom SIP headers to send to Regal on your SIP calls from your telephony provider. Reach out to your telephony provider directly if you need support in doing this.

Receiving a SIP call from Regal

Regal offers 2 options to send SIP calls back to your telephony provider, in case for example, you have human agents in your CCaaS that you want to receive transfers from Regal AI agents.

  1. Cold SIP Transfer (SIP Refer/SIP Invite): With a cold SIP transfer, the AI agent leaves the call as soon as the transfer connects to your CCaaS. The recording in Regal also stops at that point. Use the native "External Transfer" action in your AI agent to invoke a cold transfer.
  2. Warm SIP Transfer (SIP Invite): With a warm SIP transfer, the AI agent puts the customer on hold, but stays on the call until your human agent answers the call. The AI agent then delivers a summary of what happened on the call to your human agent ("warm handoff"), and then takes the customer off hold and leaves the call, at which point the recording in Regal stops (if needed, Regal can continue recording).
🚧

Cold Transfers Configuration:

Note, the following CCaaS providers do not currently support SIP Refer natively, and will require a SIP Invite for cold transfers.

  • NiCE Contact Center
  • Five9

Warm Transfers

To achieve a Warm SIP Transfer, you'll need to:

a. Create 2 custom actions:

b. Prompt your agent on when to invoke each action, and how to deliver the summary e.g.,

Goal: When the licensed advisor joins, provide a concise recap so they know what’s been discussed.

Continuously listen until you detect a clear and spoken greeting from the advisor (e.g. “hi, this is Jane…” or “hello, I’m speaking with…”).
Examples of acceptable greetings:
-"This is Jane from company X."
-"Hi, it's Andy with company X."

Ignore messages that tell you to wait, and listen for a person. As soon as it seems that someone is trying to communicate with you move to step 3.

As soon as you hear their introduction, say:
“Hi, my name is Jenny, and I'm a virtual agent at X. I have [customer first name] on hold. Here’s what we covered: [provide a summary]. Can I connect you now?”

If the advisor says yes / okay / ready, then call function end_warm_transfer.

Create Transfer Phone Book Entry w/ SIP URI and SIP Headers

For both cold and warm SIP Transfer options, you'll also need to create and configure a new external transfer number in Settings > External Transfer Phonebook, and:

  1. Select SIP as the external integration
  2. Add a placeholder phone number (it doesn't matter what this is)
  3. Enter the target SIP URI that should receive the transfer (target SIP URI must be under 255 characters)
  4. Configure your custom SIP headers

An Alternative to SIP: Cold PSTN Transfer w/ HTTPS request

This is a 3rd option that does not leverage SIP, but does achieve something similar by paring a PSTN transfer with an HTTPS request to send metadata parameters back right before the call. Regal will transfer the call back to your telephony provider using a PSTN phone number, but just prior to the transfer, we will also post an HTTPS request to your telephony provider with the call parameters you configure. This option exists because some telephony/call tracking providers (e.g., Ringba) do not support SIP refer. To configure this option, in the Settings > External Transfer Phonebook in Regal, create a new external transfer number, and:

  1. Select the external integration provider (e.g., Ringba)
  2. Add the phone number you want to transfer calls to
  3. Add any other inputs requested (e.g., for Ringba, we require your Ringba External Id)
  4. Configure your custom parameters

Configuring Custom SIP Headers/Parameters in Regal

Regal allows you to define custom SIP Headers (for SIP refer transfers) or custom parameters (for PSTN/HTTPs transfers) to include on your transfers out of Regal.

You can add SIP headers/parameters from:

  • contact attributes - data from the contact's profile that your Regal AI agent collects in the course of the call such as first name, last name, zip code, etc. depending on whatever information you have the agent ask for. These are prefixed with contact.
  • incoming sip headers - any of the incoming SIP headers Regal received from your SIP call in (e.g., Call-Id), can also be sent back on the transfer out. These are prefixed with sip.
  • hard coded values - you can hard code static values
Configuring Outgoing SIP Headers

Configuring Outgoing SIP Headers

FAQ

Where can I view the SIP headers I sent to Regal?

Open the Tasks page, find your call task, and click on it. The incoming SIP headers appear in the incomingSipHeaders object in the Task Attributes section. Expand the object to see each header.

Where can I view the SIP headers Regal sent to me?

You can view them in the telephony system that receives the call. A Regal forward deployed engineer can also help you debug if needed.

Are there any limits on the SIP headers I can send to Regal?

All incoming custom headers on a call must total under 1,024 characters.

Are there any limits on the SIP headers Regal can send to me?

All outgoing custom headers on a call must total under 1,024 characters. The target SIP URI must be under 255 characters.

Does Regal support SIP TLS (Transport Layer Security)?

Yes. We recommend TLS on port 5061 with SRTP to encrypt media. Let us know when we set up your SIP domain.

Does Regal have a single static IP address we can allowlist?

We use a range of IP addresses to support failover, which is best practice. Allowlist both regions.

Signaling ports: 5060 (UDP/TCP), 5061 (TLS)

North America – Virginia
54.172.60.0
54.172.60.1
54.172.60.2
54.172.60.3

North America – Oregon
54.244.51.0
54.244.51.1
54.244.51.2
54.244.51.3

Can I use a SIP integration for human agents in Regal, or only AI agents?

Both. A SIP integration can send calls to Regal and receive transfers back from Regal, whether the call is handled by an AI agent or a human agent in Regal.

Can my telephony provider record the entire call?

Yes. Your telephony provider should be able to record through SIP transfers. If your test calls show otherwise, contact your telephony provider.

Can Regal record the entire call?

Regal records everything while it's connected to the call. With a SIP REFER transfer, your telephony provider removes Regal's leg and starts a new call to the transfer recipient, so Regal can't keep recording.

If Regal instead transfers by adding a new call leg (to a SIP domain or a phone number) to the existing call, Regal can keep recording. Which option you use depends on what your telephony provider supports.


Did this page help you?