Cisco UCCE/PCCE and Mindful integration guide (SIP header metadata)
Integrate Cisco UCCE/PCCE with Mindful services while using SIP headers to pass metadata.
The Mindful integration with Cisco UCCE/PCCE uses reliable SIP-based communication without the need for custom development. The example integration presented in this guide allows the UCCE/PCCE platform to offer callbacks to customers and only send calls to Mindful when an offer is accepted. Making the offer in the Cisco environment is the recommended best practice for this integration.
This integration also uses Mindful Datastore to provide a repository for Cisco Peripheral Variables (PV) and Expanded Call Context (ECC) variables that can be accessed by Intelligent Contact Management (ICM) scripts and Mindful.
In this guide, we present configuration requirements for the following processes and components:
Configuring DIDs for the contact center and high-priority holding queue
Routing calls via ICM scripts
Establishing an offer threshold in UCCE/PCCE based on the wait time
Providing a callback offer on the UCCE/PCCE platform
Retaining user data between Mindful and UCCE/PCCE via SIP headers
For further validation against additional integration options, contact a Mindful representative.
This article is not intended as a configuration guide for a Cisco UCCE/PCCE environment. For help with UCCE/PCCE deployments and configuration, consult the official Cisco documentation.
Are you looking to use Mindful Datastore rather than SIP headers to pass user data? See the Datastore version of this guide.
UCCE 12.1 was used to validate the integration.
The configuration in this guide is an example and may be used as a template for integrating with Mindful. Any sample code in this guide should not be considered ready for production.
Overview
This integration guide covers the following topics.
- Definitions and acronyms
- Architecture and call flow
- Mindful configuration
- SBC configuration
- UCCE/PCCE configuration
- Optional enhancements
Definitions and acronyms
Term | Definition |
---|---|
DN | Dialed number |
CUCM | Cisco Unified Communications Manager (CUCM) provides call control and session management features. Using CUCM is optional for the integration. |
ECC | Expanded Call Context (ECC) variables are used by ICM to store and preserve contextual call data. |
Architecture and call flow
Mindful component | Description |
---|---|
SIP Proxies | Send and receive SIP messaging |
RTP Proxies | Establish and maintain RTP streams |
Callback application | Tracks callbacks and system configuration in the Mindful environment |
Cisco component | Description |
---|---|
SBCE | Avaya Session Border Controller for Enterprise was used in the Mindful lab to validate the integration. |
VXML Gateway / CUBE | Cisco Unified Border Element (CUBE) provides several features of a session border controller (SBC). |
ICM | Intelligent Contact Management (ICM) provides scripting and routing features in the UCCE/PCCE environment. |
CVP | Customer Voice Portal (CVP) provides the main call routing features used in this integration. |
Call flow diagram
Mindful Call Targets use a complete phone number for the inbound call transfer. Each Call Target represents a queue/skill/group, such as Sales or Billing.
Configure the Mindful platform
Before your ACD can send inbound calls to Mindful, there are a few settings that must be adjusted to integrate with your ACD:
Registration
Callback > Call Targets > Your Call Target > General tab > Registration
- Offer ASAP Callback — Select this checkbox to offer callbacks to be returned as soon as possible.
- Offer Scheduled Callback — Select one or both of these checkboxes (Voice and/or Widget/API) if you wish to offer callback scheduling for specific dates and times.
Contact Center
Voice > Call Targets > Your Call Target > General tab > Contact Center
- Callback Telephony Type — Select "SIP".
- Callback Number — This will be configured in a later step.
Callback Strategy
Voice > Call Targets > Your Call Target > General tab > Callback Strategy
Most of the Callback Strategy settings are not relevant to the integration, and they can be set however you would like. However, there is one notable exception when using the Customer First Callback Strategy.
When using Customer First, enable Wait for live Agent. This will prompt agents to press a digit to accept a callback, which provides an Agent Answer event to Mindful. The Agent Answer events assist in calculating an accurate Estimated Callback Time (ECBT).
Phone Numbers
Configuration > Phone Numbers
On the Phone Numbers page, provision as many SIP numbers as needed and assign a number to each Call Target in your Organization. This is the number to use when configuring the SIP endpoint to which to send inbound calls for callback treatment.
Configure your SBC
Mindful integrations can function with different Session Border Controllers (SBC) regardless of the ACD platform used in your environment.
See our SBC integration guides for instructions on integrating your chosen SBC.
Configure UCCE/PCCE
To complete the configuration of your UCCE/PCCE environment, you will need to configure the following items:
- Dialed Number Pattern
- Cisco SIP Proxy
- Expected SIP headers
- ECC variables
- ICM scripts
Configure the Cisco environment using a SIP proxy and SBC
The following configuration is necessary to ensure that calls are allowed to leave the Cisco environment via the Cisco SIP proxy and SBC. Two tasks are required to accomplish this:
Create a new Dialed Number Pattern to manage outbound calls.
Update the configuration for allowable SIP headers in Call Server settings.
Our example integration uses a Cisco 3900E ISR as the SIP proxy.
If no Cisco SIP proxy or other SIP edge device is available in your environment, you can use CUCM to send calls via a third-party SIP device. Using CUCM is necessary in this case because UCCE/PCCE does not allow third-party SIP proxies or SBCs to be added as route targets.
If Mindful uses Twilio trunks to receive inbound calls (the default configuration), then the ANI of the call sent from the ACD to Mindful must be in E.164 format. The ANI must be prefaced with +1. If a custom range of DNs is used instead, E.164 format is not required.
Configure a new Dialed Number Pattern in CVP
CCE Management interface > Call Settings > Route Settings > Routing Pattern
Create a Dialed Number Pattern to identify calls coming from CVP that are 11 digits long and begin with 1. The pattern should send the identified calls to the SIP proxy. The following image shows how this is configured in our example integration.
Configure the Cisco SIP proxy for outbound calls to the SBC
Create a dial peer on the Cisco SIP Proxy to send calls from CVP that match a specific number pattern out to the SBC. In our example, we configured the SIP proxy to catch numbers beginning with 1 that are 11-digits long. Use the following example as a guide to create the dial peer.
dial-peer voice 1 voip
destination-pattern 1.........
session protocol sipv2
session target ipv4:10.100.70.31:5060
session transport udp
incoming called-number 1.........
voice-class codec 12
voice-class sip early-offer forced
voice-class sip pass-thru headers unsupp
voice-class sip referto-passing
dtmf-relay rtp-nte
no supplementary-service sip refer
destination-pattern —
1.........
(10 digits total)session target — Use the IP address of the SBC's internal signaling interface.
dtmf-relay —
rtp-nte
This allows RFC2833 DTMF
voice-class sip pass-thru headers —
unsupp
This is very important. A value of
unsupp
allows custom SIP headers to be passed through the SIP proxy. Without it, SIP headers would be stripped from the signal before the next leg of the call.
Define the expected SIP headers in CVP Call Server
Before SIP headers can be captured by CVP and provided to ICM scripts, you must first define the expected SIP headers in CVP Call Server (CVP OAMP interface > Device Manager > Unified CVP Call Server).
All Call Servers in the list must be modified to match the same SIP header configuration. For each SIP header that you expect to send and receive, first click the SIP tab, then configure the headers in the SIP Header Passing section.
We included three SIP headers in our example configuration (first name, last name, and account number), but you can define any SIP headers needed in your integration the same way.
Example SIP headers:
- X-cisco-first-name
- X-cisco-last-name
- X-cisco-acc-num
Configure ECC variables
The data received from the expected SIP headers must be placed into corresponding ECC variables, so the next step is to define the ECC variables that will be used. These variables will also be used to display user data in Finesse.
Use the following image as a guide to configure your ECC variables.
In our example configuration, we defined the following three ECC variables to correspond to our expected SIP headers.
- user.acc_num
- user.first_name
- user.last_name
The Max Length field for each ECC variable was configured according to the needs of our example integration, but you may find that higher or lower Max Length values are needed in your environment.
In addition to the expected SIP headers, you will also need to define ECC variables to facilitate the request to the Mindful Agent Answer API that will be made in the callback-return ICM script in a later step.
At minimum, two ECC’s or an ECC (API key) and a PV (ANI) will be needed for the Agent Answer API. The first is for the API key needed for authentication, and the second strips the plus (+) from the the Calling.LineID variable in routing.
Create a new Agent Team List
In order to not affect agents that will not be servicing callbacks, create a new Agent Team List in Configuration Manager to apply workflow logic.
In the "Agent Team List" section of Configuration Manager (Tools > List Tools > Agent Team List), create a new team and add the members or teams that will be able to take Mindful callbacks. This configuration will be used in Finesse Administrator later in this guide.
Create ICM scripts
You will need to configure ICM scripts to retain SIP headers and user data before either sending calls to Mindful or queuing calls to an appropriate agent skill. Both an inbound ICM script and a callback script are needed.
When quoting the estimated wait time prior to offering a callback, it is a best practice to set an upper limit for the amount of time that can be quoted. For example, if the wait time exceeds 10 minutes, you might choose to say "...more than than 10 minutes from now" rather than quoting an exact time.
We recommend setting a minimum offer threshold based on the current estimated wait time to ensure that callback offers are not made when wait times are very low. You may also wish to check agent availability prior to offering a callback.
Inbound ICM script
The inbound ICM script will handle inbound calls by populating a call variable with data received from SIP headers, setting a label, then sending calls to Mindful for an offer. If an inbound call cannot be successfully sent to Mindful, the script will queue the call at normal priority.
Use the following steps to configure the first ICM script:Set Variable node
Begin with a Set Variable node that sets the SIPHeader call variable to include all of the SIP headers that will be added to the SIP signaling when sending the call to Mindful. The SIP headers captured here must match what is configured in the CVP Call Server configuration and the metadata items configured in Mindful.
Example
Use the following format when adding SIP headers in the Set Variable block:
"<SIP header name 1>~add~<SIP header value 1>|<SIP header name 2>~add~<SIP header value 2>"
In the following example, we set X-cisco-acc-num to 123456
, X-cisco-first-name to Jane
, and X-cisco-last-name to Doe:
"X-cisco-acc-num~add~123456|X-cisco-first-name~add~Jane|X-cisco-last-name~add~Doe"
Label node
Create a Label node next, with the following configuration:
Label Type — Select "Dynamic" to allow a custom target number.
This should be "Dynamic" unless you are routing to a pre-configured fixed label.
Label Expression — Enter the Call Target phone number provisioned in Mindful.
This can be a variable if the Call Target phone number is defined elsewhere in the IVR script or if it is the default value of the variable.
Enable target requery — Select the checkbox to allow error handling to occur.
The exit from the Label block should only occur if a call fails to route to Mindful. In this case, the call will be sent to the queue according to normal routing procedures.
If Enable target requery is not selected, the Cisco platform will not handle any errors that may arise when it attempts to send calls to Mindful. Instead, it will drop calls if errors occur.
When Enable target requery is selected, an exit port is made available from the Label block to allow calls to continue routing to an agent skill or to be handled in another way.
Callback ICM script
The second ICM script handles callbacks received from Mindful. This script extracts any attached user data, sets a Finesse layout to display the newly populated ECC variables, then queues calls to a skill at high priority.
Use the following steps to configure the callback ICM script:
Set variable nodes for SIP headers
Begin with a Set Variable node to extract the final piece of user data included in the SIP headers received from Mindful. The account_number variable was listed last in our example configuration, but that may differ in your environment.
Variable — Select "user.acc_num".
Value — Enter "after("X-cisco-acc-num",Call.SIPHeader).
In this example, the value of the X-cisco-acc-num user data is assigned to the user.acc_num ECC variable. This is the last piece of user data attached to the SIP header in our example integration, because it was the last metadata item added in the Mindful UI earlier in this guide. Because it is the last piece of data, the value returned does not require additional string content.
Next, include additional Set Variable nodes to extract all additional user data passed via SIP headers. In our example configuration, we have two more variables to parse: first_name and last_name. Note that this includes all data except the final piece, which we have already handled.
Variable — Select "user.first_name".
Value — Enter "after("X-cisco-first-name",Call.SIPHeader).
Variable — Select "user.first_name".
Value — Enter "before("|",Call.user.first_name).
Two Set Variable blocks are needed to extract each variable. The first block will begin by returning everything in the SIPHeader variable after the variable string (For example, the string "X-cisco-first-name"). Since this is not the final variable in the string, you will need to trim the excess characters with a second Set Variable block.
Set Variable nodes for the Agent Answer API
You will need two more Set Variable nodes to facilitate the request to the Agent Answer API. The first will be to assign your API key to the ECC variable created earlier:
Variable — Select "user.api_key".
Value — Enter the Base64 combination of Client ID and Secret from a Mindful Application Client.
The second Set Variable node will strip the plus (+) from the E.164 number:
Variable — Select "user.contactnumber".
Value — Enter "right(Call.CallingLineID,10)".
Set Finesse Layout node
Add a Set Finesse Layout node to set the Finesse layout that will display each user data item, then queue the call to an agent skill at a higher priority than normal inbound calls.
Configure Finesse for the Agent Answer API
There are three categories that require configuration in the Finesse Administrator UI for the Mindful Agent Answer API:
- Actions
- Workflows
- Team Resources
Actions
The Action will contain the bulk of the configuration.
Type — Select "Browser Pop".
Handled by — Select "Finesse Desktop".
Browser URL — Enter the URL of the Agent Answer endpoint:
https://api.getmindful.com/v2/callback/agentAnswer?apiKey=user.api_key&ani=user.contactnumber
Click the icon on the right side of the Browser URL field to add the user.api_key and user.contactnumber variables to the associated query string parameters, as seen in the example image above.
You can do the same for any additional query string parameters containing user data:
Test the API request before saving:
The expected result is a 404 error, since there will be no call in Mindful to receive the Agent Answer request. This will validate that the Authentication Key is correct. If a 401 is received, that would indicate an invalid API key.
Save the action when finished:
Workflow
After building and testing the action in the previous step, a Workflow needs to be created.
Select “When a Call is answered” in the When to Perform Actions dropdown menu.
Click Add in the Ordered List of Actions section, then select the action created in the previous step.
Team Resources
Lastly, assign the newly created Mindful Workflow to the Workflows tab of any teams that may service callbacks:
(Alternative) Use CUCM to send calls to Mindful via a third-party SIP proxy
If you do not wish to use a Cisco SIP Proxy as we did in our example, but you wish to use a third-party SIP proxy instead, then certain changes must be made to the default configuration presented in this guide. These alternative steps require the use of CUCM to send calls via a third-party SIP proxy.
In the following sections, you will find some items that need to be modified from the previous steps, and others that are unique to this approach.
SBC trunk
Earlier in this guide we configured an SBC trunk to the Cisco SIP proxy. For the CUCM alternative, you must configure the SBC trunk to point to the CUCM SIP IP address and port, instead.
Dialed Number Pattern
There are changes that must be made to the Dialed Number Pattern, as well. Use the following details as a guide when setting up the Dialed Number Pattern.
Routing Pattern — Configure the pattern to catch 12-digit numbers beginning with
91
.Destination — Enter the FQDN of the CUCM instance.
CUCM SIP normalization script
By default, CUCM will remove all custom SIP headers, including those we created in the ICM scripts. To prevent this, create a Normalization script (Device > Device Settings > SIP Normalization Script) that allows a custom SIP header to be passed.
The body of the script should look like the following example when complete. The script checks for any SIP headers named User-to-User, then adds the value to the outgoing SIP message.
M = {}
M.allowHeaders = {"User-to-User"}
function M.inbound_INVITE(msg)
local ntcorrid = msg:getHeader("User-to-User")
if ntcorrid
then
pt = msg:getPassThrough()
pt:addHeader("User-to-User", ntcorrid)
end
end
return M
We have only validated this SIP Normalization script to allow a single SIP header. This may be a limitation of the alternative CUCM approach, unlike the CVP approach which sends calls directly to a SIP device capable of processing multiple headers.
CUCM SIP trunk to the SBC
Configure a SIP trunk in CUCM (Device > Trunk) which points to your SBC. In our example integration, we used an Avaya SBCE.
Destination Address and Destination Port — Use the IP address and port of your SBC's internal interface.
Normalization Script — Select the Normalization script created in the previous step.
CUCM Route Pattern
Create a Route Pattern to take the number passed from CVP, which should be 12 digits in length and begin with 91
, and send the call to your SBC.
Cisco ICM scripts
When using CUCM as an alternative method, the ICM scripts will look mostly the same as with the basic Cisco SIP proxy method. However, a few changes are needed to account for the fact that only a single SIP header can be passed when using CUCM.
Inbound script
The following image shows the Set Variable node including the single User-to-User SIP header:
Example
User-to-User~add~accnum:123456|firstname:jane|lastname:doe
In this case, the entire string would be captured by Mindful and passed back to your Cisco environment with the callback. You could then parse out the individual pieces of user data the same way described in the basic inbound ICM script earlier in this guide.Callback script
The callback ICM script is nearly identical to the default configuration as well, with the exception that only a single SIP header will be received. In this case, the Set Variable block will simply parse everything after User-to-User
in the data received.
In our example configuration, we have specified the ASBCE device as the Gateway/Route List. We used the built-in Called Party Transformation named PreDot. We also used this Called Party Transformation to prefix a plus symbol (+) to the number. Prefixing the plus symbol (+) in this way is an alternative to using an SBC Header Manipulation Rule when using CUCM.
CVP Call Server - SIP
Earlier in this guide, we configured the CVP Call Server to make SIP headers available to your ICM scripts, and we defined three headers to pass to ICM. This configuration will look different when using the CUCM alternative method. When using CUCM, you will need to define a single SIP header (User-to-User) which will contain all user data in a combined string.
Consolidate return-call destinations
The main integration guide assumes that each Call Target is configured with a Call Center Phone Number leading to a single group of agents in your call center. However, in some ACD environments, the same group of agents are spread out across multiple queuing destinations. Since a Call Target is intended to serve a particular agent group, there needs to be a way to deliver callbacks and return-to-hold calls to a single destination that can ultimately route calls throughout the entire agent group.
You can configure a Call Target to send calls to a Call Center Phone Number that leads to a shared disposition destination, then make further routing decisions based on data attached to the call. This form of queue consolidation allows you to route return calls among multiple destinations representing the same group of agents.
How it works
Using a consolidated callback destination requires custom data to be passed to Mindful with inbound calls to identify their ultimate return destinations. This can be done in two ways:
Send the destination to Mindful via SIP Headers. This requires that you configure additional Metadata Items for each affected Call Target. Or...
Post the destination to Mindful Datastore using the customer's ANI as the key. This method can be used even when calls are delivered via the PSTN rather than SIP.
In either case, Mindful will re-attach the custom data to the return call (whether it is a callback or a customer returning to hold) and deliver the call to a single return-call disposition destination. From there, you can use the custom data to route the call to the appropriate agent groups.
Example
Consider the following example. Let's say you have the same agent skill assigned to different queuing destinations labeled 111, 222, and 333. You have a single disposition destination for callbacks and another for return-to-hold calls. In this case, the routing path for a callback could look like this:
You identify that a particular new inbound call should ultimately be delivered to 333, so you attach that destination number to the call as custom data when sending it to Mindful for treatment.
When the time comes, Mindful delivers the return call (a callback in this case) with the destination number still attached.
When the call arrives at the callback disposition destination on your ACD, additional routing logic ensures that the call ends up with agents at 333.
The appropriate priority is set, and the call is delivered to an agent.
Offer second chance callbacks
Second chance callback is a best-practice methodology that can increase the take-rate of callback offers and lower the abandon rate in your call center's holding queues. With a few updates to your routing logic, you can provide additional callback offers to customers waiting on hold who have already declined an initial offer.
There are a variety of reasons that customers might appreciate a second chance to accept an offer of a callback. For example, perhaps something has come up that requires their attention and they can no longer wait on hold. Perhaps the quoted wait time was low when they declined the first offer but queue conditions later changed and resulted in a longer hold time. Regardless of the scenario, second chance callback ensures that customers have the callback option available when they need it.
Benefits
Our research shows positive results for call centers offering second chance callback, including:
Keeping customers in control with additional options while holding
Reducing abandoned calls in the holding queue by offering an alternative option
Fully controlling second chance offers in your ACD with no integration constraints
Adding another tool to address unexpected increases in hold time
No additional requirements for customers — they are not required to respond to second chance prompts, but can instead simply continue to wait on hold if they choose.
ACD configuration
Most configuration for second chance callback is done on your ACD, so the technical implementation will vary based on your integration. In all integrations, the following logic must be introduced to interact with customers in the holding queue.
Whether offers are made in your ACD or Mindful, the process begins with the first offer. If the initial offer is accepted, then a callback is registered and no second chance offer is needed.
If the initial offer is not accepted, callers are routed to a holding queue.
A timer begins in the holding queue. When the specified time expires, another callback offer is made.
If the customer declines the second chance offer, then the timer is reset, and another offer will be made when it expires again.
If the customer accepts the second chance offer, the call is sent to Mindful for treatment.
Note that you can add logic into the routing script to limit the total number of offers made per call.
Mindful configuration
There are two alternatives for preparing your Mindful organization for second chance callback. Each alternative introduces its own advantages and drawbacks.
Option 1 (best practice) — Use separate Call Targets for normal inbound calls and second chance calls.
Option 2 — Use a single Call Target for both normal inbound calls and second chance calls.
If you wish to use a single Call Target for normal inbound calls and second chance calls, you will need:
Two phone numbers provisioned for the same Call Target
The Offer Choose Hold Call Target setting disabled (offering a hold option in Mindful after a customer has already chosen to leave the holding queue can negatively impact the customer experience)
If you wish to use separate Call Targets for normal inbound calls and second chance calls, you will need:
Two Call Targets configured with the same Call Center Phone Number targeting the same group of agents
The Offer Choose Hold setting disabled for the second chance Call Target. The setting can still be enabled for the normal inbound Call Target
For either method, you will also need:
The ability to capture DTMF input from customers in your holding queue
The ability to play audio prompts to customers in your holding queue based on a timer
Option 1 (best practice) — Use separate Call Targets
This option uses the first Call Target to service normal inbound callback requests with a second Call Target dedicated to servicing second chance callback requests. For an initial offer, send the call to the first Call Target. For a second chance offer, send the call to the second Call Target. This option separates the two types of calls for ease of reporting and real-time analysis.
Advantages | Drawbacks |
---|---|
Call Detail reporting is more convenient. | ECBT is not combined between the two Call Targets. Therefore, ECBT on the normal inbound Call Target may be lower than it should be, since the call volume from the second chance Call Target is not included in the calculation. |
Real-time monitoring clearly distinguishes the two call types. | |
You can enable the Offer Choose Hold option on the normal inbound Call Target while disabling it on the second chance Call Target. |
Option 2 — Use a single Call Target
The second option uses a single Call Target to service both normal inbound callback requests and second chance requests. This method is easier to configure and maintain, but it introduces a few additional drawbacks to consider.
Advantages | Drawbacks |
---|---|
Configuration is simpler. | When a second chance ASAP callback is registered, it will be placed at the back of the virtual queue (waitlist). This can result in customers who accept second chance offers waiting longer than they would have if they remained in the holding queue. |
Offer Choose Hold should not be offered by the Call Target. This can affect your offer strategy for normal inbound calls, which may not be intended. | |
Reporting on second chance interactions requires additional steps. | |
Real-time monitoring combines normal inbound callback requests and second chance requests together. |
Reporting with separate Call Targets
As noted in the lists of advantages and drawbacks, reporting on second chance interactions varies depending on whether you use one or two Call Targets.
On the Callback Overview, Executive Summary, and Call Detail pages, use the Call Target filter to view data only for the second chance Call Target. This will exclude any data from initial offers and callers that chose to hold. If you offer second chance for multiple lines of business, you can add all of your second chance Call Targets into a shared reporting category to view all second chance interactions.
On the Callback Status page, review real-time statistics for the second chance Call Target or use the Category filter to limit the view to only second chance Call Targets.
Reporting with a single Call Target
When using a single Call Target, additional configuration is required and the reporting capabilities are limited.
Preparation:
Provision two phone numbers in the Mindful user interface, and assign both phone numbers to the same Call Target.
In your routing scripts, send normal inbound calls for callback treatment to the first phone number.
Send second chance calls for treatment to the second phone number.
Reporting:
On the Call Detail page, export the reporting data to CSV. In the exported CSV file, the Call Target Phone Number to which each call was sent will be noted in the Source column.
In the CSV file, filter the Source column for all records matching the second chance phone number. The remaining data will include only second chance interactions.
When using a single Call Target, the Callback Status, Callback Overview, and Executive Summary pages will combine second chance interactions with initial offers and callers that chose to hold.