Voice Message

Below is a sample of a Voice Message call scenario. When the API call is made, the 8x8 Voice Platform will send an outbound TTS (Text-To-Speech) to the MSISDN +6512345678 and hangs up when the playback is done.

Description of Callflow

  1. Outbound Call is made to a user by making an API request to the Callflows API
  2. Customer picks up the call and is played a test message.
  3. Call immediately hangs up as soon as the message played.

Diagram of Callflow


Callflow Actions used in a successful Voice Messaging call scenario

Example of initial API call to place outbound call

This is the URL to send a the API request to.

/POST voice.wavecell.com/api/v1/subaccounts/{sub-account-id}/callflows - v1.2

This is the request body to send the API request to as well.

{
    "callflow": [
          {
          "action": "makeCall",
          "params": {
            "source": "6512341234",
            "destination": "6512345678"
            }
        },
        {
        "action": "say",
        "params": {
            "text": "Hello, this is a test Voice Message.",
            "voiceProfile": "en-IE-EmilyNeural",
            "repetition": 1,
            "speed": 1
            }
        },
        {
          "action": "hangup"
        }
    ]
}

Response

Success

{
    "sessionId": "d9874358-89ac-4c50-bbab-1eb634482a94",
    "sessionStatus": "CREATED",
    "callFlowRequestId": "89b545a5-0676-11ee-8100-d500c0d203fc",
    "statusCode": 1,
    "statusMessage": "Created"
}

Failure

{
    "sessionStatus": "NOT_CREATED",
    "callFlowRequestId": "0564e804-0a7e-11ee-9c83-6df9c048a122",
    "statusCode": -1002,
    "statusMessage": "Speech profile or language parameter invalid"
}

Explaining Session Status

Session status indicates if a call is successfully accepted & created or not created on the 8x8 platform. 8x8 returns two status:

  • CREATED- call is successfully created on the platform.
  • NOT CREATED- call is not successfully created on the platform and 8x8 returns statusCode and statusMessageto understand why the call was not accepted on the platform

Status Code and Status Message

Status CodeMessage
1Created
-1001Invalid JSON request body
-1002Speech profile or language parameter invalid
-1003Valid maxDigits required when minDigits provided
-1005Valid overallTimeout is required when digitTimeout provided
-1007$.callflow[0].action should be one of: [Call action names]
Eg: $.callflow[0].action should be one of: say,playFile,sayAndCapture
-1008Valid maxDigits is required when completeOnHash is false
-1009Invalid call flow entry provided. [Additional error details here].
Eg: Invalid call flow entry provided. $.callflow[0].params.text: is missing but it is required
-9999An unknown error has occurred.

Session Summary Upon Termination of Call Scenario

Upon terminate of the session the session summary(VSS) will be returned via webhook. To learn more about the Voice Session Summary, please click here.