Five9
Integrate with the Five9 multi-tenant SIP trunk for call routing and management.
Integrating PolyAI with Five9 enables advanced call handling, routing, and handoff to live agents when required. This guide explains setup procedures, routing methods, and best practices for transferring calls between PolyAI and Five9.
1: Integrate with the shared Five9 and PolyAI SIP trunk
Five9 uses a multi-tenant SIP trunk to connect with PolyAI. Contact your Five9 account manager to configure your environment to connect to this SIP trunk and route calls to PolyAI.
2: Five9 to PolyAI routing methods
PolyAI provides an authentication token included in the SIP INVITE message under the X-header (X-PolyAi-Auth-Token
). This token identifies and distinguishes traffic for accurate agent routing.
PolyAI provides an authentication token included in the SIP INVITE message under the X-header (X-PolyAi-Auth-Token
). This token identifies and distinguishes traffic for accurate agent routing.
Five9 and PolyAI agree on unique extension numbers for routing calls. This method offers flexibility and scalability, especially for clients managing multiple PolyAI agents.
3: PolyAI to Five9 transfer methods
When PolyAI is unable to contain a call, it sends a SIP BYE message with custom headers to indicate the status of the call. This method is simple and suitable for scenarios with limited metadata requirements.
Key headers include:
X-contained
: Indicates whether the call was contained by PolyAI. (true
orfalse
)X-destination
: Specifies where to transfer the call if it was not contained. Values are determined during deployment.
When PolyAI is unable to contain a call, it sends a SIP BYE message with custom headers to indicate the status of the call. This method is simple and suitable for scenarios with limited metadata requirements.
Key headers include:
X-contained
: Indicates whether the call was contained by PolyAI. (true
orfalse
)X-destination
: Specifies where to transfer the call if it was not contained. Values are determined during deployment.
For cases requiring detailed metadata, PolyAI provides a Handoff API to return larger data payloads. This method involves:
- PolyAI sends a SIP BYE message to Five9 to indicate the agent call leg is complete.
- Five9 uses scripting to call the PolyAI Handoff API, using the Five9 session ID as the
shared_id
parameter to retrieve data. - The API response includes:
contained
: Indicates whether the call was contained. (true
orfalse
)destination
: Specifies the transfer destination if the call was not contained.
Benefits:
- No size limit on the API response, enabling detailed metadata transfer.
- Flexible for advanced routing decisions.
Considerations:
- Ensure error handling in the Five9 scripting to manage API response issues.
Example API integration
For support, contact PolyAI at platform-support@poly-ai.com.