UNPKG

@vonage/voice

Version:

The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.

73 lines (70 loc) 2.55 kB
import { AdvancedMachineDetection } from '../AdvancedMachineDetection.js'; import { MachineDetection } from '../../enums/NCCO/MachineDetection.js'; import { OutboundCall } from '../OutboundCall.js'; import '../../enums/AdvancedMachineDetectionMode.js'; import '../../enums/MachineDetctionBehavior.js'; import '../CallWithAnswerURL.js'; import '../CommonOutboundCall.js'; import '../../enums/HttpMethod.js'; import '../Endpoint/CallEndpoint.js'; import '../Endpoint/PhoneEndpoint.js'; import '../Endpoint/SIPEndpoint.js'; import '../Endpoint/VBCEndpoint.js'; import '../Endpoint/WebsocketEndpoint.js'; import '../Endpoint/AppEndpoint.js'; import '../CommonCallFields.js'; import '../Endpoint/PSTNEndpoint.js'; import '../CallWithNCCO.js'; import '../NCCO/NCCOActions.js'; import '../NCCO/RecordAction.js'; import '../../enums/NCCOActions.js'; import '../../enums/NCCO/RecordingFormat.js'; import '../NCCO/ConversationAction.js'; import '../NCCO/ConnectAction.js'; import '../../enums/NCCO/ConnectEventType.js'; import '../NCCO/TalkAction.js'; import '../../enums/TTSLanguages.js'; import '../NCCO/StreamAction.js'; import '../NCCO/InputAction.js'; import '../NCCO/DTMFSettings.js'; import '../NCCO/SpeechSettings.js'; import '../NCCO/NotifyAction.js'; /** * Represents the request payload for creating a call, including various call settings. * * @remarks * Vonage API's will return information using `snake_case`. This represents the * pure response before the client will transform the keys into `camelCase`. */ type CreateCallRequest = { /** * Specifies whether to use a random caller number for the call. */ random_from_number?: boolean; /** * An array of URLs for event callbacks during the call's lifecycle. */ event_url?: Array<string>; /** * The type of machine detection to use for the call. */ machine_detection?: MachineDetection; /** * Advanced machine detection settings, including beep timeout. */ advanced_machine_detection: { /** * The beep timeout setting for advanced machine detection. */ beep_timeout?: number; } & Omit<AdvancedMachineDetection, 'beepTimeout'>; /** * The length timer setting for the call. */ length_timer?: number; /** * The ringing timer setting for the call. */ ringing_timer?: number; } & Omit<OutboundCall, 'randomFromNumber' | 'eventUrl' | 'machineDetection' | 'advancedMachineDetection' | 'lengthTimer' | 'ringingTimer'>; export type { CreateCallRequest };