UNPKG

@vonage/voice

Version:

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

50 lines (47 loc) 1.71 kB
import { HttpMethod } from '../enums/HttpMethod.mjs'; import { MachineDetectionBehavior } from '../enums/MachineDetctionBehavior.mjs'; import { CallEndpoint } from './Endpoint/CallEndpoint.mjs'; import { AdvancedMachineDetection } from './AdvancedMachineDetection.mjs'; import { CommonCallFields } from './CommonCallFields.mjs'; import './Endpoint/PhoneEndpoint.mjs'; import './Endpoint/SIPEndpoint.mjs'; import './Endpoint/VBCEndpoint.mjs'; import './Endpoint/WebsocketEndpoint.mjs'; import './Endpoint/AppEndpoint.mjs'; import '../enums/AdvancedMachineDetectionMode.mjs'; import './Endpoint/PSTNEndpoint.mjs'; /** * Represents common fields for defining an outbound call, including the caller (from) and recipient (to) endpoints, * along with additional call parameters. */ type CommonOutboundCall = Omit<CommonCallFields, 'to'> & { /** * An array of recipient endpoints for the call. */ to: Array<CallEndpoint>; /** * Specifies the behavior for machine detection during the call. */ machineDetection?: MachineDetectionBehavior; /** * Advanced machine detection settings for the call. */ advancedMachineDetection?: AdvancedMachineDetection; /** * The length of time to wait for call answer, in seconds. */ lengthTimer?: number; /** * The length of time to wait for the call to ring before considering it unanswered, in seconds. */ ringingTimer?: number; /** * An array of URLs to notify with call events. */ eventUrl?: string[]; /** * The HTTP method to use when sending events to the specified event URLs. */ eventMethod?: HttpMethod; }; export type { CommonOutboundCall };