Call Handle

This method provides insights about call details and will be sent to your "Voice Call Action" (VCA) endpoint. Your "Voice Call Action" (VCA) endpoint can be configured on the sub-account level with the Number Masking Webhooks.

Request

When receiving an incoming call to your virtual number Wavecell platform will POST a JSON object to your URL.

The JSON object will contain the following values:

NameTypeDescription
namespaceString8x8 product channel definition
eventTypeStringCurrent call handle event type. CALL_STATUS, CALL_ACTION or SESSION_SUMMARY
descriptionStringDescription of the current call handle event type
payloadobjectcontains call information about the current number masking session
eventIdStringId unique to an event of the current number masking session [UUID]
callIdStringId unique to a call leg of the current number masking session [UUID]
sessionIdStringId unique to the current number masking session [UUID]
subAccountIdStringunique id for your subaccount
callStatusStringStatus of the current call leg. Values can be:
CALL_INITIATED
CALL_RECEIVED
CALL_CONNECTED
CALL_DISCONNECTED
CALL_UPDATED
DTMF_RECEIVED
callDirectionStringDirection of the call leg. INBOUND or OUTBOUND
callTypeStringFor Number Masking the call type is always PSTN
sourceStringSource number of the call leg.
destinationStringDestination number of the call leg.
sourceFormatStringSource format for number masking is always MSISDN
sourceCountryCodeStringCountry code of the source number
destinationCountryCodeStringCountry code of the destination number
callDurationIntegerCall duration for the current call leg
sipCodeIntegerFinal Sip status code for the call leg defined by RFC 3261
TimestampTimestampTimestamp of the processed event

Example of a JSON object sent to your handleURL:

{
	"namespace": "VOICE",
	"eventType": "CALL_STATUS",
	"description": "Status update of a call",
	"payload": {
		"eventId": "eb0fc709-9693-11ea-454d-1705dde98182",
		"callId": "a1d6a5e3-efec-11e9-b999-7d370b5f90d1",
		"sessionId": "a1d6a5e2-efec-11e9-b999-efc71013a78f",
		"subAccountId": "your_subaccount_id",
		"callStatus": "CALL_INITIATED",
		"callDirection": "INBOUND | OUTBOUND",
		"callType": "PSTN",
		"source": "+65123456789",
		"destination": "+65987654321",
		"sourceFormat": "MSISDN",
		"destinationFormat": "MSISDN",
		"sourceCountryCode": "SG",
		"destinationCountryCode": "SG",
		"sourceRefId": "NumberRef1",
		"destinationRefId": "vn-ref-1",
		"callDuration": 10,
		"eventData": "additional event data",
		"sipCode": 200,
		"timestamp": "2019-10-16T08:12:01Z"
	}
}

To start your call flow you need to reply to the call handle with an HTTP 200 response code including a Call Action in the HTTP response body. The supported Call Actions are:

  • PlayTTS - Generates and plays a TTS to the calling user.
  • PlayFile - Plays a pre-recorded message to the calling user.
  • MakeCall - Initiates an outgoing call to the desired destination. Once answered, the calling user and the second user (outgoing call destination) will be connected to the same call flow.
  • Hangup - Terminates the ongoing call.