Number Masking Webhook

Number masking in the Alohaa enhances privacy by hiding actual phone numbers during calls. This guide details the webhooks for setting up call initiation and managing completion events.

Part 1: Number Masking Call Initiation

Webhook Request Data

When a number masking call is to be initiated, Alohaa sends the following data to the client’s endpoint:

{
    "caller_number": "99889xxxxx",
    "did": "918645658689",
    "call_id": "1ascaba13abcaav"
}

Expected Webhook Response

The client needs to process the above request and respond with the following structure, which includes the number to which the call should be forwarded and any applicable timeout settings:

{
    "response": {
        "call_forwarding_number": "87123xxxxx",
        "call_timeout": 0
    }
}

// Value in seconds, 0 means no timeout

Payload Fields Description

FieldDescription

call_forwarding_number

The phone number to which the call should be forwarded.

call_timeout

Timeout for the call in seconds. '0' indicates no timeout.

Call Flow Description

  1. The Caller initiates a call to the DID

  2. A webhook is triggered on the Client Server with the Caller ID, Caller No., and DID No.

  3. The Client Server responds to the webhook with the Receiver's number and Call timeout duration. Call timeout should be 0, if there is no timeout.

  4. The Aloaha Server initiates a call to the Receiver.

  5. The call is connected between the Caller and the Receiver.

  6. The call is completed.

  7. A webhook is triggered on the Client Server with the call details.

Part 2: Call Completion Notification

Upon the completion of a number masking call, Alohaa sends a webhook with the following data to notify the client of the call's outcome:

{
    "did": "918645658689",
    "call_id": "434173d4-4186-4cdd-9ba6-9fbf9d79865c",
    "caller_number": "99889xxxxx",
    "receiver_number": "23672xxxxx",
    "call_status": "Answered",
    "answered_at": "2024-02-29T07:43:03.548Z",
    "recording_url": "https://doosra-ivr-voicemails.s3.ap-south-1.amazonaws.com/ten20_infomedia/xxxxxxxx.wav",
    "end_at": "2024-02-29T07:43:03.548Z"
}

Payload Fields Description

FieldDescription

did

Direct Inward Dialing number used for the call.

call_id

Unique identifier for the call session.

caller_number

Masked number of the caller.

receiver_number

Masked number of the receiver.

call_status

Status of the call, e.g., "Answered", "Missed".

answered_at

Timestamp when the call was answered.

recording_url

URL to access the recording of the call.

end_at

Timestamp when the call ended.

Last updated