Skip to main content

@wildix/wim-voicebots-client > SendHangupCommand

SendHangupCommand class

Terminates the voice session and the call.

Signature:

export declare class SendHangupCommand extends SendHangupCommand_base 

Extends: SendHangupCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { VoiceBotsClient, SendHangupCommand } from "@wildix/wim-voicebots-client"; // ES Modules import
// const { VoiceBotsClient, SendHangupCommand } = require("@wildix/wim-voicebots-client"); // CommonJS import
const client = new VoiceBotsClient(config);
const input = { // SendHangupInput
reason: "STRING_VALUE",
sessionId: "STRING_VALUE", // required
};
const command = new SendHangupCommand(input);
const response = await client.send(command);
// {};