Hold Call
    • Dark
      Light

    Hold Call

    • Dark
      Light

    Article summary

    This API allows an Agent to hold a call that is currently active.

    Pre-requisite

    The agent must be on an active call.

    Sequence Diagram

    The following figure illustrates the workflow of hold call API:

    The following figure illustrates the workflow of hold call failure:

    Message Structure

    Request Parameters

    Value

    channel

    Amazon

    topic

    InboundCall

    subtopic

    Hold

    source

    <<app-name-broadcasting-this-message>>

    data

    <<Contact Id to put call on hold>>

    Response Parameters

    Value

    channel

    Amazon

    topic

    InboundCall

    subtopic

    InboundCallStateChange

    source

    Refer Call Event Parameters

    Possible Error Codes

    Error Type

    Code

    Error Message

    HOLD_CALL_FAILED

    Amazon Connect Failure Error Message.

    Call hold failed.

    Sample Request

    {
        "channel": "Amazon",
        "topic": "InboundCall",
        "subtopic": "Hold",
        "source": "myapp",
        "data": "1233dc5f-6d09-4752-85a0-cfca6fc445e7"
    }

    Sample Response - Call Type: Agent

    {
        "channel": "Amazon",
        "topic": "InboundCall",
        "subtopic": "InboundCallStateChange",
        "message": {
            "call": {
                "ButtonStates": {
                    "items": {
                        "answer": "Hide",
                        "reject": "Hide",
                        "disconnect": "Hide",
                        "hold": "Hide",
                        "resume": "Hide",
                        "clearContact": "Hide",
                        "consult": "Enable",
                        "numberpad": "Enable",
                        "swap": "Hide",
                        "transfer": "Hide",
                        "conference": "Hide"
                    },
                    "count": 11
                },
                "ActionsAllowed": null,
                "ResponseType": 0,
                "ResponseText": "Success",
                "ResponseActual": {
                    "connectionId": "48a09a0b-b73d-4d03-a77d-7c36132de226",
                    "contactId": "bcdb2ec7-bca2-423a-bd64-1688c173d529",
                    "phoneNumber": null,
                    "status": "hold",
                    "statusTimestamp": "2020-04-09T12:50:00.387Z",
                    "type": "agent",
                    "buttonStates": {
                        "answer": false,
                        "reject": false,
                        "disconnect": false,
                        "hold": false,
                        "resume": false,
                        "clearContact": false,
                        "consult": true,
                        "numberpad": true,
                        "swap": false,
                        "transfer": false,
                        "conference": false
                    },
                    "previousStatus": "connected"
                },
                "CallVariables": {
                    "ANI": "+161081111",
                    "DNIS": "+16013261548"
                },
                "ExtendedCallVariables": null,
                "ResponseFields": {
                    "Participants": [],
                    "MediaProperties": {
                        "callType": "agent",
                        "queueName": "InboundTest",
                        "queueTimestamp": "2020-04-09T12:50:00.387Z"
                    },
                    "fromAddress": null,
                    "CallState": "hold",
                    "Type": "agent",
                    "CurrentStateTime": "2020-04-09T12:50:00.387Z",
                    "Campaign": "",
                    "DN": "InboundTest"
                },
                "id": "48a09a0b-b73d-4d03-a77d-7c36132de226",
                "event": "hold",
                "CallType": "agent"
            },
            "source": "event"
        }
    }

    Sample Response - Call Type: Inbound

    {
        "channel": "Amazon",
        "topic": "InboundCall",
        "subtopic": "InboundCallStateChange",
        "message": {
            "call": {
                "ButtonStates": {
                    "items": {
                        "answer": "Hide",
                        "reject": "Hide",
                        "disconnect": "Enable",
                        "hold": "Hide",
                        "resume": "Enable",
                        "clearContact": "Hide",
                        "consult": "Hide",
                        "numberpad": "Hide",
                        "swap": "Hide",
                        "transfer": "Hide",
                        "conference": "Hide"
                    },
                    "count": 11
                },
                "ActionsAllowed": null,
                "ResponseType": 0,
                "ResponseText": "Success",
                "ResponseActual": {
                    "connectionId": "bcdb2ec7-bca2-423a-bd64-1688c173d529",
                    "contactId": "bcdb2ec7-bca2-423a-bd64-1688c173d529",
                    "phoneNumber": "+161081111",
                    "status": "hold",
                    "statusTimestamp": "2020-04-09T12:50:00.387Z",
                    "type": "inbound",
                    "buttonStates": {
                        "answer": false,
                        "reject": false,
                        "disconnect": true,
                        "hold": false,
                        "resume": true,
                        "clearContact": false,
                        "consult": false,
                        "numberpad": false,
                        "swap": false,
                        "transfer": false,
                        "conference": false
                    },
                    "previousStatus": "connected"
                },
                "CallVariables": {
                    "ANI": "+161081111",
                    "DNIS": "+16013261548"
                },
                "ExtendedCallVariables": null,
                "ResponseFields": {
                    "Participants": [],
                    "MediaProperties": {
                        "callType": "inbound",
                        "queueName": "InboundTest",
                        "queueTimestamp": "2020-04-09T12:50:00.387Z"
                    },
                    "fromAddress": "+161081111",
                    "CallState": "hold",
                    "Type": "inbound",
                    "CurrentStateTime": "2020-04-09T12:50:00.387Z",
                    "Campaign": "",
                    "DN": "InboundTest"
                },
                "id": "bcdb2ec7-bca2-423a-bd64-1688c173d529",
                "event": "hold",
                "CallType": "inbound"
            },
            "source": "event"
        }
    }


    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.