@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.58 kB
text/typescript
import { AdvancedMachineDetection } from '../AdvancedMachineDetection.mjs';
import { MachineDetection } from '../../enums/NCCO/MachineDetection.mjs';
import { OutboundCall } from '../OutboundCall.mjs';
import '../../enums/AdvancedMachineDetectionMode.mjs';
import '../../enums/MachineDetctionBehavior.mjs';
import '../CallWithAnswerURL.mjs';
import '../CommonOutboundCall.mjs';
import '../../enums/HttpMethod.mjs';
import '../Endpoint/CallEndpoint.mjs';
import '../Endpoint/PhoneEndpoint.mjs';
import '../Endpoint/SIPEndpoint.mjs';
import '../Endpoint/VBCEndpoint.mjs';
import '../Endpoint/WebsocketEndpoint.mjs';
import '../Endpoint/AppEndpoint.mjs';
import '../CommonCallFields.mjs';
import '../Endpoint/PSTNEndpoint.mjs';
import '../CallWithNCCO.mjs';
import '../NCCO/NCCOActions.mjs';
import '../NCCO/RecordAction.mjs';
import '../../enums/NCCOActions.mjs';
import '../../enums/NCCO/RecordingFormat.mjs';
import '../NCCO/ConversationAction.mjs';
import '../NCCO/ConnectAction.mjs';
import '../../enums/NCCO/ConnectEventType.mjs';
import '../NCCO/TalkAction.mjs';
import '../../enums/TTSLanguages.mjs';
import '../NCCO/StreamAction.mjs';
import '../NCCO/InputAction.mjs';
import '../NCCO/DTMFSettings.mjs';
import '../NCCO/SpeechSettings.mjs';
import '../NCCO/NotifyAction.mjs';
/**
* 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 };