Disconnect Call
    • Dark
      Light

    Disconnect Call

    • Dark
      Light

    Article summary

    This API allows an Agent to disconnect a call.

    Pre-requisite

    The agent must be on an active call.

    Sequence Diagram

    The following figure illustrates the workflow of disconnect call API:

    The following figure illustrates the workflow of disconnect call failure:

    Message Structure

    Request Parameters

    Value

    channel

    Amazon

    topic

    InboundCall

    subtopic

    Disconnect

    source

    «app-name-broadcasting-this-message»

    data

    «Connection Id to disconnect the call»

    Response Parameters

    Value

    channel

    Amazon

    topic

    InboundCall

    subtopic

    InboundCallStateChange

    source

    Refer Call Event Parameters

    Possible Error Codes

    Error Type

    Code

    Error Message

    DISCONNECT_CALL_FAILED

    Amazon Connect Failure Error Message.

    Disconnecting call failed.

    Sample Request

    {
        "channel": "Amazon",
        "topic": "InboundCall",
        "subtopic": "Disconnect",
        "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": "Enable",
                        "consult": "Hide",
                        "numberpad": "Hide",
                        "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": "disconnected",
                        "statusTimestamp": "2020-04-09T12:52:16.344Z",
                        "type": "agent",
                        "buttonStates": {
                            "answer": false,
                            "reject": false,
                            "disconnect": false,
                            "hold": false,
                            "resume": false,
                            "clearContact": true,
                            "consult": false,
                            "numberpad": false,
                            "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:52:16.344Z"
                        },
                        "fromAddress": null,
                        "CallState": "ACW",
                        "Type": "agent",
                        "CurrentStateTime": "2020-04-09T12:52:16.344Z",
                        "Campaign": "",
                        "DN": "InboundTest"
                    },
                    "id": "48a09a0b-b73d-4d03-a77d-7c36132de226",
                    "event": "ACW",
                    "CallType": "agent"
                },
                "source": "event"
            }   
     }
    }

    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": "Enable",
                        "consult": "Hide",
                        "numberpad": "Hide",
                        "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": "disconnected",
                        "statusTimestamp": "2020-04-09T12:52:16.344Z",
                        "type": "agent",
                        "buttonStates": {
                            "answer": false,
                            "reject": false,
                            "disconnect": false,
                            "hold": false,
                            "resume": false,
                            "clearContact": true,
                            "consult": false,
                            "numberpad": false,
                            "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:52:16.344Z"
                        },
                        "fromAddress": null,
                        "CallState": "ACW",
                        "Type": "agent",
                        "CurrentStateTime": "2020-04-09T12:52:16.344Z",
                        "Campaign": "",
                        "DN": "InboundTest"
                    },
                    "id": "48a09a0b-b73d-4d03-a77d-7c36132de226",
                    "event": "ACW",
                    "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": "Enable",
                        "resume": "Hide",
                        "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": "connected",
                    "statusTimestamp": "2020-04-09T12:51:05.816Z",
                    "type": "inbound",
                    "buttonStates": {
                        "answer": false,
                        "reject": false,
                        "disconnect": true,
                        "hold": true,
                        "resume": false,
                        "clearContact": false,
                        "consult": false,
                        "numberpad": false,
                        "swap": false,
                        "transfer": false,
                        "conference": false
                    },
                    "previousStatus": "hold"
                },
                "CallVariables": {
                    "ANI": "+161081111",
                    "DNIS": "+16013261548"
                },
                "ExtendedCallVariables": null,
                "ResponseFields": {
                    "Participants": [],
                    "MediaProperties": {
                        "callType": "inbound",
                        "queueName": "InboundTest",
                        "queueTimestamp": "2020-04-09T12:51:05.816Z"
                    },
                    "fromAddress": "+161081111",
                    "CallState": "connected",
                    "Type": "inbound",
                    "CurrentStateTime": "2020-04-09T12:51:05.816Z",
                    "Campaign": "",
                    "DN": "InboundTest"
                },
                "id": "bcdb2ec7-bca2-423a-bd64-1688c173d529",
                "event": "connected",
                "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.