SIP Integration with Gladly
SIP trunking is only available on the Synthflow Enterprise Plan.
This guide covers connecting Gladly to Synthflow via SIP trunk. Gladly routes inbound calls to a Synthflow AI agent through SIP forwarding; Synthflow can handle AI conversations and transfer callers to live Gladly agents when escalation is needed.
Prerequisites
Gladly Configuration
All configuration is done in the Gladly Admin panel under Settings → Voice.
Configure SIP Forwarding
Gladly Voice supports forwarding calls to external SIP destinations.
- In Gladly Admin, go to Settings → Voice → SIP Configuration.
- Under External SIP Destinations, click Add Destination.
- Configure the forwarding destination:
- Under IP Allowlist, add Synthflow’s SIP signaling IP addresses. Contact Synthflow support for the current IP list.
- Save the configuration.
Gladly uses TLS for SIP signaling. Ensure transport=tls is appended to the SIP address.
Pass Caller ID via X-Header
To pass the caller’s phone number to Synthflow for context:
- In the SIP forwarding configuration, add the following X-header to outbound INVITE requests:
X-Gladly-Caller-Id: {caller_e164}(caller’s E.164 number with+prefix)
- For routing to specific queues, add the optional routing header:
X-Gladly-Routing-Selector: {topic}(e.g.billing,support)
The X-Gladly-Caller-Id header ensures Synthflow can identify the caller and pass this context to the assistant.
Configure Inbound Routing
- In Gladly, go to Settings → Voice → Phone Numbers.
- Select the inbound phone number you want to route to Synthflow.
- Set the routing action to Forward to SIP and select the Synthflow AI destination.
- Configure a fallback action (e.g., route to agent queue) for when Synthflow is unavailable.
Configure Transfer Back to Gladly (AI → Live Agent)
To enable Synthflow to transfer a call to a Gladly agent:
- Note your Gladly SIP domain and the DID mapped to the target agent queue or topic.
- Configure Synthflow’s transfer action to route to:
{agent_queue_did}@{company}.sip.gladly.com;transport=tls
- Optionally include
?X-Gladly-Routing-Selector={topic}to route to a specific Gladly topic queue.
Synthflow Configuration
Add the SIP Number
- Go to the Synthflow Phone Numbers page.
- Click Add Number → Custom / SIP.
- Enter the phone number in E.164 format (same DID provisioned in Gladly).
- Fill in the SIP connection details:
Gladly primarily uses IP-based SIP authentication. Synthflow’s IPs must be in the Gladly allowlist for calls to be accepted.
Be precise when copying SIP credentials. Incorrect values will cause registration failure.
Attach to the Assistant
- Go to Assistants and create or select an assistant (v2.0+).
- In the assistant settings, attach the SIP number you just created.
- Wait 1–2 minutes for SIP registration to complete.
The SIP trunk is created at the moment of attaching the SIP number to the assistant.
Call Flow Summary
Verification
Quick Troubleshooting
Reference
- Gladly Voice Documentation: help.gladly.com (search “Voice SIP”)
- Gladly SIP Routing: help.gladly.com (search “SIP Forwarding”)
- Synthflow SIP Overview: docs.synthflow.ai/about-sip
- Synthflow X-EI SIP Header: docs.synthflow.ai/x-ei-sip-header