Overview
A SIP integration connects your own voice platform to Ringg over standard SIP, with no intermediate telephony provider. You keep your carrier relationships and numbers, and Ringg supplies the AI agent that handles the conversation. The integration works in two directions, and most customers enable both:Inbound
Your switch sends an INVITE to Ringg. Ringg answers, picks the right AI agent, and runs the conversation.
Outbound
Ringg sends an INVITE to your trunk. Your platform routes the call out to the customer.
What each side provides
1. Network requirements
SIP signalling
sip.ringg.ai as the destination in your trunk configuration. Ringg shares the underlying ingress and media IP addresses with you during onboarding, for your firewall and ACL rules.
Media encryption follows the signalling transport, and is not configured separately. Connect over TLS on 5061 and the media is negotiated as SDES-SRTP (
RTP/SAVP) using the AES_CM_128_HMAC_SHA1_80 cipher suite. Connect over UDP or TCP on 5060 and the media is plain RTP.If you require encrypted media, use TLS. There is no option to run SRTP over a plaintext signalling transport.RTP media
Media is bridged on the same address as signalling.Codecs
Session timers
Ringg supports RFC 4028 session timers with a minimumSession-Expires of 1800 seconds. A shorter value is rejected with 422 Session Interval Too Small. Either raise the value on your side or omit the header.
2. How a call flows
Ringg terminates the SIP leg, bridges the audio into the AI bot engine, and runs the conversation using the agent configuration resolved from the call. If the agent decides to hand the call to a human, Ringg sends a SIP REFER back to your platform.3. Inbound: your platform to Ringg
3.1 Point your trunk at Ringg
Set the origination or termination URI on your SIP trunk to the Ringg ingress:3.2 Allowlisting
Ringg authenticates inbound calls by source IP. Send Ringg the signalling IP or CIDR your platform originates from, and it is added to the inbound ACL.Ringg accepts CIDR blocks up to
/18. Anything broader is rejected, because it would allowlist a large portion of the public internet and defeat the purpose of the ACL. If your carrier publishes a wider egress pool, send the specific ranges you actually originate from.3.3 Custom SIP headers
Ringg reads these headers from the inbound INVITE. All are optional except where your chosen routing method requires them.
Example INVITE:
3.4 Choosing which agent answers
Ringg resolves the agent in this order:Direct routing with X-Agent-ID
Direct routing with X-Agent-ID
The most explicit option. Ringg routes straight to the agent you name and skips every lookup. Use this when your platform already knows which AI agent should handle the call.
Per-user routing with X-CLIENT-ID
Per-user routing with X-CLIENT-ID
Ringg looks up a registered callee record for that user and uses the agent and variables stored against it. See section 8 for what a callee record is and how to create one.
Number-based routing
Number-based routing
With no routing headers, Ringg uses the dialled number from the To header or Request-URI and routes according to that number’s configuration in your workspace.
4. Passing context into the conversation
Context lets the agent open the call already knowing who it is speaking to, instead of asking.4.1 X-Custom-Vars
X-Custom-Vars carries an & separated list of key=value pairs:
4.2 Using the values
Every key becomes available in the agent’s system prompt and intro message as@{{key}}:
Keep values short and avoid characters that need escaping in a SIP header.
& and = are structural separators in X-Custom-Vars, so a value containing either will not parse as you expect.5. Genesys Cloud (BYOC)
Genesys Cloud BYOC trunks do not generally sendX-Custom-Vars. They carry call context in the standard RFC 7433 User-to-User header instead, and Ringg supports that natively.
5.1 The header
5.2 Encoding
A decoded payload looks like this:
5.3 What Ringg does with it
1
Read
Ringg reads every
User-to-User header on the inbound INVITE.2
Decode
The hex payload is decoded and the leading
00 discriminator is removed.3
Inject
Each decoded key becomes a conversation variable, usable as
@{{key}} exactly like X-Custom-Vars.4
Return on transfer
When the agent transfers the call, Ringg puts the UUI back on the
Refer-To URI so your platform keeps the same context on the onward leg.5.4 Keep the UUI small
6. Outbound: Ringg to your trunk
For outbound calls, Ringg originates the INVITE toward your platform from a fixed set of source addresses. Ringg provides these during onboarding, and you allow them in your inbound firewall and SIP ACL.6.1 What Ringg needs from you
6.2 Authentication modes
IP based (simplest)
IP based (simplest)
You allowlist the Ringg source addresses on your side and no credentials are exchanged. Recommended where your platform supports it.
Digest, on 401 or 407 challenge
Digest, on 401 or 407 challenge
Your platform challenges the INVITE and Ringg answers using the username and password you supply. If your platform challenges with a realm that is not its hostname, you must tell Ringg the realm, otherwise authentication fails.
SIP REGISTER
SIP REGISTER
Ringg registers to your platform on an interval using the credentials you supply, and your platform routes calls to the resulting registration. The same realm caveat applies.
If you use digest or register, send the exact realm your platform challenges with. A realm mismatch causes the registration or authentication to fail silently and retry indefinitely, with no calls connecting.
7. Call transfer with SIP REFER
When the AI agent needs to hand the call to a human or another destination, Ringg sends a SIP REFER on the existing dialog. Your platform performs the actual transfer.What your platform must support
Notes on behaviour
BYE immediately after 202 is normal
BYE immediately after 202 is normal
Many platforms send their own BYE to release the Ringg leg as soon as they accept the REFER. Ringg handles this and does not treat it as an error.
Context is preserved across the transfer
Context is preserved across the transfer
Where a UUI was received on the inbound call, Ringg re-attaches it to the
Refer-To URI so the onward leg keeps the same context. See the size guidance in section 5.4.Transport for large REFERs
Transport for large REFERs
If your transfer destinations carry large UUI payloads, prefer TCP or TLS for the trunk. UDP requests above roughly 1300 bytes are prone to fragmentation, which some networks drop.
8. Inbound callees
What an inbound callee is
An inbound callee is a record you register with Ringg ahead of time that says: when this specific person calls in, use this agent and start the conversation already knowing these facts about them. It solves a problem that headers alone cannot. If your platform cannot attach per-customer context to every INVITE, you instead upload the context once, keyed by the caller’s identifier. At call time your platform only needs to sendX-CLIENT-ID, and Ringg fills in the rest.
Each record stores:
- The
user_idthatX-CLIENT-IDis matched against, usually the caller’s number - The
agent_idthat should handle the call - Any custom variables to inject into the prompt and intro message
Records are upserted. Uploading a
user_id that already exists overwrites its configuration rather than creating a duplicate, so you can safely re-upload the full list on a schedule.https://prod-api.ringg.ai/ca/api/v0
Authenticate with your workspace API key in the X-API-KEY header. The key identifies the workspace, so you do not need to pass a workspace ID on these calls. You can generate a key from workspace settings in the dashboard.
Send
X-API-KEY on its own. Supplying both X-API-KEY and an Authorization header in the same request is rejected.8.1 Upload via CSV
8.2 Upload via JSON
8.3 Upload response
Both endpoints return the same shape:8.4 List callees
9. Troubleshooting
10. Onboarding checklist
1
Contact Ringg to start the integration
Email admin@ringg.ai requesting a SIP integration, and include the details below so the trunk can be provisioned in one pass:
- Company name and your Ringg workspace
- Direction needed: inbound, outbound, or both
- Your SIP signalling IP or CIDR, for the inbound allowlist
- For outbound, your trunk host, port, and transport (
udp,tcp, ortls) - Preferred authentication: IP based, digest, or register. For digest or register, include the username, password, and the exact realm your platform challenges with
- Whether the agent needs to transfer calls, and the destination to transfer to
- How you will pass context:
X-Custom-Vars, or theUser-to-Userheader if you are on Genesys Cloud
2
Apply your firewall rules
Point your trunk at
sip.ringg.ai, and allow the addresses Ringg provided on 5060 UDP and TCP, 5061 TLS, plus UDP 10000-60000 for RTP, in both directions.3
Decide how agents are selected
Direct with
X-Agent-ID, per user with X-CLIENT-ID and registered callees, or by dialled number.4
Decide how context is passed
X-Custom-Vars for standard trunks, or the User-to-User header for Genesys Cloud.5
Confirm transfer requirements
If the agent will hand off to a human, confirm your platform accepts REFER and agree the destination.
6
Run a test call
Place a call in each enabled direction and verify two way audio, correct agent selection, injected variables, and transfer.
