Skip to content

Vonage Voice

github-actions edited this page Jul 5, 2024 · 31 revisions

Vonage VoiceDocs


Documentation / Vonage Voice

Vonage Voice

Enumerations

AdvancedMachineDetectionMode

Enum representing different modes for advanced machine detection in the Connect NCCO action.

Enumeration Members

Enumeration Member Value Description Defined in
DETECT "detect" Detect mode, used for advanced machine detection without beep detection. voice/lib/enums/AdvancedMachineDetectionMode.ts:8
DETECTBEEP "detect_beep" Detect beep mode, used for advanced machine detection with beep detection. voice/lib/enums/AdvancedMachineDetectionMode.ts:13

CallDirection

Enum representing the direction of a call, whether it is outbound or inbound.

Enumeration Members

Enumeration Member Value Description Defined in
INBOUND "inbound" Inbound call direction. voice/lib/enums/CallDirection.ts:13
OUTBOUND "outbound" Outbound call direction. voice/lib/enums/CallDirection.ts:8

CallStatus

Enum representing the status of a call, including its various stages and outcomes.

Enumeration Members

Enumeration Member Value Description Defined in
ANSWERED "answered" The call has been answered. voice/lib/enums/CallStatus.ts:18
BUSY "busy" The call is busy. voice/lib/enums/CallStatus.ts:33
CANCELLED "cancelled" The call has been cancelled. voice/lib/enums/CallStatus.ts:38
COMPLETED "completed" The call has been completed. voice/lib/enums/CallStatus.ts:28
FAILED "failed" The call has failed. voice/lib/enums/CallStatus.ts:43
MACHINE "machine" The call has been detected as a machine. voice/lib/enums/CallStatus.ts:23
REJECTED "rejected" The call has been rejected. voice/lib/enums/CallStatus.ts:48
RINGING "ringing" The call is ringing. voice/lib/enums/CallStatus.ts:13
STARTED "started" The call has started. voice/lib/enums/CallStatus.ts:8
TIMEOUT "timeout" The call has timed out. voice/lib/enums/CallStatus.ts:53
UNANSWERED "unanswered" The call went unanswered. voice/lib/enums/CallStatus.ts:58

ConnectEventType

Enum representing different event types for the Connect NCCO action.

Enumeration Members

Enumeration Member Value Description Defined in
SYNCHRONOUS "synchronous" Synchronous event type. voice/lib/enums/NCCO/ConnectEventType.ts:8

HttpMethod

Enum representing HTTP methods used for making web requests.

Enumeration Members

Enumeration Member Value Description Defined in
GET "GET" The HTTP GET method, used for retrieving data from a server. voice/lib/enums/HttpMethod.ts:8
POST "POST" The HTTP POST method, used for sending data to a server to create or update resources. voice/lib/enums/HttpMethod.ts:13

MachineDetection

Enum representing machine detection behavior for the Connect NCCO action.

Enumeration Members

Enumeration Member Value Description Defined in
CONTINUE "continue" Continue with the call if machine detection is triggered. voice/lib/enums/NCCO/MachineDetection.ts:8
HANGUP "hangup" Hang up the call if machine detection is triggered. voice/lib/enums/NCCO/MachineDetection.ts:13

MachineDetectionBehavior

Enum representing the behavior of machine detection in a call.

Enumeration Members

Enumeration Member Value Description Defined in
CONTINUE "continue" Continue the call even if a machine is detected. voice/lib/enums/MachineDetctionBehavior.ts:8
HANGUP "hangup" Hang up the call if a machine is detected. voice/lib/enums/MachineDetctionBehavior.ts:13

NCCOActions

Enum representing the available actions in a Nexmo Call Control Object (NCCO).

Enumeration Members

Enumeration Member Value Description Defined in
CONNECT "connect" Connect the call to an endpoint or multiple endpoints. voice/lib/enums/NCCOActions.ts:8
CONVERSATION "conversation" Start a conversation that can include multiple participants. voice/lib/enums/NCCOActions.ts:13
INPUT "input" Collect input from the caller, including DTMF tones or speech. voice/lib/enums/NCCOActions.ts:18
NOTIFY "notify" Send a notification or message to a specified endpoint. voice/lib/enums/NCCOActions.ts:23
RECORD "record" Record the audio of a call. voice/lib/enums/NCCOActions.ts:28
STREAM "stream" Stream audio to a call. voice/lib/enums/NCCOActions.ts:33
TALK "talk" Play a text-to-speech message to the caller. voice/lib/enums/NCCOActions.ts:38

RecordingFormat

Enum representing different recording formats for the Record NCCO action.

Enumeration Members

Enumeration Member Value Description Defined in
MP3 "mp3" MP3 audio format. voice/lib/enums/NCCO/RecordingFormat.ts:8
OGG "ogg" OGG audio format. voice/lib/enums/NCCO/RecordingFormat.ts:18
WAV "wav" WAV audio format. voice/lib/enums/NCCO/RecordingFormat.ts:13

TTSLanguages

Enum representing the supported Text-to-Speech (TTS) languages for Nexmo's voice calls.

Enumeration Members

Enumeration Member Value Description Defined in
AF_ZA "af-ZA" Afrikaans (af-ZA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:8
AR "ar" Arabic (ar) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:13
BG_BG "bg-BG" Bulgarian (bg-BG) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:18
BN_IN "bn-IN" Bengali (bn-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:23
CA_ES "ca-ES" Catalan, Valencian (ca-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:28
CMN_CN "cmn-CN" China Chinese, Mandarin (cmn-CN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:33
CMN_TW "cmn-TW" Taiwan Chinese, Mandarin (cmn-TW) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:38
CS_CZ "cs-CZ" Czech (cs-CZ) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:43
CY_GB "cy-GB" Welsh (cy-GB) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:48
DA_DK "da-DK" Danish (da-DK) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:53
DE_AT "de-AT" Austria German (de-AT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:58
DE_DE "de-DE" German (de-DE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:63
EL_GR "el-GR" Greek (el-GR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:68
EN_AU "en-AU" Australia English (en-AU) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:73
EN_GB "en-GB" United Kingdom English (en-GB) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:78
EN_GB_SCT "en-GB-SCT" Scotland English (en-GB-SCT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:83
EN_GB_WLS "en-GB-WLS" Wales English (en-GB-WLS) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:88
EN_IE "en-IE" Ireland English (en-IE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:93
EN_IN "en-IN" India English (en-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:98
EN_NZ "en-NZ" New Zealand English (en-NZ) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:103
EN_US "en-US" United States English (en-US) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:108
EN_ZA "en-ZA" South Africa English (en-ZA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:113
ES_CO "es-CO" Colombia Spanish (es-CO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:118
ES_ES "es-ES" Spain Spanish (es-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:123
ES_MX "es-MX" Mexico Spanish (es-MX) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:128
ES_US "es-US" United States Spanish (es-US) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:133
EU_ES "eu-ES" Basque (eu-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:138
FIL_PH "fil-PH" Filipino (fil-PH) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:148
FI_FI "fi-FI" Finnish (fi-FI) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:143
FR_CA "fr-CA" Canada French (fr-CA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:153
FR_FR "fr-FR" France French (fr-FR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:158
GL_ES "gl-ES" Spain Galician (gl-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:163
GU_IN "gu-IN" Gujarati (gu-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:168
HE_IL "he-IL" Hebrew (he-IL) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:173
HI_IN "hi-IN" Hindi (hi-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:178
HU_HU "hu-HU" Hungarian (hu-HU) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:183
ID_ID "id-ID" Indonesian (id-ID) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:188
IS_IS "is-IS" Icelandic (is-IS) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:193
IT_IT "it-IT" Italian (it-IT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:198
JA_JP "ja-JP" Japanese (ja-JP) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:203
KN_IN "kn-IN" Kannada (kn-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:208
KO_KR "ko-KR" Korean (ko-KR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:213
LV_LV "lv-LV" Latvian (lv-LV) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:218
ML_IN "ml-IN" Malayalam (ml-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:223
MS_MY "ms-MY" Malay (ms-MY) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:228
NB_NO "nb-NO" Norwegian (nb-NO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:233
NL_BE "nl-BE" Belgium Dutch (nl-BE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:238
NL_NL "nl-NL" Netherlands Dutch (nl-NL) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:243
NO_NO "no-NO" Norwegian (no-NO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:248
PA_IN "pa-IN" Punjabi (pa-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:253
PL_PL "pl-PL" Polish (pl-PL) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:258
PT_BR "pt-BR" Brazil Portuguese (pt-BR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:263
PT_PT "pt-PT" Portugal Portuguese (pt-PT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:268
RO_RO "ro-RO" Romanian (ro-RO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:273
RU_RU "ru-RU" Russian (ru-RU) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:278
SK_SK "sk-SK" Slovak (sk-SK) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:283
SR_RS "sr-RS" Serbian (sr-RS) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:288
SV_SE "sv-SE" Swedish (sv-SE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:293
TA_IN "ta-IN" Tamil (ta-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:298
TE_IN "te-IN" Telugu (te-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:303
TH_TH "th-TH" Thai (th-TH) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:308
TR_TR "tr-TR" Turkish (tr-TR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:313
UK_UA "uk-UA" Ukrainian (uk-UA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:318
VI_VN "vi-VN" Vietnamese (vi-VN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:323
YUE_CN "yue-CN" China Chinese, Cantonese (yue-CN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:328

TTSVoices

Enum representing supported Text-to-Speech (TTS) voices.

Enumeration Members

Enumeration Member Value Description Defined in
ADITI "Aditi" Aditi - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:8
AGNIESZKA "Agnieszka" Agnieszka - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:13
ALVA "Alva" Alva - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:18
AMY "Amy" Amy - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:23
ASTRID "Astrid" Astrid - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:28
BIANCA "Bianca" Bianca - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:33
BRIAN "Brian" Brian - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:38
CARLA "Carla" Carla - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:43
CARMEN "Carmen" Carmen - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:48
CARMIT "Carmit" Carmit - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:53
CATARINA "Catarina" Catarina - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:58
CELINE "Celine" Celine - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:63
CEM "Cem" Cem - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:68
CHANTAL "Chantal" Chantal - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:73
CHIPMUNK "Chipmunk" Chipmunk - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:78
CONCHITA "Conchita" Conchita - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:83
CRISTIANO "Cristiano" Cristiano - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:88
DAMAYANTI "Damayanti" Damayanti - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:93
DORA "Dora" Dora - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:98
EMMA "Emma" Emma - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:103
EMPAR "Empar" Empar - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:108
ENRIQUE "Enrique" Enrique - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:113
ERIC "Eric" Eric - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:118
EWA "Ewa" Ewa - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:123
FELIPE "Felipe" Felipe - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:128
FILIZ "Filiz" Filiz - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:133
GERAINT "Geraint" Geraint - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:138
GIORGIO "Giorgio" Giorgio - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:143
GWYNETH "Gwyneth" Gwyneth - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:148
HANS "Hans" Hans - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:153
HENRIK "Henrik" Henrik - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:158
INES "Ines" Ines - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:163
IOANA "Ioana" Ioana - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:168
IVETA "Iveta" Iveta - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:173
IVY "Ivy" Ivy - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:178
JACEK "Jacek" Jacek - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:183
JAN "Jan" Jan - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:188
JENNIFER "Jennifer" Jennifer - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:193
JOANA "Joana" Joana - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:198
JOANNA "Joanna" Joanna - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:203
JOEY "Joey" Joey - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:208
JORDI "Jordi" Jordi - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:213
JUSTIN "Justin" Justin - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:218
KANYA "Kanya" Kanya - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:223
KARL "Karl" Karl - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:228
KENDRA "Kendra" Kendra - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:233
KIMBERLY "Kimberly" Kimberly - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:238
LAILA "Laila" Laila - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:243
LAURA "Laura" Laura - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:248
LEA "Lea" Lea - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:253
LEKHA "Lekha" Lekha - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:258
LIV "Liv" Liv - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:263
LOTTE "Lotte" Lotte - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:268
LUCIA "Lucia" Lucia - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:273
LUCIANA "Luciana" Luciana - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:278
MADS "Mads" Mads - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:283
MAGED "Maged" Maged - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:288
MAJA "Maja" Maja - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:293
MARISKA "Mariska" Mariska - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:298
MARLENE "Marlene" Marlene - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:303
MATHIEU "Mathieu" Mathieu - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:308
MATTHEW "Matthew" Matthew - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:313
MAXIM "Maxim" Maxim - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:318
MEI_JIA "Mei-Jia" Mei-Jia - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:323
MELINA "Melina" Melina - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:328
MIA "Mia" Mia - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:333
MIGUEL "Miguel" Miguel - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:338
MIREN "Miren" Miren - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:343
MIZUKI "Mizuki" Mizuki - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:348
MONTSERRAT "Montserrat" Montserrat - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:353
NAJA "Naja" Naja - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:358
NICOLE "Nicole" Nicole - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:363
NIKOS "Nikos" Nikos - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:368
NORA "Nora" Nora - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:373
OSKAR "Oskar" Oskar - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:378
PENELOPE "Penelope" Penelope - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:383
RAVEENA "Raveena" Raveena - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:388
RICARDO "Ricardo" Ricardo - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:393
RUBEN "Ruben" Ruben - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:398
RUSSELL "Russell" Russell - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:403
SALLI "Salli" Salli - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:408
SATU "Satu" Satu - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:413
SEOYEON "Seoyeon" Seoyeon - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:418
SIN_JI "Sin-Ji" Sin-Ji - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:423
SORA "Sora" Sora - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:428
TAKUMI "Takumi" Takumi - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:433
TARIK "Tarik" Tarik - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:438
TATYANA "Tatyana" Tatyana - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:443
TESSA "Tessa" Tessa - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:448
TIAN_TIAN "Tian-Tian" Tian-Tian - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:453
VICKI "Vicki" Vicki - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:458
VITORIA "Vitoria" Vitoria - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:463
YELDA "Yelda" Yelda - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:468
ZEINA "Zeina" Zeina - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:473
ZHIYU "Zhiyu" Zhiyu - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:478
ZUZANA "Zuzana" Zuzana - Supported Text-to-Speech (TTS) voice. voice/lib/enums/TTSVoices.ts:483

WebsocketBitrate

Enum representing different bitrate options for audio in a WebSocket configuration.

Enumeration Members

Enumeration Member Value Description Defined in
RATE_16000 "audio/l16;rate=16000" Audio bitrate at 16000 samples per second. voice/lib/enums/Endpoint/WebsocketBitrate.ts:13
RATE_8000 "audio/l16;rate=8000" Audio bitrate at 8000 samples per second. voice/lib/enums/Endpoint/WebsocketBitrate.ts:8

Classes

Connect

Represents a Connect action in the Nexmo Call Control Object (NCCO) for making voice calls.

Implements

  • ConnectAction
  • Serializable

Constructors

new Connect()
new Connect(
   endpoint, 
   from?, 
   randomFromNumber?, 
   eventType?, 
   timeout?, 
   limit?, 
   machineDetection?, 
   eventUrl?, 
   eventMethod?, 
   ringbackTone?): Connect

Create a new Connect instance.

Parameters

endpoint: CallEndpoint

An array of CallEndpoint objects representing the endpoints to connect to in the call.

from?: string

The caller's phone number to display as the caller ID.

randomFromNumber?: boolean

Set to true to use a random phone number as the caller ID.

eventType?: ConnectEventType

The event type for call progress events.

timeout?: number

The timeout value in seconds.

limit?: number

The maximum number of concurrent calls.

machineDetection?: MachineDetection

The behavior when voicemail is detected.

eventUrl?: string

An array of event URLs.

eventMethod?: string

The HTTP method used for event callbacks.

ringbackTone?: string

The URL of the ringback tone audio file.

Returns

Connect

Defined in

voice/lib/classes/NCCO/Connect.ts:104

Properties

action
action: CONNECT = NCCOActions.CONNECT;

The action type, which is always 'connect'.

Implementation of

ConnectAction.action

Defined in

voice/lib/classes/NCCO/Connect.ts:15

endpoint
endpoint: CallEndpoint[];

An array of CallEndpoint objects representing the endpoints to connect to in the call.

Param

An array of CallEndpoint objects representing the endpoints to connect to in the call.

Implementation of

ConnectAction.endpoint

Defined in

voice/lib/classes/NCCO/Connect.ts:23

eventMethod?
optional eventMethod: string;

The HTTP method used to send event information to the event URL(s).

Param

The HTTP method used for event callbacks.

Implementation of

ConnectAction.eventMethod

Defined in

voice/lib/classes/NCCO/Connect.ts:80

eventType?
optional eventType: ConnectEventType;

The event type for call progress events sent to the specified event URL.

Param

The event type for call progress events.

Implementation of

ConnectAction.eventType

Defined in

voice/lib/classes/NCCO/Connect.ts:45

eventUrl?
optional eventUrl: string[];

An array of event URLs where call progress events are sent to. Multiple URLs can be specified.

Param

An array of event URLs.

Implementation of

ConnectAction.eventUrl

Defined in

voice/lib/classes/NCCO/Connect.ts:73

from?
optional from: string;

The caller's phone number to display as the caller ID.

Param

The caller's phone number to display as the caller ID.

Implementation of

ConnectAction.from

Defined in

voice/lib/classes/NCCO/Connect.ts:30

limit?
optional limit: number;

The maximum number of concurrent calls that can be handled by your application.

Param

The maximum number of concurrent calls.

Implementation of

ConnectAction.limit

Defined in

voice/lib/classes/NCCO/Connect.ts:59

machineDetection?
optional machineDetection: MachineDetection;

Configure the behavior when Vonage detects that the call is answered by voicemail.

Param

The behavior when voicemail is detected.

Implementation of

ConnectAction.machineDetection

Defined in

voice/lib/classes/NCCO/Connect.ts:66

randomFromNumber?
optional randomFromNumber: boolean;

Set to true to use a random phone number as the caller ID from the list of numbers assigned to the current application.

Param

Set to true to use a random phone number as the caller ID.

Implementation of

ConnectAction.randomFromNumber

Defined in

voice/lib/classes/NCCO/Connect.ts:38

ringbackTone?
optional ringbackTone: string;

The URL of a ringback tone to play to the caller while waiting for the call to be answered.

Param

The URL of the ringback tone audio file.

Implementation of

ConnectAction.ringbackTone

Defined in

voice/lib/classes/NCCO/Connect.ts:87

timeout?
optional timeout: number;

The time in seconds that Vonage waits for the call to be answered before timing out.

Param

The timeout value in seconds.

Implementation of

ConnectAction.timeout

Defined in

voice/lib/classes/NCCO/Connect.ts:52

Methods

serializeToNCCO()
serializeToNCCO(): ConnectAction

Serialize the Connect action to a Nexmo Call Control Object (NCCO) format.

Returns

ConnectAction

  • The serialized Connect action.
Implementation of

Serializable.serializeToNCCO

Defined in

voice/lib/classes/NCCO/Connect.ts:152


Conversation

Represents a Conversation action in the Nexmo Call Control Object (NCCO) for managing audio conferences.

Implements

Constructors

new Conversation()
new Conversation(
   name, 
   musicOnHoldUrl?, 
   startOnEnter?, 
   endOnExit?, 
   record?, 
   canSpeak?, 
   canHear?, 
   mute?): Conversation

Create a new Conversation instance.

Parameters

name: string

The name of the conversation.

musicOnHoldUrl?: string

An array of music on hold URLs.

startOnEnter?: boolean

Set to true to start the conversation on participant enter.

endOnExit?: boolean

Set to true to end the conversation on last participant exit.

record?: boolean

Set to true to record the conversation.

canSpeak?: string[]

An array of participant IDs who can speak in the conversation.

canHear?: string[]

An array of participant IDs who can hear in the conversation.

mute?: boolean

Set to true to mute all participants in the conversation.

Returns

Conversation

Defined in

voice/lib/classes/NCCO/Conversation.ts:82

Properties

action
action: CONVERSATION = NCCOActions.CONVERSATION;

The action type, which is always 'conversation'.

Implementation of

ConversationAction.action

Defined in

voice/lib/classes/NCCO/Conversation.ts:12

canHear?
optional canHear: string[];

An array of participant IDs (e.g., phone numbers) who can hear in the conversation.

Param

An array of participant IDs who can hear in the conversation.

Implementation of

ConversationAction.canHear

Defined in

voice/lib/classes/NCCO/Conversation.ts:61

canSpeak?
optional canSpeak: string[];

An array of participant IDs (e.g., phone numbers) who can speak in the conversation.

Param

An array of participant IDs who can speak in the conversation.

Implementation of

ConversationAction.canSpeak

Defined in

voice/lib/classes/NCCO/Conversation.ts:54

endOnExit?
optional endOnExit: boolean;

Set to true to end the conversation when the last participant exits.

Param

Set to true to end the conversation on last participant exit.

Implementation of

ConversationAction.endOnExit

Defined in

voice/lib/classes/NCCO/Conversation.ts:40

musicOnHoldUrl?
optional musicOnHoldUrl: string[];

An array of URLs for music to be played while participants are on hold.

Param

An array of music on hold URLs.

Implementation of

ConversationAction.musicOnHoldUrl

Defined in

voice/lib/classes/NCCO/Conversation.ts:26

mute?
optional mute: boolean;

Set to true to mute all participants in the conversation.

Param

Set to true to mute all participants in the conversation.

Implementation of

ConversationAction.mute

Defined in

voice/lib/classes/NCCO/Conversation.ts:68

name
name: string;

The name of the conversation.

Param

The name of the conversation.

Implementation of

ConversationAction.name

Defined in

voice/lib/classes/NCCO/Conversation.ts:19

record?
optional record: boolean;

Set to true to record the conversation.

Param

Set to true to record the conversation.

Implementation of

ConversationAction.record

Defined in

voice/lib/classes/NCCO/Conversation.ts:47

startOnEnter?
optional startOnEnter: boolean;

Set to true to start the conversation when a participant enters.

Param

Set to true to start the conversation on participant enter.

Implementation of

ConversationAction.startOnEnter

Defined in

voice/lib/classes/NCCO/Conversation.ts:33

Methods

serializeToNCCO()
serializeToNCCO(): ConversationAction

Serialize the Conversation action to a Nexmo Call Control Object (NCCO) format.

Returns

ConversationAction

  • The serialized Conversation action.
Implementation of

Serializable.serializeToNCCO

Defined in

voice/lib/classes/NCCO/Conversation.ts:122


Input

Represents an Input action in the Nexmo Call Control Object (NCCO) for gathering user input.

Implements

  • InputAction
  • Serializable

Constructors

new Input()
new Input(
   dtmf?, 
   speech?, 
   eventUrl?, 
   eventMethod?): Input

Create a new Input instance.

Parameters

dtmf?: DTMFSettings

DTMF input settings.

speech?: SpeechSettings

Speech input settings.

eventUrl?: string

URL to send events to asynchronously.

eventMethod?: string

The HTTP method used to send events.

Returns

Input

Defined in

voice/lib/classes/NCCO/Input.ts:49

Properties

action
action: INPUT = NCCOActions.INPUT;

The action type, which is always 'input'.

Implementation of

InputAction.action

Defined in

voice/lib/classes/NCCO/Input.ts:14

dtmf?
optional dtmf: DTMFSettings;

DTMF input settings.

Implementation of

InputAction.dtmf

Defined in

voice/lib/classes/NCCO/Input.ts:24

eventMethod?
optional eventMethod: string;

The HTTP method used to send events (e.g., 'POST' or 'GET').

Implementation of

InputAction.eventMethod

Defined in

voice/lib/classes/NCCO/Input.ts:39

eventUrl?
optional eventUrl: string[] = [];

An array of URLs to send events to asynchronously.

Implementation of

InputAction.eventUrl

Defined in

voice/lib/classes/NCCO/Input.ts:34

speech?
optional speech: SpeechSettings;

Speech input settings.

Implementation of

InputAction.speech

Defined in

voice/lib/classes/NCCO/Input.ts:29

type
type: string[] = [];

An array of input types ('dtmf' and/or 'speech').

Implementation of

InputAction.type

Defined in

voice/lib/classes/NCCO/Input.ts:19

Methods

serializeToNCCO()
serializeToNCCO(): InputAction

Serialize the Input action to a Nexmo Call Control Object (NCCO) format.

Returns

InputAction

  • The serialized Input action.
Implementation of

Serializable.serializeToNCCO

Defined in

voice/lib/classes/NCCO/Input.ts:85


NCCOBuilder

A builder class for creating Nexmo Call Control Objects (NCCOs).

Constructors

new NCCOBuilder()
new NCCOBuilder(): NCCOBuilder
Returns

NCCOBuilder

Properties

actions
protected actions: NCCOAction[] = [];
Defined in

voice/lib/classes/NCCO/NCCOBuilder.ts:8

Methods

addAction()
addAction(action): NCCOBuilder

Add an action to the NCCO builder.

Parameters

action: NCCOAction

The action to add to the NCCO.

Returns

NCCOBuilder

  • The NCCO builder instance (for method chaining).
Defined in

voice/lib/classes/NCCO/NCCOBuilder.ts:16

build()
build(): NCCOAction[]

Build the NCCO by serializing the added actions.

Returns

NCCOAction[]

  • The built NCCO, which is an array of actions.
Defined in

voice/lib/classes/NCCO/NCCOBuilder.ts:31


Notify

Represents a Notify action in an NCCO.

Implements

  • NotifyAction
  • Serializable

Constructors

new Notify()
new Notify(
   payload, 
   eventUrl, 
   eventMethod?): Notify

Creates a new Notify action.

Parameters

payload

The payload data to send with the notification.

eventUrl: string

The URL where the notification events will be sent.

eventMethod?: string

The HTTP method for sending notification events (e.g., "POST").

Returns

Notify

Defined in

voice/lib/classes/NCCO/Notify.ts:23

Properties

action
action: NOTIFY = NCCOActions.NOTIFY;

The action type, which should be set to 'notify'.

Implementation of

NotifyAction.action

Defined in

voice/lib/classes/NCCO/Notify.ts:9

eventMethod?
optional eventMethod: string;

(Optional) The HTTP method used for sending the notification to the event URLs. If not specified, the default HTTP method is used.

Implementation of

NotifyAction.eventMethod

Defined in

voice/lib/classes/NCCO/Notify.ts:14

eventUrl
eventUrl: string[];

An array of event URLs to which the notification will be sent.

Implementation of

NotifyAction.eventUrl

Defined in

voice/lib/classes/NCCO/Notify.ts:13

payload
payload: object;

The payload to be sent as part of the notification. It is a key-value pair object where the keys and values are both strings.

Index Signature

[key: string]: string

Implementation of

NotifyAction.payload

Defined in

voice/lib/classes/NCCO/Notify.ts:10

Methods

serializeToNCCO()
serializeToNCCO(): NotifyAction

Serialize the Notify action to an NCCO-compatible format.

Returns

NotifyAction

  • The serialized Notify action.
Implementation of

Serializable.serializeToNCCO

Defined in

voice/lib/classes/NCCO/Notify.ts:41


OutboundCallWithAnswerURL

Represents an outbound call with an answer URL.

Deprecated

This class is deprecated. Please update to use the CallWithAnswerURL type

Extends

  • OutboundCall

Constructors

new OutboundCallWithAnswerURL()
new OutboundCallWithAnswerURL(
   answerUrl, 
   to, 
   from?): OutboundCallWithAnswerURL

Creates a new outbound call with an answer URL.

Parameters

answerUrl: string

The answer URL for the call.

to: CallEndpoint

The call endpoint to which the outbound call will be made.

from?: PhoneEndpoint

The phone endpoint object representing the caller's information.

Returns

OutboundCallWithAnswerURL

Overrides

OutboundCall.constructor

Defined in

voice/lib/classes/OutboundCallWithAnswerURL.ts:38

Properties

answerUrl
answerUrl: string[];

The list of answer URLs.

Deprecated

Use answer_url instead.

Defined in

voice/lib/classes/OutboundCallWithAnswerURL.ts:29

answer_url
answer_url: string[];

The list of answer URLs.

Defined in

voice/lib/classes/OutboundCallWithAnswerURL.ts:22

eventMethod?
optional eventMethod: HttpMethod;

The HTTP method to use for event notifications (optional).

Inherited from

OutboundCall.eventMethod

Defined in

voice/lib/classes/OutboundCall.ts:39

eventUrl?
optional eventUrl: string[];

The list of event URLs (optional).

Inherited from

OutboundCall.eventUrl

Defined in

voice/lib/classes/OutboundCall.ts:34

from?
optional from: PhoneEndpoint;

The phone endpoint object representing the caller's information.

Inherited from

OutboundCall.from

Defined in

voice/lib/classes/OutboundCall.ts:24

lengthTimer?
optional lengthTimer: number;

The length timer for the call (optional).

Inherited from

OutboundCall.lengthTimer

Defined in

voice/lib/classes/OutboundCall.ts:49

machineDetection?
optional machineDetection: MachineDetectionBehavior;

The machine detection behavior (optional).

Inherited from

OutboundCall.machineDetection

Defined in

voice/lib/classes/OutboundCall.ts:44

randomFromNumber?
optional randomFromNumber: boolean;

Indicates whether to use a random from number (optional).

Inherited from

OutboundCall.randomFromNumber

Defined in

voice/lib/classes/OutboundCall.ts:29

ringingTimer?
optional ringingTimer: number;

The ringing timer for the call (optional).

Inherited from

OutboundCall.ringingTimer

Defined in

voice/lib/classes/OutboundCall.ts:54

to
to: CallEndpoint[];

The list of call endpoints to which the outbound call will be made.

Inherited from

OutboundCall.to

Defined in

voice/lib/classes/OutboundCall.ts:19


OutboundCallWithNCCO

Represents an outbound call with NCCO (Nexmo Call Control Object).

Deprecated

This class is deprecated. Please update to use the CallWithNCCO type

Extends

  • OutboundCall

Constructors

new OutboundCallWithNCCO()
new OutboundCallWithNCCO(
   ncco, 
   to, 
   from?): OutboundCallWithNCCO

Creates a new outbound call with NCCO.

Parameters

ncco: NCCOAction[]

The NCCO actions for the call.

to: CallEndpoint

The call endpoint to which the outbound call will be made.

from?: PhoneEndpoint

The phone endpoint object representing the caller's information.

Returns

OutboundCallWithNCCO

Overrides

OutboundCall.constructor

Defined in

voice/lib/classes/OutboundCallWithNCCO.ts:30

Properties

eventMethod?
optional eventMethod: HttpMethod;

The HTTP method to use for event notifications (optional).

Inherited from

OutboundCall.eventMethod

Defined in

voice/lib/classes/OutboundCall.ts:39

eventUrl?
optional eventUrl: string[];

The list of event URLs (optional).

Inherited from

OutboundCall.eventUrl

Defined in

voice/lib/classes/OutboundCall.ts:34

from?
optional from: PhoneEndpoint;

The phone endpoint object representing the caller's information.

Inherited from

OutboundCall.from

Defined in

voice/lib/classes/OutboundCall.ts:24

lengthTimer?
optional lengthTimer: number;

The length timer for the call (optional).

Inherited from

OutboundCall.lengthTimer

Defined in

voice/lib/classes/OutboundCall.ts:49

machineDetection?
optional machineDetection: MachineDetectionBehavior;

The machine detection behavior (optional).

Inherited from

OutboundCall.machineDetection

Defined in

voice/lib/classes/OutboundCall.ts:44

ncco
ncco: NCCOAction[];

The list of NCCO actions.

Defined in

voice/lib/classes/OutboundCallWithNCCO.ts:21

randomFromNumber?
optional randomFromNumber: boolean;

Indicates whether to use a random from number (optional).

Inherited from

OutboundCall.randomFromNumber

Defined in

voice/lib/classes/OutboundCall.ts:29

ringingTimer?
optional ringingTimer: number;

The ringing timer for the call (optional).

Inherited from

OutboundCall.ringingTimer

Defined in

voice/lib/classes/OutboundCall.ts:54

to
to: CallEndpoint[];

The list of call endpoints to which the outbound call will be made.

Inherited from

OutboundCall.to

Defined in

voice/lib/classes/OutboundCall.ts:19


Record

Represents a Record action in an NCCO.

Implements

  • RecordAction

Constructors

new Record()
new Record(
   format?, 
   split?, 
   channels?, 
   endOnSilence?, 
   endOnKey?, 
   timeout?, 
   beepStart?, 
   eventUrl?, 
   eventMethod?): Record

Creates a new Record action.

Parameters

format?: RecordingFormat

The recording format (e.g., "mp3", "wav").

split?: string

The split type for recording (should be "conversation").

channels?: number

The number of audio channels (1 to 32).

endOnSilence?: number

The duration of silence (in seconds) to end the recording (3 to 10 seconds).

endOnKey?: string

The DTMF key that ends the recording (e.g., "0", "*", "#").

timeout?: number

The maximum recording duration in seconds (3 to 7200 seconds).

beepStart?: boolean

Whether to play a beep before recording starts.

eventUrl?: string

The URL where recording events will be sent.

eventMethod?: string

The HTTP method for sending recording events (e.g., "POST").

Returns

Record

Defined in

voice/lib/classes/NCCO/Record.ts:72

Properties

action
action: RECORD = NCCOActions.RECORD;

The action type for the Record action.

Implementation of

RecordAction.action

Defined in

voice/lib/classes/NCCO/Record.ts:12

beepStart?
optional beepStart: boolean;

Whether to play a beep before recording starts.

Implementation of

RecordAction.beepStart

Defined in

voice/lib/classes/NCCO/Record.ts:47

eventMethod?
optional eventMethod: string;

The HTTP method for sending recording events (e.g., "POST").

Implementation of

RecordAction.eventMethod

Defined in

voice/lib/classes/NCCO/Record.ts:57

eventUrl?
optional eventUrl: string[];

The URL where recording events will be sent.

Implementation of

RecordAction.eventUrl

Defined in

voice/lib/classes/NCCO/Record.ts:52

format?
optional format: RecordingFormat;

The recording format (e.g., "mp3", "wav").

Implementation of

RecordAction.format

Defined in

voice/lib/classes/NCCO/Record.ts:17

wrappedChannels?
protected optional wrappedChannels: number;

The number of audio channels (1 to 32).

Defined in

voice/lib/classes/NCCO/Record.ts:27

wrappedEndOnKey?
protected optional wrappedEndOnKey: string;

The DTMF key that ends the recording (e.g., "0", "*", "#").

Defined in

voice/lib/classes/NCCO/Record.ts:37

wrappedEndOnSilence?
protected optional wrappedEndOnSilence: number;

The duration of silence (in seconds) to end the recording (3 to 10 seconds).

Defined in

voice/lib/classes/NCCO/Record.ts:32

wrappedSplit?
protected optional wrappedSplit: string;

The split type for recording (always "conversation").

Defined in

voice/lib/classes/NCCO/Record.ts:22

wrappedTimeOut?
protected optional wrappedTimeOut: number;

The maximum recording duration in seconds (3 to 7200 seconds).

Defined in

voice/lib/classes/NCCO/Record.ts:42

Accessors

channels
get channels(): undefined | number

Getter for the number of audio channels.

set channels(channels): void

Setter for the number of audio channels.

Throws
  • If the channel value is invalid or split is not set to "conversation."
Parameters

channels: number

The number of audio channels (1 to 32).

Returns

undefined | number

  • The current number of audio channels.
Implementation of

RecordAction.channels

Defined in

voice/lib/classes/NCCO/Record.ts:117

endOnKey
get endOnKey(): undefined | string

Getter for the character that signals the end of recording.

set endOnKey(character): void

Setter for the DTMF key that ends the recording.

Throws
  • If the character is not a valid DTMF key.
Parameters

character: string

The DTMF key that ends the recording (e.g., "0", "*", "#").

Returns

undefined | string

  • The character that signals the end of recording.
Implementation of

RecordAction.endOnKey

Defined in

voice/lib/classes/NCCO/Record.ts:146

endOnSilence
get endOnSilence(): undefined | number

Getter for the duration of silence (in seconds) that signals the end of recording.

set endOnSilence(numSeconds): void

Setter for the duration of silence to end the recording.

Throws
  • If the duration value is out of the valid range.
Parameters

numSeconds: number

The duration of silence in seconds (3 to 10 seconds).

Returns

undefined | number

  • The duration of silence (in seconds) that signals the end of recording.
Implementation of

RecordAction.endOnSilence

Defined in

voice/lib/classes/NCCO/Record.ts:170

split
get split(): "conversation"

Getter for the recording split type.

set split(splitType): void

Setter for the recording split type.

Throws
  • Throws an error if the splitType is not 'conversation'.
Parameters

splitType: string

The recording split type. Must be set to 'conversation'.

Returns

"conversation"

  • The recording split type, which is always 'conversation'.
Implementation of

RecordAction.split

Defined in

voice/lib/classes/NCCO/Record.ts:195

timeout
get timeout(): undefined | number

Getter for the recording timeout duration in seconds.

set timeout(seconds): void

Setter for the recording timeout.

Throws
  • If the timeout value is out of the valid range.
Parameters

seconds: number

The maximum recording duration in seconds (3 to 7200 seconds).

Returns

undefined | number

  • The recording timeout duration in seconds.
Defined in

voice/lib/classes/NCCO/Record.ts:218

Methods

serializeToNCCO()
serializeToNCCO(): RecordAction

Serializes the Record action to NCCO format.

Returns

RecordAction

  • The serialized Record action.
Defined in

voice/lib/classes/NCCO/Record.ts:243


Stream

Represents a Stream action in a Nexmo Call Control Object (NCCO).

This action allows streaming audio into the call.

Implements

Constructors

new Stream()
new Stream(
   streamUrl, 
   level?, 
   bargeIn?, 
   loop?): Stream

Creates a new Stream action.

Parameters

streamUrl: string

The URL of the audio stream.

level?: number

The audio level at which to play the stream (optional).

bargeIn?: boolean

Indicates whether the stream should allow barge-in (optional).

loop?: number

The number of times to loop the audio (optional).

Returns

Stream

Defined in

voice/lib/classes/NCCO/Stream.ts:44

Properties

action
action: STREAM = NCCOActions.STREAM;

The action type for this NCCO action.

Implementation of

StreamAction.action

Defined in

voice/lib/classes/NCCO/Stream.ts:14

bargeIn?
optional bargeIn: boolean;

Indicates whether the stream should allow barge-in (optional).

Implementation of

StreamAction.bargeIn

Defined in

voice/lib/classes/NCCO/Stream.ts:29

level?
optional level: number;

The audio level at which to play the stream (optional).

Implementation of

StreamAction.level

Defined in

voice/lib/classes/NCCO/Stream.ts:24

loop?
optional loop: number;

The number of times to loop the audio (optional).

Implementation of

StreamAction.loop

Defined in

voice/lib/classes/NCCO/Stream.ts:34

streamUrl
streamUrl: string[];

An array of stream URLs to play audio from.

Implementation of

StreamAction.streamUrl

Defined in

voice/lib/classes/NCCO/Stream.ts:19

Methods

serializeToNCCO()
serializeToNCCO(): StreamAction

Serializes the Stream action to a Nexmo Call Control Object (NCCO).

Returns

StreamAction

  • The serialized Stream action.
Implementation of

Serializable.serializeToNCCO

Defined in

voice/lib/classes/NCCO/Stream.ts:68


Talk

Represents a Talk action in a Nexmo Call Control Object (NCCO).

This action allows the text-to-speech (TTS) synthesis of spoken words in the call.

Implements

  • TalkAction
  • Serializable

Constructors

new Talk()
new Talk(
   text, 
   bargeIn?, 
   loop?, 
   level?, 
   language?, 
   style?, 
   premium?): Talk

Creates a new Talk action.

Parameters

text: string

The text to be spoken during the call.

bargeIn?: boolean

Indicates whether the talk action allows barge-in (optional).

loop?: number

The number of times to loop the speech (optional).

level?: string

The audio level at which to play the speech (optional).

language?: string

The language for the text-to-speech synthesis (optional).

style?: string

The speech style (optional).

premium?: boolean

Indicates whether to use premium text-to-speech (optional).

Returns

Talk

Defined in

voice/lib/classes/NCCO/Talk.ts:62

Properties

action
action: TALK = NCCOActions.TALK;

The action type for this NCCO action.

Implementation of

TalkAction.action

Defined in

voice/lib/classes/NCCO/Talk.ts:14

bargeIn?
optional bargeIn: boolean;

Indicates whether the talk action allows barge-in (optional).

Implementation of

TalkAction.bargeIn

Defined in

voice/lib/classes/NCCO/Talk.ts:24

language?
optional language: string;

The language for the text-to-speech synthesis (optional).

Implementation of

TalkAction.language

Defined in

voice/lib/classes/NCCO/Talk.ts:39

level?
optional level: string;

The audio level at which to play the speech (optional).

Implementation of

TalkAction.level

Defined in

voice/lib/classes/NCCO/Talk.ts:34

loop?
optional loop: number;

The number of times to loop the speech (optional).

Implementation of

TalkAction.loop

Defined in

voice/lib/classes/NCCO/Talk.ts:29

premium?
optional premium: boolean;

Indicates whether to use premium text-to-speech (optional).

Implementation of

TalkAction.premium

Defined in

voice/lib/classes/NCCO/Talk.ts:49

style?
optional style: string;

The speech style (optional).

Implementation of

TalkAction.style

Defined in

voice/lib/classes/NCCO/Talk.ts:44

text
text: string;

The text to be spoken during the call.

Implementation of

TalkAction.text

Defined in

voice/lib/classes/NCCO/Talk.ts:19

Methods

serializeToNCCO()
serializeToNCCO(): TalkAction

Serializes the Talk action to a Nexmo Call Control Object (NCCO).

Returns

TalkAction

  • The serialized Talk action.
Implementation of

Serializable.serializeToNCCO

Defined in

voice/lib/classes/NCCO/Talk.ts:98


Voice

A Clint to make calls to the Vonage Voice API.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Examples

Create a standalone Voice client

import { Voice } from '@vonage/voice';

const voiceClient = new Voice({
 apiKey: VONAGE_API_KEY,
 apiSecret: VONAGE_API_SECRET
});

Create an Voice client from the Vonage client

import { Vonage } from '@vonage/server-client';

const vonage = new Vonage({
  apiKey: VONAGE_API_KEY,
  apiSecret: VONAGE_API_SECRET
});

const voiceClient = vonage.voice;

Extends

Constructors

new Voice()
new Voice(credentials, options?): Voice

Creates a new instance of the Client.

Parameters

credentials: AuthInterface | AuthParams

The authentication credentials or an authentication instance.

options?: ConfigParams

Optional configuration settings for the client.

Returns

Voice

Inherited from

Client.constructor

Defined in

server-client/dist/client.d.ts:30

Properties

auth
protected auth: AuthInterface;

The authentication instance responsible for generating authentication headers and query parameters.

Inherited from

Client.auth

Defined in

server-client/dist/client.d.ts:19

authType
protected authType: AuthenticationType = AuthenticationType.JWT;

The type of authentication used for the client's requests.

Overrides

Client.authType

Defined in

voice/lib/voice.ts:73

config
protected config: ConfigParams;

Configuration settings for the client, including default hosts for various services and other request settings.

Inherited from

Client.config

Defined in

server-client/dist/client.d.ts:23

transformers
static transformers: __module;

Static property containing utility transformers.

Inherited from

Client.transformers

Defined in

server-client/dist/client.d.ts:11

Methods

addAuthenticationToRequest()
addAuthenticationToRequest(request): Promise<VetchOptions>

Adds the appropriate authentication headers or parameters to the request based on the authentication type.

Parameters

request: VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addAuthenticationToRequest

Defined in

server-client/dist/client.d.ts:37

callAction()
protected callAction(
   uuid, 
   action, 
destination?): Promise<void>

Send a call action to a specific call identified by its UUID.

Parameters

uuid: string

The UUID of the call to which the action should be applied.

action: string

The action to perform on the call (e.g., 'hangup', 'mute', 'unmute').

destination?: NCCODestination

The destination details for transfer actions.

Returns

Promise<void>

A promise that resolves when the call action has been successfully executed.

Example
await voiceClient.callAction(CALL_UUID, 'mute');
Defined in

voice/lib/voice.ts:581

createOutboundCall()
createOutboundCall(call): Promise<CallResult>

Initiates an outbound call with the specified configuration.

Parameters

call: OutboundCall

The configuration for the outbound call.

Returns

Promise<CallResult>

A promise that resolves to the result of the outbound call initiation.

Examples

Create a call with answer NCCO

const call = await voiceClient.createOutboundCall({
  to: [{
    type: 'phone',
    number: TO_NUMBER
  }],
  asnwer_url: ['https://example.com/answer'],
});

console.log(call.uuid);

Create a call with answer URL

const call = await voiceClient.createOutboundCall({
  to: [{
    type: 'phone',
    number: TO_NUMBER
  }],
  ncco: [{
    action: 'talk',
    text: 'This is a text to speech call from Vonage'
  }]
});

console.log(call.uuid);
Defined in

voice/lib/voice.ts:239

downloadRecording()
downloadRecording(file, path): Promise<void>

Download the recording of a call to the specified file path.

Parameters

file: string

The name of the recording file to download.

path: string

The local file path where the recording will be saved.

Returns

Promise<void>

A promise that resolves when the recording has been successfully downloaded.

Example
await voiceClient.downloadRecording(RECORDING_UUID, './recording.mp3');
Defined in

voice/lib/voice.ts:540

downloadTranscription()
downloadTranscription(file, path): Promise<void>

Download the transcription of a call to the specified file path.

Parameters

file: string

The name of the transcription file to download.

path: string

The local file path where the transcription will be saved.

Returns

Promise<void>

A promise that resolves when the transcription has been successfully downloaded.

Example
await voiceClient.downloadTranscription(TRANSCRIPTION_UUID, './transcription.txt');
Defined in

voice/lib/voice.ts:560

earmuffCall()
earmuffCall(uuid): Promise<void>

Places a call on earmuff, muting the audio for all participants except the user.

Parameters

uuid: string

The UUID of the call to earmuff.

Returns

Promise<void>

A promise that resolves when the call has been successfully earmuffed.

Example
await voiceClient.earmuffCall(CALL_UUID);
Defined in

voice/lib/voice.ts:509

getAllCalls()
getAllCalls(params): AsyncGenerator<CallDetail, void & CommonCallFields & BasicCallDetail & object, undefined>

Retrieves details of all calls using pagination.

Parameters

params: GetCallDetailsParameters = {}

Optional parameters for filtering and pagination.

Returns

AsyncGenerator<CallDetail & object, undefined>

An async generator that yields call details or void when there are no more results.

Example
for await (const call of voiceClient.getAllCalls()) {
  console.log(call.startTime);
}
Defined in

voice/lib/voice.ts:88

getCall()
getCall(uuid): Promise<CallDetail>

Retrieves detailed information about a specific call using its UUID.

Parameters

uuid: string

The UUID of the call to retrieve details for.

Returns

Promise<CallDetail>

A promise that resolves to detailed information about the call.

Example
const call = await voiceClient.getCall('CALL_UUID');
console.log(call.startTime);
Defined in

voice/lib/voice.ts:195

getCallsPage()
getCallsPage(params): Promise<CallPageResponse>

Retrieves a page of call details based on the specified parameters.

Parameters

params: GetCallDetailsParameters

Optional parameters for filtering and pagination.

Returns

Promise<CallPageResponse>

A promise that resolves to a page of call details.

Examples
const page = await voiceClient.getCallsPage();
for (const call of page._embedded.calls) {
  console.log(call.startTime);
}

Get the next page of call details

const page = await voiceClient.getCallsPage({
  pageSize: 4,
  recordIndex: 10,
});
for (const call of page._embedded.calls) {
  console.log(call.startTime);
}

Get all started calls

import { CallStatus } from '@vonage/voice';

const page = await voiceClient.getCallsPage({
  pageSize: 4,
  recordIndex: 10,
  status: CallStatus.STARTED,
});
for (const call of page._embedded.calls) {
  console.log(call.startTime);
}
Defined in

voice/lib/voice.ts:147

hangupCall()
hangupCall(uuid): Promise<void>

Hang up an active call.

Parameters

uuid: string

The UUID of the call to hang up.

Returns

Promise<void>

A promise that resolves when the call has been successfully hung up.

Example
await voiceClient.hangupCall(CALL_UUID);
Defined in

voice/lib/voice.ts:464

muteCall()
muteCall(uuid): Promise<void>

Mute an active call.

Parameters

uuid: string

The UUID of the call to mute.

Returns

Promise<void>

A promise that resolves when the call has been successfully muted.

Example
await voiceClient.muteCall(CALL_UUID);
Defined in

voice/lib/voice.ts:479

parseResponse()
protected parseResponse<T>(request, response): Promise<VetchResponse<T>>

Parses the response based on its content type.

Type Parameters

T

The expected type of the parsed response data.

Parameters

request: VetchOptions

The request options.

response: Response

The raw response from the request.

Returns

Promise<VetchResponse<T>>

  • The parsed response.
Inherited from

Client.parseResponse

Defined in

server-client/dist/client.d.ts:134

playDTMF()
playDTMF(uuid, digits): Promise<CallUpdateResult>

Plays DTMF (Dual-Tone Multi-Frequency) tones on an active call.

Parameters

uuid: string

The UUID of the call on which to play DTMF tones.

digits: string

The DTMF tones to play.

Returns

Promise<CallUpdateResult>

A promise that resolves to the result of playing DTMF tones on the call.

Example
const result = await voiceClient.playDTMF('CALL_UUID', '1234');
console.log(result.status);
Defined in

voice/lib/voice.ts:272

playTTS()
playTTS(uuid, action): Promise<CallUpdateResult>

Plays text-to-speech (TTS) audio on an active call.

Parameters

uuid: string

The UUID of the call on which to play TTS audio.

action: TalkAction

The TTS action configuration.

Returns

Promise<CallUpdateResult>

A promise that resolves to the result of playing TTS audio on the call.

Example
const result = await voiceClient.playTTS(
  CALL_UUID,
  {
    text: 'This is a text to speech call from Vonage',
  },
);

console.log(result.status);
Defined in

voice/lib/voice.ts:303

prepareBody()
protected prepareBody(request): undefined | string

Prepares the body for the request based on the content type.

Parameters

request: VetchOptions

The request options.

Returns

undefined | string

  • The prepared request body as a string or undefined.
Inherited from

Client.prepareBody

Defined in

server-client/dist/client.d.ts:124

prepareRequest()
protected prepareRequest(request): Promise<VetchOptions>

Prepares the request with necessary headers, authentication, and query parameters.

Parameters

request: VetchOptions

The initial request options.

Returns

Promise<VetchOptions>

  • The modified request options.
Inherited from

Client.prepareRequest

Defined in

server-client/dist/client.d.ts:117

search()
search(filter?): Promise<CallPageResponse>

Searches for call details based on the provided filter.

Parameters

filter?: GetCallDetailsParameters

Optional filter criteria to narrow down the search.

Returns

Promise<CallPageResponse>

A promise that resolves to a page of call details matching the filter.

Example
const page = await voiceClient.search({
  pageSize: 4,
});

for (const call of page._embedded.calls) {
  console.log(call.startTime);
  console.log(call.status);
  console.log(call.direction);
  console.log(call.duration);
};
Defined in

voice/lib/voice.ts:179

sendDeleteRequest()
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>

Sends a DELETE request to the specified URL.

Type Parameters

T

Parameters

url: string

The URL endpoint for the DELETE request.

Returns

Promise<VetchResponse<T>>

  • The response from the DELETE request.
Inherited from

Client.sendDeleteRequest

Defined in

server-client/dist/client.d.ts:44

sendFormSubmitRequest()
sendFormSubmitRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a POST request with form data to the specified URL.

Type Parameters

T

Parameters

url: string

The URL endpoint for the POST request.

payload?: Record<string, string>

Optional payload containing form data to send with the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendFormSubmitRequest

Defined in

server-client/dist/client.d.ts:52

sendGetRequest()
sendGetRequest<T>(url, queryParams?): Promise<VetchResponse<T>>

Sends a GET request to the specified URL with optional query parameters.

Type Parameters

T

Parameters

url: string

The URL endpoint for the GET request.

queryParams?

Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.

Returns

Promise<VetchResponse<T>>

  • The response from the GET request.
Inherited from

Client.sendGetRequest

Defined in

server-client/dist/client.d.ts:60

sendPatchRequest()
sendPatchRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a PATCH request to the specified URL with an optional payload.

Type Parameters

T

Parameters

url: string

The URL endpoint for the PATCH request.

payload?

Optional payload to be sent as the body of the PATCH request.

Returns

Promise<VetchResponse<T>>

  • The response from the PATCH request.
Inherited from

Client.sendPatchRequest

Defined in

server-client/dist/client.d.ts:70

sendPostRequest()
sendPostRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a POST request to the specified URL with an optional payload.

Type Parameters

T

Parameters

url: string

The URL endpoint for the POST request.

payload?

Optional payload to be sent as the body of the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendPostRequest

Defined in

server-client/dist/client.d.ts:80

sendPutRequest()
sendPutRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a PUT request to the specified URL with an optional payload.

Type Parameters

T

Parameters

url: string

The URL endpoint for the PUT request.

payload?

Optional payload to be sent as the body of the PUT request.

Returns

Promise<VetchResponse<T>>

  • The response from the PUT request.
Inherited from

Client.sendPutRequest

Defined in

server-client/dist/client.d.ts:90

sendRequest()
sendRequest<T>(request): Promise<VetchResponse<T>>

Sends a request adding necessary headers, handling authentication, and parsing the response.

Type Parameters

T

Parameters

request: VetchOptions

The options defining the request, including URL, method, headers, and data.

Returns

Promise<VetchResponse<T>>

  • The parsed response from the request.
Inherited from

Client.sendRequest

Defined in

server-client/dist/client.d.ts:110

sendRequestWithData()
sendRequestWithData<T>(
   method, 
   url, 
payload?): Promise<VetchResponse<T>>

Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.

Type Parameters

T

Parameters

method: POST | PUT | PATCH

The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).

url: string

The URL endpoint for the request.

payload?

Optional payload to be sent as the body of the request, JSON-encoded.

Returns

Promise<VetchResponse<T>>

  • The response from the request.
Inherited from

Client.sendRequestWithData

Defined in

server-client/dist/client.d.ts:101

stopStreamAudio()
stopStreamAudio(uuid): Promise<CallUpdateResult>

Stop streaming audio to an active call.

Parameters

uuid: string

The UUID of the call from which to stop streaming audio.

Returns

Promise<CallUpdateResult>

A promise that resolves to the result of stopping audio streaming to the call.

Example
const result = await voiceClient.stopStreamAudio(CALL_UUID);
console.log(result.message);
Defined in

voice/lib/voice.ts:396

stopTTS()
stopTTS(uuid): Promise<CallUpdateResult>

Stops any ongoing text-to-speech (TTS) audio playback on an active call.

Parameters

uuid: string

The UUID of the call on which to stop TTS audio playback.

Returns

Promise<CallUpdateResult>

A promise that resolves to the result of stopping TTS audio playback on the call.

Example
const result = await voiceClient.stopTTS(CALL_UUID);
console.log(result.status);
Defined in

voice/lib/voice.ts:336

streamAudio()
streamAudio(
   uuid, 
   url, 
   loop?, 
volumeLevel?): Promise<UpdateCallResponse>

Stream audio to an active call, allowing you to play audio files or live audio streams.

Parameters

uuid: string

The UUID of the call to which to stream audio.

url: string

The URL of the audio stream to play.

loop?: number = 1

The number of times to loop the audio stream (default is 1).

volumeLevel?: number = 0.0

The volume level of the audio stream (0.0 to 1.0, default is 0.0).

Returns

Promise<UpdateCallResponse>

A promise that resolves to the result of streaming audio to the call.

Example
const result = await voiceClient.streamAudio(CALL_UUID, 'https://example.com/audio.mp3');
console.log(result.message);
Defined in

voice/lib/voice.ts:363

transferCallWithNCCO()
transferCallWithNCCO(uuid, ncco): Promise<void>

Transfer an active call to a new destination using a Nexmo Call Control Object (NCCO).

Parameters

uuid: string

The UUID of the call to transfer.

ncco: NCCOAction[]

The NCCO actions defining the transfer destination.

Returns

Promise<void>

A promise that resolves when the call has been successfully transferred.

Example
await voiceClient.transferCallWithNCCO(
  CALL_UUID,
  [{
    action: 'talk',
    text: 'You will now be transferred to a new destination''
  }],
)
Defined in

voice/lib/voice.ts:425

transferCallWithURL()
transferCallWithURL(uuid, url): Promise<void>

Transfer an active call to a new destination using a URL.

Parameters

uuid: string

The UUID of the call to transfer.

url: string

The URL of the transfer destination.

Returns

Promise<void>

A promise that resolves when the call has been successfully transferred.

Example
await voiceClient.transferCallWithURL(
  CALL_UUID,
  'https://example.com/transfer',
);
Defined in

voice/lib/voice.ts:447

unearmuffCall()
unearmuffCall(uuid): Promise<void>

Remove an earmuff from a call, allowing all participants to hear each other again.

Parameters

uuid: string

The UUID of the call to unearmuff.

Returns

Promise<void>

A promise that resolves when the call has been successfully unearmuffed.

Example
await voiceClient.unearmuffCall(CALL_UUID);
Defined in

voice/lib/voice.ts:524

unmuteCall()
unmuteCall(uuid): Promise<void>

Unmute a muted call, allowing audio to be transmitted again.

Parameters

uuid: string

The UUID of the call to unmute.

Returns

Promise<void>

A promise that resolves when the call has been successfully unmuted.

Example
await voiceClient.unmuteCall(CALL_UUID);
Defined in

voice/lib/voice.ts:494

Interfaces

NCCOTransfer

Represents a Nexmo Call Control Object (NCCO) transfer action.

Properties

action
action: string;

The action type, which is 'transfer'.

Defined in

voice/lib/interfaces/NCCO/Transfer.ts:10

destination
destination: object;

The destination of the transfer, including the type and NCCO actions.

ncco
ncco: NCCOAction[];

The NCCO actions to be executed at the destination.

type
type: string;

The type of destination, which is 'ncco'.

Defined in

voice/lib/interfaces/NCCO/Transfer.ts:15


URLTransfer

Represents a Nexmo Call Control Object (NCCO) URL transfer action.

Properties

action
action: string;

The action type, which is 'transfer'.

Defined in

voice/lib/interfaces/NCCO/Transfer.ts:35

destination
destination: object;

The destination of the transfer, including the type and URL.

type
type: string;

The type of destination, which is 'url'.

url
url: string[];

The URL to which the call will be transferred.

Defined in

voice/lib/interfaces/NCCO/Transfer.ts:40

Type Aliases

Action

type Action: NCCOAction;

Represents a Nexmo Call Control Object (NCCO) action that defines the behavior of a call. This type is an alias for the NCCOAction type.

Defined in

voice/lib/types/NCCO/Action.ts:7


AdvancedMachineDetection

type AdvancedMachineDetection: object;

Represents advanced settings for machine detection during a call, including behavior, mode, and optional beep timeout.

Type declaration

beepTimeout?
optional beepTimeout: number;

(Optional) The timeout duration (in seconds) for detecting a beep during machine detection.

behavior
behavior: MachineDetectionBehavior;

The behavior to follow when machine detection occurs.

mode
mode: AdvancedMachineDetectionMode;

The mode of advanced machine detection.

Defined in

voice/lib/types/AdvancedMachineDetection.ts:10


BasicCallDetail

type BasicCallDetail: object;

Represents basic details of a call, including its UUID, conversation UUID, duration, and status.

Type declaration

conversationUUID
conversationUUID: string;

The UUID of the conversation associated with the call.

duration
duration: string;

The duration of the call in a string format.

status
status: CallStatus;

The status of the call, indicating its current state.

uuid
uuid: string;

The UUID of the call.

Defined in

voice/lib/types/BasicCallDetail.ts:6


CallDetail

type CallDetail: CommonCallFields & BasicCallDetail & object;

Represents detailed information about a call, including common call fields, call direction, rate, price, start time, end time, and network information.

Type declaration

direction
direction: CallDirection;

The direction of the call, indicating whether it is inbound or outbound.

endTime
endTime: string;

The end time of the call in a string format.

network
network: string;

The network information related to the call.

price
price: string;

The price of the call in a string format.

rate
rate: string;

The rate associated with the call in a string format.

startTime
startTime: string;

The start time of the call in a string format.

Defined in

voice/lib/types/CallDetail.ts:9


CallDetailResponse

type CallDetailResponse: object & Omit<CallDetail, 
  | "conversationUUID"
  | "startTime"
  | "endTime"
  | "to"
  | "from"> & APILinks;

Represents the response for retrieving call details.

Type declaration

conversation_uuid
conversation_uuid: string;

The UUID of the conversation associated with the call.

end_time
end_time: string;

The end time of the call.

start_time
start_time: string;

The start time of the call.

to
to: CallEndpointResponse;

Information about the recipient (callee) of the call.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Responses/CallDetailResponse.ts:12


CallEndpoint

type CallEndpoint: WebsocketEndpoint | PhoneEndpoint | SIPEndpoint | VBCEndpoint;

Represents a call endpoint, which can be of different types such as Phone, SIP, VBC, or Websocket. This type can be used to specify the destination for an outbound call.

Defined in

voice/lib/types/Endpoint/CallEndpoint.ts:10


CallEndpointObject

type CallEndpointObject: CallEndpoint;

Deprecated

This interface is deprecated. Please update to use the CallEndpoint type

Defined in

voice/lib/interfaces/Endpoint/CallEndpointObject.ts:11


CallEndpointResponse

type CallEndpointResponse: PhoneEndpoint | WebsocketEndpoint | SIPEndpoint | VBCEndpoint;

Represents the response for a call endpoint, which can be one of the following:

  • Phone endpoint
  • Websocket endpoint
  • SIP endpoint
  • VBC (Vonage Business Cloud) endpoint

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Responses/CallEndpointResponse.ts:19


CallListFilter

type CallListFilter: object & GetCallDetailsParameters;

Type declaration

conversation_uuid?
optional conversation_uuid: string;
date_end?
optional date_end: string;
date_start?
optional date_start: string;
page_size?
optional page_size: string;
record_index?
optional record_index: string;

Deprecated

Pelease use GetCallDetailsParameters instead

Defined in

voice/lib/types/Parameters/CallListFilter.ts:6


CallPageResponse

type CallPageResponse: object & APILinks;

Represents the response for a page of call details, including information about the page itself and an array of call details.

Type declaration

_embedded
_embedded: object;

An embedded object containing an array of call details.

_embedded.calls
_embedded.calls: CallDetailResponse[];

An array of call details.

count
count: number;

The total count of call details in the response.

page_size
page_size: number;

The number of call details per page.

record_index
record_index: number;

The index of the first call detail in the current page.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Responses/CallPageResponse.ts:12


CallResult

type CallResult: object;

Represents the result of a call, including the UUID, status, direction (inbound or outbound), and conversation UUID.

Type declaration

conversationUUID
conversationUUID: string;

The UUID associated with the conversation related to the call.

direction
direction: "inbound" | "outbound";

The direction of the call, specifying whether it is inbound or outbound.

status
status: CallStatus;

The status of the call, indicating its current state or outcome.

uuid
uuid: string;

The universally unique identifier (UUID) associated with the call.

Defined in

voice/lib/types/CallResult.ts:6


CallUpdateResult

type CallUpdateResult: object;

Represents the result of updating a call, including the UUID and a message describing the update.

Type declaration

message
message: string;

A message describing the update or the result of the call update operation.

uuid
uuid: string;

The universally unique identifier (UUID) associated with the call.

Defined in

voice/lib/types/CallUpdateResult.ts:4


CallWithAnswerURL

type CallWithAnswerURL: CommonOutboundCall & object;

Represents an outbound call with an answer URL, including common call properties and the answer URL information.

Type declaration

answerMethod?
optional answerMethod: HttpMethod;

The HTTP method used to send events to the answer URL(s), typically "GET" or "POST."

answerUrl
answerUrl: string[];

The URL(s) to which call events should be sent when the call is answered.

Defined in

voice/lib/types/CallWithAnswerURL.ts:7


CallWithNCCO

type CallWithNCCO: CommonOutboundCall & object;

Represents an outbound call with associated Nexmo Call Control Objects (NCCO) actions.

Type declaration

ncco
ncco: NCCOAction[];

An array of NCCO actions to be executed during the call.

Defined in

voice/lib/types/CallWithNCCO.ts:7


CommonCallFields

type CommonCallFields: object;

Represents common fields for defining an outbound call, including the caller (from) and recipient (to) endpoints.

Type declaration

from
from: Omit<PSTNEndpoint, "dtmfAnswer">;

The caller's endpoint information, excluding DTMF answer details.

to
to: CallEndpoint;

The recipient's endpoint information for the call.

Defined in

voice/lib/types/CommonCallFields.ts:6


CommonOutboundCall

type CommonOutboundCall: Omit<CommonCallFields, "to"> & object;

Represents common fields for defining an outbound call, including the caller (from) and recipient (to) endpoints, along with additional call parameters.

Type declaration

advancedMachineDetection?
optional advancedMachineDetection: AdvancedMachineDetection;

Advanced machine detection settings for the call.

eventMethod?
optional eventMethod: HttpMethod;

The HTTP method to use when sending events to the specified event URLs.

eventUrl?
optional eventUrl: string[];

An array of URLs to notify with call events.

lengthTimer?
optional lengthTimer: number;

The length of time to wait for call answer, in seconds.

machineDetection?
optional machineDetection: MachineDetectionBehavior;

Specifies the behavior for machine detection during the call.

ringingTimer?
optional ringingTimer: number;

The length of time to wait for the call to ring before considering it unanswered, in seconds.

to
to: CallEndpoint[];

An array of recipient endpoints for the call.

Defined in

voice/lib/types/CommonOutboundCall.ts:10


ConnectAction

type ConnectAction: ConnectActionType;

Deprecated

This interface is deprecated. Please update to use the ConnectActionType type

Defined in

voice/lib/interfaces/NCCO/ConnectAction.ts:12


ConversationAction

type ConversationAction: ConnectionActionType;

Deprecated

This interface is deprecated. Please update to use the ConnectionActionType type

Defined in

voice/lib/interfaces/NCCO/ConversationAction.ts:12


CreateCallParameters

type CreateCallParameters: OutboundCall;

Defined in

voice/lib/types/Parameters/CreateCallParameters.ts:3


CreateCallRequest

type CreateCallRequest: object & Omit<OutboundCall, 
  | "randomFromNumber"
  | "eventUrl"
  | "machineDetection"
  | "advancedMachineDetection"
  | "lengthTimer"
| "ringingTimer">;

Represents the request payload for creating a call, including various call settings.

Type declaration

advanced_machine_detection
advanced_machine_detection: object & Omit<AdvancedMachineDetection, "beepTimeout">;

Advanced machine detection settings, including beep timeout.

Type declaration
beep_timeout?
optional beep_timeout: number;

The beep timeout setting for advanced machine detection.

event_url?
optional event_url: string[];

An array of URLs for event callbacks during the call's lifecycle.

length_timer?
optional length_timer: number;

The length timer setting for the call.

machine_detection?
optional machine_detection: MachineDetection;

The type of machine detection to use for the call.

random_from_number?
optional random_from_number: boolean;

Specifies whether to use a random caller number for the call.

ringing_timer?
optional ringing_timer: number;

The ringing timer setting for the call.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Requests/CreateCallRequest.ts:12


CreateCallResponse

type CreateCallResponse: object;

Represents the response for creating a call, including the call's UUID, status, direction, and conversation UUID.

Type declaration

conversation_uuid
conversation_uuid: string;

The UUID of the conversation associated with the call.

direction
direction: string;

The direction of the call (e.g., "outbound" or "inbound").

status
status: string;

The status of the created call.

uuid
uuid: string;

The UUID of the created call.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Responses/CreateCallResponse.ts:8


CreateOutboundCallResponse

type CreateOutboundCallResponse: object & Omit<BasicCallDetail, "conversationUUID">;

Represents the response for creating an outbound call, including the conversation UUID and basic call details.

Type declaration

conversation_uuid
conversation_uuid: string;

The UUID of the conversation associated with the outbound call.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Responses/CreateOutboundCallResponse.ts:10


DTMFSettings

type DTMFSettings: DTMFSettingsType;

Deprecated

This interface is deprecated. Please update to use the DTMFSettingsType type

Defined in

voice/lib/interfaces/NCCO/DTMFSettings.ts:12


EarmuffCallParameters

type EarmuffCallParameters: object;

Represents parameters for an "earmuff" action in a call.

Type declaration

action
action: "earmuff";

The action to earmuff the call.

Defined in

voice/lib/types/Parameters/EarmuffCallParameters.ts:4


GetCallDetailsParameters

type GetCallDetailsParameters: object;

Represents parameters for retrieving call details.

Type declaration

conversationUuid?
optional conversationUuid: string;

Optional: The conversation UUID for filtering calls.

dateEnd?
optional dateEnd: string;

Optional: The end date for filtering calls.

dateStart?
optional dateStart: string;

Optional: The start date for filtering calls.

order?
optional order: "asc" | "desc";

Optional: The order in which calls are retrieved (ascending or descending).

pageSize?
optional pageSize: number;

Optional: The page size for pagination.

recordIndex?
optional recordIndex: number;

Optional: The record index for pagination.

status?
optional status: CallStatus;

Optional: The status of the calls to retrieve.

Defined in

voice/lib/types/Parameters/GetCallsDetailsParameters.ts:6


GetCallDetailsRequest

type GetCallDetailsRequest: object & Omit<GetCallDetailsParameters, 
  | "dateEnd"
  | "dateStart"
  | "pageSize"
  | "recordIndex"
| "conversationUuid">;

Represents the request payload for retrieving call details with various filtering options.

Type declaration

conversation_uuid?
optional conversation_uuid: string;

The UUID of the conversation to filter call records by.

date_end?
optional date_end: string;

The end date for filtering call records.

date_start?
optional date_start: string;

The start date for filtering call records.

page_size?
optional page_size: number;

The maximum number of records to return per page.

record_index?
optional record_index: number;

The record index for pagination.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Requests/GetCallsDetailsRequest.ts:10


HangupCallParameters

type HangupCallParameters: object;

Represents parameters for hanging up a call.

Type declaration

action
action: "hangup";

The action indicating that the call should be hung up.

Defined in

voice/lib/types/Parameters/HangupCallParameters.ts:4


IOutboundCallWithAnswerURL

type IOutboundCallWithAnswerURL: CallWithAnswerURL;

Deprecated

This interface is deprecated. Please update to use the CallWithAnswerURL type

Defined in

voice/lib/interfaces/OutboundCallWithAnswerURL.ts:12


IOutboundCallWithNCCO

type IOutboundCallWithNCCO: CallWithNCCO;

Deprecated

This interface is deprecated. Please update to use the CallWithNCCO type

Defined in

voice/lib/interfaces/OutboundCallWithNCCO.ts:11


InputAction

type InputAction: InputActionType;

Deprecated

This interface is deprecated. Please update to use the InputActionType type

Defined in

voice/lib/interfaces/NCCO/InputAction.ts:11


ModifyCallRequestParameters

type ModifyCallRequestParameters: 
  | EarmuffCallParameters
  | HangupCallParameters
  | MuteCallParameters
  | TransferCallParameters
  | UnearmuffCallParameters
  | UnmuteCallParameters;

Represents the parameters for modifying a call, including actions like earmuff, hangup, mute, transfer, unearmuff, and unmute.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Requests/ModifyCallRequest.ts:18


MuteCallParameters

type MuteCallParameters: object;

Represents parameters for muting a call.

Type declaration

action
action: "mute";

The action indicating that the call should be muted.

Defined in

voice/lib/types/Parameters/MuteCallParameters.ts:4


NCCOAction

type NCCOAction: 
  | ConnectAction
  | ConversationAction
  | InputAction
  | NotifyAction
  | RecordAction
  | StreamAction
  | TalkAction;

Represents a Nexmo Call Control Object (NCCO) action, which can be one of the following types:

  • ConnectAction
  • ConversationAction
  • InputAction
  • NotifyAction
  • RecordAction
  • StreamAction
  • TalkAction

An NCCO action defines a specific action or behavior in a call flow, and these actions can be combined to create complex call scenarios when constructing NCCOs.

Defined in

voice/lib/types/NCCO/NCCOActions.ts:22


NotifyAction

type NotifyAction: NotifyActionType;

Deprecated

This interface is deprecated. Please update to use the NotifyActionType type

Defined in

voice/lib/interfaces/NCCO/NotifyAction.ts:12


OutboundCall

type OutboundCall: CallWithNCCO | CallWithAnswerURL;

Represents an outbound call, which can either include an answer URL (for simple call scenarios) or an NCCO (Nexmo Call Control Object) for more complex call scenarios. Depending on the use case, it can be either a CallWithAnswerURL or a CallWithNCCO.

Defined in

voice/lib/types/OutboundCall.ts:9


PSTNEndpoint

type PSTNEndpoint: object;

Represents a PSTN (Public Switched Telephone Network) endpoint, which can be used as a call destination.

Type declaration

dtmfAnswer?
optional dtmfAnswer: string;

An optional DTMF (Dual-Tone Multi-Frequency) answer string. When provided, it enables automated call answering by sending DTMF tones.

number
number: string;

The phone number associated with the endpoint.

type
type: "phone";

Specifies the type of endpoint, which is 'phone' for phone numbers.

Defined in

voice/lib/types/Endpoint/PSTNEndpoint.ts:4


PhoneEndpoint

type PhoneEndpoint: object;

Represents a phone endpoint, which can be used as a call destination.

Type declaration

number
number: string;

The phone number associated with the endpoint.

type
type: "phone";

Specifies the type of endpoint, which is 'phone' for phone numbers.

Defined in

voice/lib/types/Endpoint/PhoneEndpoint.ts:4


PhoneEndpointObject

type PhoneEndpointObject: PhoneEndpoint;

Deprecated

This interface is deprecated. Please update to use the PhoneEndpoint type

Defined in

voice/lib/interfaces/Endpoint/PhoneEndpointObject.ts:11


PlayDTMFRequest

type PlayDTMFRequest: PlayDTMFParameters;

Represents the parameters for playing DTMF (Dual-Tone Multi-Frequency) tones during a call.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Requests/PlayDTMFRequest.ts:10


PlayTTSParameters

type PlayTTSParameters: object;

Represents parameters for playing Text-to-Speech (TTS) in a call.

Type declaration

language?
optional language: TTSLanguages | string;

The language in which the text should be spoken. Optional.

level?
optional level: string;

The audio level for the TTS playback. Optional.

loop?
optional loop: number;

The number of times to loop the TTS playback. Optional.

premium?
optional premium: boolean;

Indicates if premium TTS features should be used. Optional.

style?
optional style: number;

The style or voice variant for the TTS. Optional.

text
text: string;

The text to be converted to speech and played in the call.

voiceName?
optional voiceName: TTSVoices;

The name of the specific TTS voice to use. Optional.

Defined in

voice/lib/types/Parameters/PlayTTSParameters.ts:6


PlayTTSRequest

type PlayTTSRequest: object & Omit<PlayTTSParameters, "voiceName">;

Represents the parameters for playing text-to-speech (TTS) during a call.

Type declaration

voice_name?
optional voice_name: TTSVoices;

The name of the TTS voice to use for speech synthesis.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Requests/PlayTTSRequest.ts:11


RecordAction

type RecordAction: RecordActionType;

Deprecated

This interface is deprecated. Please update to use the RecordActionType type

Defined in

voice/lib/interfaces/NCCO/RecordAction.ts:12


SIPEndpoint

type SIPEndpoint: object;

Represents a SIP (Session Initiation Protocol) endpoint, which can be used as a call destination.

Type declaration

headers?
optional headers: Record<string, unknown>[];

An optional array of headers as key-value pairs. These headers can be included in the SIP request.

type
type: "sip";

Specifies the type of endpoint, which is 'sip' for SIP URIs.

uri
uri: string;

The SIP URI associated with the endpoint.

Defined in

voice/lib/types/Endpoint/SIPEndpoint.ts:4


SIPEndpointObject

type SIPEndpointObject: SIPEndpoint;

Deprecated

This interface is deprecated. Please update to use the SIPEndpoint type

Defined in

voice/lib/interfaces/Endpoint/SIPEndpointObject.ts:11


SpeechSettings

type SpeechSettings: SpeechSettingsType;

Deprecated

This interface is deprecated. Please update to use the SpeechSettingsType type

Defined in

voice/lib/interfaces/NCCO/SpeechSettings.ts:12


StreamAction

type StreamAction: StreamActionType;

Deprecated

This interface is deprecated. Please update to use the StreamActionType type

Defined in

voice/lib/interfaces/NCCO/StreamAction.ts:12


StreamAudioRequest

type StreamAudioRequest: object & Omit<StreamAudioParameters, "streamUrl">;

Represents the parameters for streaming audio during a call.

Type declaration

stream_url
stream_url: string[];

An array of stream URLs for the audio source.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Requests/StreamAudioRequest.ts:10


TalkAction

type TalkAction: TalkActionType;

Deprecated

This interface is deprecated. Please update to use the TalkActionType type

Defined in

voice/lib/interfaces/NCCO/TalkAction.ts:11


TransferCallParameters

type TransferCallParameters: object;

Represents parameters for transferring a call to another destination.

Type declaration

action
action: "transfer";

The action type indicating a call transfer.

destination
destination: object & XOR<TransferWithURL, TransferWithNCCO>;

The destination of the transfer, which can be specified using NCCO or a URL.

Type declaration
type
type: "ncco";

The type of destination, either 'ncco' for NCCO-based transfer or 'url' for URL-based transfer.

Defined in

voice/lib/types/Parameters/TransferCallParameters.ts:21


UnearmuffCallParameters

type UnearmuffCallParameters: object;

Represents parameters for unearmuffing a call, allowing the call audio to be heard again.

Type declaration

action
action: "unearmuff";

The action type indicating unearmuffing of a call.

Defined in

voice/lib/types/Parameters/UnearmuffCallParameters.ts:4


UnmuteCallParameters

type UnmuteCallParameters: object;

Represents parameters for unmuting a call, allowing audio to be transmitted and received again.

Type declaration

action
action: "unmute";

The action type indicating unmuting of a call.

Defined in

voice/lib/types/Parameters/UnmuteCallParameters.ts:4


UpdateCallResponse

type UpdateCallResponse: object;

Represents the response for updating a call, including a message and the UUID of the call.

Type declaration

message
message: string;

A message associated with the call update response.

uuid
uuid: string;

The UUID of the call that was updated.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Defined in

voice/lib/types/Responses/UpdateCallResponse.ts:8


VBCEndpoint

type VBCEndpoint: object;

Represents a Vonage Business Cloud (VBC) endpoint, which can be used as a call destination.

Type declaration

extension?
optional extension: string;

An optional extension associated with the VBC endpoint. If provided, the call will be directed to this extension.

type
type: "vbc";

Specifies the type of endpoint, which is 'vbc' for Vonage Business Cloud.

Defined in

voice/lib/types/Endpoint/VBCEndpoint.ts:4


VBCEndpointObject

type VBCEndpointObject: VBCEndpoint;

Deprecated

This interface is deprecated. Please update to use the VBCEndpoint type

Defined in

voice/lib/interfaces/Endpoint/VBCEndpointObject.ts:11


WebsocketEndpoint

type WebsocketEndpoint: object;

Represents a WebSocket endpoint, which can be used as a call destination.

Type declaration

contentType?
optional contentType: string;

An optional content type to specify the format of the data sent to the WebSocket endpoint.

headers?
optional headers: Record<string, unknown>;

Optional headers to include when connecting to the WebSocket endpoint.

type
type: "websocket";

Specifies the type of endpoint, which is 'websocket' for WebSocket.

uri
uri: string;

The URI (Uniform Resource Identifier) of the WebSocket endpoint.

Defined in

voice/lib/types/Endpoint/WebsocketEndpoint.ts:4


WebsocketEndpointObject

type WebsocketEndpointObject: WebsocketEndpoint;

Deprecated

This interface is deprecated. Please update to use the WebsocketEndpoint type

Defined in

voice/lib/interfaces/Endpoint/WebsocketEndpointObject.ts:12

Clone this wiki locally