UNPKG

@vonage/voice

Version:

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

52 lines (49 loc) 1.79 kB
import { HttpMethod } from '../enums/HttpMethod.js'; import { MachineDetectionBehavior } from '../enums/MachineDetctionBehavior.js'; import { CallEndpoint } from './Endpoint/CallEndpoint.js'; import { AdvancedMachineDetection } from './AdvancedMachineDetection.js'; import { CommonCallFields } from './CommonCallFields.js'; import './Endpoint/PhoneEndpoint.js'; import './Endpoint/SIPEndpoint.js'; import './Endpoint/VBCEndpoint.js'; import './Endpoint/WebsocketEndpoint.js'; import './Endpoint/WebsocketAuthorization.js'; import '../enums/Endpoint/WebsocketBitrate.js'; import './Endpoint/AppEndpoint.js'; import '../enums/AdvancedMachineDetectionMode.js'; import './Endpoint/PSTNEndpoint.js'; /** * 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 };