Session Status

This method allows you to review the "Voice Session Summary" status and individual call legs.
"Voice Session Summary" (VSS) endpoint. Your "Voice Session Summary" (VSS) endpoint can be configured on the sub-account level with the Webhooks API
This can be used alongside or instead of the Call Status, to simplify your monitoring.

Request

When receiving final call statuses Wavecell platform will POST a JSON object to your URL.

The JSON object will contain the following values:

Name

Type

Description

namespace

String

8x8's overall product namespace. For Voice products the value will be "VOICE"

eventType

String

Event type that generated this callback. For call status events the value will be "CALL_STATUS"

description

String

Description of the event type that triggered the callback.

sessionId

String

Unique id that represents Number masking session [UUID]

subAccountId

String

Unique ID of account

sessionStatus

String

“sessionStatus” values of the two call legs. Possible values for “sessionStatus” are:
COMPLETED, NO ANSWER, BUSY, CANCELED, FAILED

startTime

String

Start time of call masking session

endTime

String

Start time of call masking session

lastAction

String

Shows the last executed command during the session (MakeCall, PlayTTS or PlayFile)

callCount

Integer

Shows how many call legs have been bridged for the given session

details

Object

JSON object containing information about all call legs in the session

callId

String

Unique identifier of call leg

callDirection

Integer

Indicates the direction of the call leg (INBOUND or OUTBOUND)

callType

String

Type of the call leg. Values can be "PSTN" or "VOIP", depending on where the call was initiated from (telco operators or VoiceSDK users). For NumberMasking the value will always be PSTN.

initiatedTimestamp

String

Initiated time of call leg

connectedTimestamp

String

Time when the call leg is connected

disconnectedTimestamp

String

Time when the call leg is disconnected

source

String

Source number (CallerID) set for the call leg

destination

String

Destination number set for the call leg

sourceCountryCode

String

Country code for the Source Number

destinationCountryCode

String

Country code for the Destination Number

sourceRefId

String

For INBOUND call legs this property shows the referenceId of the Virtual Number that has been called. For OUTBOUND calls the value is null

destinationRefId

String

For OUTBOUND call legs this property shows the referenceId of the Virtual Number that is used as callerId. For INBOUND calls the value is null

callStatus

String

Call status of the call leg. The values can be:
COMPLETED, NO ANSWER, BUSY, CANCELED, FAILED

callDuration

Integer

Call duration of the call leg.

Example of a JSON object sent to your "Voice Session Summary" endpoint:

{
    "namespace": "VOICE",
    "eventType": "SESSION_SUMMARY",
    "description": "Status update of a call",
    "payload": {
        "sessionId": "37f31065-b050-11ea-aed2-b9458c490aa3",
        "subAccountId": "account_x",
        "sessionStatus": "COMPLETED",
        "startTime": "2020-06-17T04:08:37Z",
        "endTime": "2020-06-17T04:09:37Z",
        "lastAction": "MAKE_CALL | PLAY_TTS | PLAY_FILE",
        "callCount": 2,
        "details": {
            "callA": {
                "callId": "eb0fc709-9693-11ea-454d-1705dde98182",
                "callDirection": "INBOUND",
                "callType": "PSTN",
                "initiatedTimestamp": "2020-06-17T04:08:37Z",
                "connectedTimestamp": "2020-06-17T04:08:37Z",
                "disconnectedTimestamp": "2020-06-17T04:09:37Z",
                "source": "+62123456789",
                "destination": "+62987654321",
                "sourceFormat": "MSISDN",
                "destinationFormat": "MSISDN",
                "sourceCountryCode": "ID",
                "destinationCountryCode": "ID",
                "sourceRefId": null,
                "destinationRefId": "vn-ref-1",
                "callStatus": "COMPLETED",
                "callDuration": 60
            },
            "callB": {
                "callId": "eb0fc709-9693-11ea-454d-1705dde98182",
                "callDirection": "OUTBOUND",
                "callType": "PSTN",
                "initiatedTimestamp": "2020-06-17T04:08:37Z",
                "connectedTimestamp": "2020-06-17T04:08:37Z",
                "disconnectedTimestamp": "2020-06-17T04:09:37Z",
                "source": "+62987654321",
                "destination": "+622123456789",
                "sourceFormat": "MSISDN",
                "destinationFormat": "MSISDN",
                "sourceCountryCode": "ID",
                "destinationCountryCode": "ID",
                "sourceRefId": null,
                "destinationRefId": "vn-ref-1",
                "callStatus": "COMPLETED",
                "callDuration": 60
            }
        }
    }
}

Session statuses

Here is the list of all possible session statuses if two calls have been triggered in the call flow (using the MakeCall action):

CallA Status

CallB Status

Status

Comment

COMPLETED

COMPLETED

COMPLETED

Successfully established call between two call parties

COMPLETED

NO ANSWER

NO ANSWER

The called party did not answer the call

COMPLETED

BUSY

BUSY

The called party’s phone was busy

COMPLETED

FAILED

FAILED

The outbound call towards the called party’s phone number failed. Possible reasons include the number is switched off or not reachable

COMPLETED

CANCELED

CANCELED

The calling party disconnected the call before a “Status” for the outbound call leg was received. This can occur if a user disconnects before ringing is completed or as soon as the caller hears an operator tone suggesting the phone number is invalid / switched off.

COMPLETED

NULL

COMPLETED

Indicates that the call flow did not have an outbound call leg. This can happen when the called phone number has been answered by a TTS prompt.

Response

Your endpoint should respond with 200 OK status