BYOC setups use shared SIP Trunks, so PolyAI connects using a preconfigured multi-tenant trunk with shared IPs and settings.
PolyAI configuration
-
Get connection tokens:
- PolyAI will provide you with two tokens:
- A UAT Token to use for testing.
- A Production Token to use for live deployment.
- Use these tokens to authenticate your SIP trunks with PolyAI.
- PolyAI will provide you with two tokens:
-
Enable Handoff API:
- If screen pop is required, make sure you have configured your project to meet the standards of the Handoff API.
- Request an API key from PolyAI for this functionality.
-
Prepare for SIP INVITE data:
- Your Genesys SIP INVITE will include:
x-inin-cnv
: the Genesys Conversation ID.X-User-to-User
: Custom data in the formatX-User-to-User:{data};encoding=ascii
.
- Your Genesys SIP INVITE will include:
-
Send data during SIP REFER:
-
To return data to Genesys, use this format in the SIP REFER message:
Refer-To: <sip:{route}@{ip}?User-to-User={pd}{data}%3Bencoding%3Dhex>
- Replace
{pd}
with the protocol discriminator (two hex digits). - Replace
{data}
with the hex-encoded information.
- Replace
-
To return data to Genesys, use this format in the SIP REFER message:
Genesys trunk setup
Prerequisites
- PolyAI tokens: You should have both UAT and Production tokens provided by PolyAI.
- Admin access: Ensure your Genesys account has permissions to manage external SIP trunks.
Configure the primary trunk
To configure a SIP trunk with Genesys Cloud, follow these steps.Configuration steps for the US region:
- Go to
Telephony > Trunks > External Trunks
in Genesys Cloud. - Create a new SIP trunk:
- Type: BYOC Carrier
- Subtype: Generic BYOC Carrier
- Protocol: TLS
- SIP server:
kam.us-1.polyai.app
, Port:5061
- Allow IP:
3.221.248.55
- Media settings: Codec
audio/PCMU
- UUI passthrough:
- Protocol:
X-User-to-User
- Encoding:
Ascii
- Protocol:
- Custom SIP headers:
- Header:
X-PolyAi-Auth-Token
- Value: Use the token provided by PolyAI.
- Header:
Create the secondary trunk
Repeat the above steps with the secondary PolyAI server and IP for your region:- US:
kam2.us-1.polyai.app
,35.170.209.49
.
Set failover routing
- Go to Site > Edit Site > Outbound Routes in Genesys Cloud.
- Set the distribution pattern to Sequential to enable failover from the primary trunk to the secondary trunk.