Contents
Classic Callback Sample
You can download the Classic Callback (VoiceXML) sample application via a zip file. The zip file also includes Composer callflow diagrams.
Genesys Mobile Services Classic Callback Sample
Overview
The Genesys Mobile Services (GMS) Classic Callback sample illustrates how to implement an IVR (Genesys Voice Platform VoiceXML) application that communicates with GMS and performs classic Callback scenarios. It is primarily meant to be used by developers as a reference to build a Composer callflow application that interacts with GMS.
Scenarios
The following scenarios are implemented as one Composer project, which consists of one driver callflow and a corresponding subcallflow for each scenario.
IVR Controlled Callback Using GMS Stat Server API
- Caller is in Genesys Voice Platform (GVP) and requests an Agent.
- GVP gets the estimated wait time (EWT) using GMS Stat Server API.
- GVP logic determines Callback should be offered (EWT threshold).
- GVP offers Caller the choice of a Callback ASAP or to stay on the line and wait for an Agent.
- Caller chooses Callback ASAP and hangs up. GVP creates a new service request to GMS using Callback API. Caller is called back when an Agent about to become available.
- Caller chooses to stay on the line and wait for an Agent, and the call is connected when an Agent is available.
IVR Controlled Callback Using GMS Callback API
- Caller is in GVP and requests an Agent.
- GVP start a new GMS service (HTTP API) and a virtual interaction is placed in the queue to hold the position of the caller.
- GVP gets the estimated wait time (EWT) and Position for the virtual interaction using the GMS Callback API.
- If the EWT-Position Threshold is not met, implying that the wait time is not long.
- Wait for an Agent by continuing polling GMS Callback Service API until Agent becomes available or the EWT threshold is reached.
- If the EWT-Position Threshold is met, implying that the wait time is long.
- GVP offers Caller the choice of a Callback as soon as an Agent becomes available and without losing position in the queue, or to stay on the line and wait for an Agent. Optionally informs the caller about the EWT and Position in the queue.
- Caller chooses Callback and hangs up. The caller is called back when an Agent is about to become available.
- Caller chooses to stay on the line and wait for an Agent, and the call is connected when an Agent is available.
Prerequisites
In order to use this sample application, the following prerequisites are required:
- GMS installed and running, with JDK 1.7.
- The services that you want to use must be deployed.
- The sample can be deployed on all web servers supported by Composer 8.5.
- (Optional to play VoiceXML) MRCP enabled for GVP using the tts option. GVP uses MRCP speech synthesis technology to incorporate text-to-speech for use in voice applications.
Running the Sample
- Download the zip file.
- Extract the zip into the following directory: <gms install folder>/webapps.
- Modify the <gmsinstalldir>/webapps/ClassicCallbackSample/src/AppRoot.vxml file to set values for the following variables, which are dependent on the environment:
- gms_uri
- gms_service_name
- stat_api_params – this value should be same as the Virtual Queue specified in the GMS service configuration for the preceding service (gms_service_name)
- gms_inbound_service_rp – any routepoint where a strategy/workflow can route the call to the agent.
- gms_transfer_routepoint - routepoint where the GMS classic call inbound service is configured.
- Edit the start.ini file to make sure that it contains:
--module=server,jsp,jmx,resources,websocket,ext,plus,annotations,deploy,security,servlets,continuation
etc/jetty.xml
etc/jetty-ssl.xml
etc/jetty-deploy.xml
etc/jetty-http.xml
etc/jetty-https.xml
jetty.send.server.version=false
Verify that the following URL is accessible: http://<gmshost>:<gmsport>/ClassicCallbackSample/src-gen/ClassicCallbackEntry.vxml
Configure IVR Objects
1. In Genesys Administrator > Provisioning, create a new IVR Profile named ClassicCallbackSample with a Service Type of VoiceXML.
2. Provision the IVR Profile to point to the URL shown in Step 4.
3. Setup a DID group (a trunk group to the IVR Profile mapping).
4. Configure the DID as a TrunkGroup that points to Resource Manager.
5. Make a call to the DID and follow the voice prompts.
Brief Introduction to the Code (Composer Callflow Diagrams)
ClassicCallbackEntry.callflow
- Common entry into the IVR samples for all of the supported scenarios.
- Acts as a driver application for the sample.
- Plays welcome message.
- Collects user data (account number).
- 1111 - for Scenario 1.
- 2222 – for Scenario 2.
- Other – play error prompt and repeat Step 4.
- Based on the selected scenario, invokes the following subroutines:
- SubGMSStatsCallback.callflow for Scenario 1.
- SubIVRConrolledGMSCallback.callflow for Scenario 2
SubGMSStatsCallback.callflow
- Get EWT using GMS Statistic API .../genesys/1/statistics (EstimatedWaitTime).
- Get current interactions waiting in queue .../genesys/1/statistics (current_In_Queue).
- Check Callback offer threshold.
- Offer Callback.
- Invoke SubCallbackOfferDialog.
- Callback declined.
- Yes, default route the call (continue with no Callback).
- No, exit.
- Do not offer Callback.
- Default route the call (continue with no Callback).
- Offer Callback.
SubIVRControlledGMSCallback.callflow
- Start Callback service (USERORIGINATED).
- Get EWT and Position using GMS Callback API .../genesys/1/callback (check-queue-position).
- Check agent available.
- Agent available.
- Get access number.
- Blind transfer to access number.
- Exit.
- Agent not available, so check Call
- Agent available.