Genesys Cloud integration with SIP external IVR
In the last days I have had the opportunity to experiment a bit with the Genesys Cloud platform and I decided to write a couple of articles on integration with external systems, in particular on the possibility of transferring call to an external IVR and then resuming it on the Genesys flow, but also on chat integration capabilities. The purpose of this first article is to describe how to handle the first case, transferring a call from a Genesys flow to an external IVR.
Let’s start with a few words about what Genesys Cloud is. We are talking about a cloud-based contact center platform that offers a set of tools to manage customer interactions efficiently and effectively. With Genesys Cloud you can manage incoming and outgoing calls, messages, emails and social media interactions, all from one centralized platform. More info available on genesys website, where you can find all the information and official documentation, which obviously I do not want to replace in any way.
Use Case
A possible scenario wuold be if you need to connect your Genesys Cloud environment with an external IVR, and allow calls to be transferred from an Architect flow to the IVR. In this case a user connected with a Genesys call flow can be transferred to your external IVR.
So, let’s get started and see how to configure Genesys to allow call forwarding to our IVR.
Configure a SIP Trunk with the external IVR
Before proceeding with the Trunk configuration we need to know a series of information relating to our IVR, but also about the Genesys Cloud environment.
Information about your external SIP device
- SIP Server address (IP o FQDN): is your SIP IVR address
- Transport protocol
- DNIS: is the external device espected destination number, it will be the user-part of Request-URI SIP
- Codec audio supported by the IVR
- IP addresses required to define the Access Control List on Genesys BYOC SIP trunk
Information needed from Genesys
In the presence of filters on IP addresses you should know the list of possible IP addresses used by Genesys Cloud, both for the SIP part and for the audio part.
- SIP: https://help.mypurecloud.com/articles/byoc-cloud-public-sip-ip-addresses/
- Media: https://help.mypurecloud.com/articles/ip-addresses-for-the-firewall-allowlist/
BYOC SIP Cloud Trunk configuration
From Genesys Cloud console, in Admin select Trunks in Telephony and click Create New.
Let’s start entering the data required for configuring the Trunk.
- Assign a Trunk name
- Select BYOC Carrier as Type, and Generic BYOC Carrier as sub-type
- Select the transport protocol for the SIP trunk
- Select Pure Cloud default as Number Plan Site
- In Inbound SIP Termination Identifier enter an unique ID: this is a mandatory parameter needed to uniquely identify the trunk in the case of inbound SIP calls, but is not used in the outbound transfer scenario
- In Outbound SIP DNIS enter the Destination Number where transfer the call, it will be the user-part of the SIP Request-URI
- In SIP Servers or Proxies enter the IP address (or IP addresses if more than one) for the external IVR
- Configure the IP address (or IP addresses) used by the external IVR, in order to enable them in the white list
Let’s continue with the configuration by entering the final details.
- In the General section we can configure the limits of concurrent calls and call rates
- In the Identity section disable Address Omit + Prefix for Calling and Called in order to preserve the prefix + on the To and From headers
- In the Media section we can configure the audio codecs supported by the IVR
- In the Protocol section we have to enable Conversation Headers (the ConversationId will be included in the INVITE as a Custom Header), enable UUI Passthrough (the User-to-User Header is used to send data from Genesys Cloud to the IVR), enable Take Back and Transfer (it allows to activate the backward transfer from the IVR to the Genesys flow using SIP REFER method)
Outbound Route configuration
Now that we have created a new BYOC Cloud SIP trunk, we need to ensure that this trunk can be selected when transferring to specific numbers within your flow. So, we must create an outbound rule for the specific SIP external trunk and associate a number plan with it.
From Genesys Cloud console, in Admin select Sites in Telephony, and select the site where to add the created SIP Trunk.
- Open tab Numbers Plans and create a new Number Plan
- Open tab Outbound Routes and create a new Outbound Route, select the Trunk and the Number Plan
Edit the Architect Flow adding a Transfer action
At this point we have everything necessary to be able to transfer the call from a Genesys Cloud Archtect flow to an external IVR. All we need to do is modify the flow by adding a Transfer to Number action and configuring a destination number belonging to the Number Plan that we previously created and assigned to the Ountbound Route connected to the specific Trunk.
On the transfer action, the call will be transferred from the Genesys Flow Architect to the external IVR, which will receive a SIP INVITE on the Request URI configured in the BYOC Trunk.
Looking at the INVITE we will see the User-to-User Header and the ConversationId inserted in x-inin-cnv
INVITE sip:xxxxxxxxxxxxxxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyy:5060 SIP/2.0
Record-Route: <sip:18.184.11.49:5060;r2=on;transport=udp;ftag=4Uwqu-I;lr>
Record-Route: <sip:10.72.14.171:5060;r2=on;transport=udp;ftag=4Uwqu-I;lr>
To: "ShortNumberToPMB" <sip:200221@yyyyyyyyyyyyyyy>
From: "Roberto Lucchetti" <sip:zzzzzzzzzzzzz@18.184.11.49>;tag=4Uwqu-I
Call-ID: f6e43cfb-4d57-4f2f-bccf-b8e16f3a36af
Via: SIP/2.0/UDP 18.184.11.49:5060;branch=z9hG4bK223.54c3fff1.0
Via: SIP/2.0/UDP 10.72.236.193:6060;branch=z9hG4bK223.b4836df5.0;i=0ba132c4
CSeq: 1 INVITE
Max-Forwards: 68
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER
Supported: norefersub, timer
Accept: application/sdp
Contact: <sip:zzzzzzzzzzzzz@10.72.236.193:6060;did=be2.aac6cdf>
x-inin-cnv: 3e8482fb-f9c1-4ba5-9a5d-282ca6ef660b
User-to-User: 00;encoding=hex;purpose=isdn-uui;content=isdn-uui
Content-Type: application/sdp
User-Agent: GENESYS-SIPSERVICE/1.0.0.7390
Content-Length: 271