Skip to content

Vonage Voice

github-actions edited this page Jan 15, 2025 · 80 revisions

Vonage Voice


Documentation / Vonage Voice

Vonage Voice

Enumerations

AdvancedMachineDetectionMode

Defined in: voice/lib/enums/AdvancedMachineDetectionMode.ts:4

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

Enumeration Members

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

CallDirection

Defined in: voice/lib/enums/CallDirection.ts:4

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

Defined in: voice/lib/enums/CallStatus.ts:4

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

Defined in: voice/lib/enums/NCCO/ConnectEventType.ts:4

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

Defined in: voice/lib/enums/HttpMethod.ts:4

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

Defined in: voice/lib/enums/NCCO/MachineDetection.ts:4

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

Defined in: voice/lib/enums/MachineDetctionBehavior.ts:4

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

Defined in: voice/lib/enums/NCCOActions.ts:4

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

Defined in: voice/lib/enums/NCCO/RecordingFormat.ts:4

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

Defined in: voice/lib/enums/TTSLanguages.ts:4

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
DE_ET "de-ET" Ethiopia German (de-ET) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:68
EL_GR "el-GR" Greek (el-GR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:73
EN_AU "en-AU" Australia English (en-AU) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:78
EN_GB "en-GB" United Kingdom English (en-GB) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:83
EN_GB_SCT "en-GB-SCT" Scotland English (en-GB-SCT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:88
EN_GB_WLS "en-GB-WLS" Wales English (en-GB-WLS) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:93
EN_IE "en-IE" Ireland English (en-IE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:98
EN_IN "en-IN" India English (en-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:103
EN_NZ "en-NZ" New Zealand English (en-NZ) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:108
EN_US "en-US" United States English (en-US) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:113
EN_ZA "en-ZA" South Africa English (en-ZA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:118
ES_CO "es-CO" Colombia Spanish (es-CO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:123
ES_ES "es-ES" Spain Spanish (es-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:128
ES_MX "es-MX" Mexico Spanish (es-MX) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:133
ES_US "es-US" United States Spanish (es-US) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:138
EU_ES "eu-ES" Basque (eu-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:143
FI_FI "fi-FI" Finnish (fi-FI) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:148
FIL_PH "fil-PH" Filipino (fil-PH) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:153
FR_CA "fr-CA" Canada French (fr-CA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:158
FR_FR "fr-FR" France French (fr-FR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:163
GL_ES "gl-ES" Spain Galician (gl-ES) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:168
GU_IN "gu-IN" Gujarati (gu-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:173
HE_IL "he-IL" Hebrew (he-IL) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:178
HI_IN "hi-IN" Hindi (hi-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:183
HU_HU "hu-HU" Hungarian (hu-HU) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:188
ID_ID "id-ID" Indonesian (id-ID) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:193
IS_IS "is-IS" Icelandic (is-IS) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:198
IT_IT "it-IT" Italian (it-IT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:203
JA_JP "ja-JP" Japanese (ja-JP) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:208
KN_IN "kn-IN" Kannada (kn-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:213
KO_KR "ko-KR" Korean (ko-KR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:218
LV_LV "lv-LV" Latvian (lv-LV) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:223
ML_IN "ml-IN" Malayalam (ml-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:228
MS_MY "ms-MY" Malay (ms-MY) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:233
NB_NO "nb-NO" Norwegian (nb-NO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:238
NL_BE "nl-BE" Belgium Dutch (nl-BE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:243
NL_NL "nl-NL" Netherlands Dutch (nl-NL) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:248
NO_NO "no-NO" Norwegian (no-NO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:253
PA_IN "pa-IN" Punjabi (pa-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:258
PL_PL "pl-PL" Polish (pl-PL) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:263
PT_BR "pt-BR" Brazil Portuguese (pt-BR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:268
PT_PT "pt-PT" Portugal Portuguese (pt-PT) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:273
RO_RO "ro-RO" Romanian (ro-RO) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:278
RU_RU "ru-RU" Russian (ru-RU) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:283
SK_SK "sk-SK" Slovak (sk-SK) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:288
SR_RS "sr-RS" Serbian (sr-RS) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:293
SV_SE "sv-SE" Swedish (sv-SE) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:298
TA_IN "ta-IN" Tamil (ta-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:303
TE_IN "te-IN" Telugu (te-IN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:308
TH_TH "th-TH" Thai (th-TH) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:313
TR_TR "tr-TR" Turkish (tr-TR) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:318
UK_UA "uk-UA" Ukrainian (uk-UA) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:323
VI_VN "vi-VN" Vietnamese (vi-VN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:328
YUE_CN "yue-CN" China Chinese, Cantonese (yue-CN) - Supported Text-to-Speech (TTS) language. voice/lib/enums/TTSLanguages.ts:333

TTSVoices

Defined in: voice/lib/enums/TTSVoices.ts:4

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

Defined in: voice/lib/enums/Endpoint/WebsocketBitrate.ts:4

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

Defined in: voice/lib/classes/NCCO/Connect.ts:11

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

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

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?

SYNCHRONOUS

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

Properties

action
action: CONNECT = NCCOActions.CONNECT;

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

The action type, which is always 'connect'.

Implementation of
ConnectAction.action
endpoint
endpoint: CallEndpoint[];

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

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
eventMethod?
optional eventMethod: string;

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

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
eventType?
optional eventType: SYNCHRONOUS;

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

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
eventUrl?
optional eventUrl: string[];

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

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
from?
optional from: string;

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

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
limit?
optional limit: number;

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

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

Param

The maximum number of concurrent calls.

Implementation of
ConnectAction.limit
machineDetection?
optional machineDetection: MachineDetection;

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

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

Param

The behavior when voicemail is detected.

Implementation of
ConnectAction.machineDetection
randomFromNumber?
optional randomFromNumber: boolean;

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

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
ringbackTone?
optional ringbackTone: string;

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

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
timeout?
optional timeout: number;

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

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

Methods

serializeToNCCO()
serializeToNCCO(): ConnectAction

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

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

Returns

ConnectAction

  • The serialized Connect action.
Implementation of
Serializable.serializeToNCCO

Conversation

Defined in: voice/lib/classes/NCCO/Conversation.ts:8

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

Implements

  • ConversationAction
  • Serializable

Constructors

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

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

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

Properties

action
action: CONVERSATION = NCCOActions.CONVERSATION;

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

The action type, which is always 'conversation'.

Implementation of
ConversationAction.action
canHear?
optional canHear: string[];

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

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
canSpeak?
optional canSpeak: string[];

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

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
endOnExit?
optional endOnExit: boolean;

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

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
musicOnHoldUrl?
optional musicOnHoldUrl: string[];

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

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
mute?
optional mute: boolean;

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

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
name
name: string;

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

The name of the conversation.

Param

The name of the conversation.

Implementation of
ConversationAction.name
record?
optional record: boolean;

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

Set to true to record the conversation.

Param

Set to true to record the conversation.

Implementation of
ConversationAction.record
startOnEnter?
optional startOnEnter: boolean;

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

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

Methods

serializeToNCCO()
serializeToNCCO(): ConversationAction

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

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

Returns

ConversationAction

  • The serialized Conversation action.
Implementation of
Serializable.serializeToNCCO

Input

Defined in: voice/lib/classes/NCCO/Input.ts:10

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

Implements

  • Pick<InputAction, | "action" | "type" | "dtmf" | "speech" | "eventUrl" | "eventMethod" | "mode">
  • Serializable

Constructors

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

Defined in: voice/lib/classes/NCCO/Input.ts:59

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.

mode?

"synchronous" | "asynchronous"

Returns

Input

Properties

action
action: INPUT = NCCOActions.INPUT;

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

The action type, which is always 'input'.

Implementation of
Pick.action
dtmf?
optional dtmf: DTMFSettings;

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

DTMF input settings.

Implementation of
Pick.dtmf
eventMethod?
optional eventMethod: string;

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

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

Implementation of
Pick.eventMethod
eventUrl?
optional eventUrl: string[] = [];

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

An array of URLs to send events to asynchronously.

Implementation of
Pick.eventUrl
mode?
optional mode: "synchronous" | "asynchronous";

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

Input processing mode, currently only applicable to DTMF. Valid values are synchronous (the default) and asynchronous. If set to asynchronous, all DTMF settings must be left blank. In asynchronous mode, digits are sent one at a time to the event webhook in real time. In the default synchronous mode, this is controlled by the DTMF settings instead and the inputs are sent in batch.

Implementation of
Pick.mode
speech?
optional speech: SpeechSettings;

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

Speech input settings.

Implementation of
Pick.speech
type
type: string[] = [];

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

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

Implementation of
Pick.type

Methods

serializeToNCCO()
serializeToNCCO(): InputAction

Defined in: voice/lib/classes/NCCO/Input.ts:100

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

Returns

InputAction

  • The serialized Input action.
Implementation of
Serializable.serializeToNCCO

NCCOBuilder

Defined in: voice/lib/classes/NCCO/NCCOBuilder.ts:7

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

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

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).
build()
build(): NCCOAction[]

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

Build the NCCO by serializing the added actions.

Returns

NCCOAction[]

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

Notify

Defined in: voice/lib/classes/NCCO/Notify.ts:8

Represents a Notify action in an NCCO.

Implements

  • NotifyAction
  • Serializable

Constructors

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

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

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

Properties

action
action: NOTIFY = NCCOActions.NOTIFY;

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

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

Implementation of
NotifyAction.action
eventMethod?
optional eventMethod: string;

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

(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
eventUrl
eventUrl: string[];

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

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

Implementation of
NotifyAction.eventUrl
payload
payload: object;

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

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

Methods

serializeToNCCO()
serializeToNCCO(): NotifyAction

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

Serialize the Notify action to an NCCO-compatible format.

Returns

NotifyAction

  • The serialized Notify action.
Implementation of
Serializable.serializeToNCCO

OutboundCallWithAnswerURL

Defined in: voice/lib/classes/OutboundCallWithAnswerURL.ts:16

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

Defined in: voice/lib/classes/OutboundCallWithAnswerURL.ts:39

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

Properties

answer_url
answer_url: string[];

Defined in: voice/lib/classes/OutboundCallWithAnswerURL.ts:23

The list of answer URLs.

answerUrl
answerUrl: string[];

Defined in: voice/lib/classes/OutboundCallWithAnswerURL.ts:30

The list of answer URLs.

Deprecated

Use answer_url instead.

eventMethod?
optional eventMethod: HttpMethod;

Defined in: voice/lib/classes/OutboundCall.ts:40

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

Inherited from
OutboundCall.eventMethod
eventUrl?
optional eventUrl: string[];

Defined in: voice/lib/classes/OutboundCall.ts:35

The list of event URLs (optional).

Inherited from
OutboundCall.eventUrl
from?
optional from: PhoneEndpoint;

Defined in: voice/lib/classes/OutboundCall.ts:25

The phone endpoint object representing the caller's information.

Inherited from
OutboundCall.from
lengthTimer?
optional lengthTimer: number;

Defined in: voice/lib/classes/OutboundCall.ts:50

The length timer for the call (optional).

Inherited from
OutboundCall.lengthTimer
machineDetection?
optional machineDetection: MachineDetectionBehavior;

Defined in: voice/lib/classes/OutboundCall.ts:45

The machine detection behavior (optional).

Inherited from
OutboundCall.machineDetection
randomFromNumber?
optional randomFromNumber: boolean;

Defined in: voice/lib/classes/OutboundCall.ts:30

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

Inherited from
OutboundCall.randomFromNumber
ringingTimer?
optional ringingTimer: number;

Defined in: voice/lib/classes/OutboundCall.ts:55

The ringing timer for the call (optional).

Inherited from
OutboundCall.ringingTimer
to
to: CallEndpoint[];

Defined in: voice/lib/classes/OutboundCall.ts:20

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

Inherited from
OutboundCall.to

OutboundCallWithNCCO

Defined in: voice/lib/classes/OutboundCallWithNCCO.ts:16

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

Defined in: voice/lib/classes/OutboundCallWithNCCO.ts:31

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

Properties

eventMethod?
optional eventMethod: HttpMethod;

Defined in: voice/lib/classes/OutboundCall.ts:40

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

Inherited from
OutboundCall.eventMethod
eventUrl?
optional eventUrl: string[];

Defined in: voice/lib/classes/OutboundCall.ts:35

The list of event URLs (optional).

Inherited from
OutboundCall.eventUrl
from?
optional from: PhoneEndpoint;

Defined in: voice/lib/classes/OutboundCall.ts:25

The phone endpoint object representing the caller's information.

Inherited from
OutboundCall.from
lengthTimer?
optional lengthTimer: number;

Defined in: voice/lib/classes/OutboundCall.ts:50

The length timer for the call (optional).

Inherited from
OutboundCall.lengthTimer
machineDetection?
optional machineDetection: MachineDetectionBehavior;

Defined in: voice/lib/classes/OutboundCall.ts:45

The machine detection behavior (optional).

Inherited from
OutboundCall.machineDetection
ncco
ncco: NCCOAction[];

Defined in: voice/lib/classes/OutboundCallWithNCCO.ts:22

The list of NCCO actions.

randomFromNumber?
optional randomFromNumber: boolean;

Defined in: voice/lib/classes/OutboundCall.ts:30

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

Inherited from
OutboundCall.randomFromNumber
ringingTimer?
optional ringingTimer: number;

Defined in: voice/lib/classes/OutboundCall.ts:55

The ringing timer for the call (optional).

Inherited from
OutboundCall.ringingTimer
to
to: CallEndpoint[];

Defined in: voice/lib/classes/OutboundCall.ts:20

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

Inherited from
OutboundCall.to

Record

Defined in: voice/lib/classes/NCCO/Record.ts:8

Represents a Record action in an NCCO.

Implements

  • RecordAction

Constructors

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

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

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

Properties

action
action: RECORD = NCCOActions.RECORD;

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

The action type for the Record action.

Implementation of
RecordAction.action
beepStart?
optional beepStart: boolean;

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

Whether to play a beep before recording starts.

Implementation of
RecordAction.beepStart
eventMethod?
optional eventMethod: string;

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

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

Implementation of
RecordAction.eventMethod
eventUrl?
optional eventUrl: string[];

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

The URL where recording events will be sent.

Implementation of
RecordAction.eventUrl
format?
optional format: RecordingFormat;

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

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

Implementation of
RecordAction.format
wrappedChannels?
protected optional wrappedChannels: number;

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

The number of audio channels (1 to 32).

wrappedEndOnKey?
protected optional wrappedEndOnKey: string;

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

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

wrappedEndOnSilence?
protected optional wrappedEndOnSilence: number;

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

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

wrappedSplit?
protected optional wrappedSplit: string;

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

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

wrappedTimeOut?
protected optional wrappedTimeOut: number;

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

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

Accessors

channels
Get Signature
get channels(): undefined | number

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

Getter for the number of audio channels.

Returns

undefined | number

  • The current number of audio channels.
Set Signature
set channels(channels): void

Defined in: voice/lib/classes/NCCO/Record.ts:127

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

void

Implementation of
RecordAction.channels
endOnKey
Get Signature
get endOnKey(): undefined | string

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

Getter for the character that signals the end of recording.

Returns

undefined | string

  • The character that signals the end of recording.
Set Signature
set endOnKey(character): void

Defined in: voice/lib/classes/NCCO/Record.ts:156

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

void

Implementation of
RecordAction.endOnKey
endOnSilence
Get Signature
get endOnSilence(): undefined | number

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

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

Returns

undefined | number

  • The duration of silence (in seconds) that signals the end of recording.
Set Signature
set endOnSilence(numSeconds): void

Defined in: voice/lib/classes/NCCO/Record.ts:180

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

void

Implementation of
RecordAction.endOnSilence
split
Get Signature
get split(): "conversation"

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

Getter for the recording split type.

Returns

"conversation"

  • The recording split type, which is always 'conversation'.
Set Signature
set split(splitType): void

Defined in: voice/lib/classes/NCCO/Record.ts:205

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

void

Implementation of
RecordAction.split
timeout
Get Signature
get timeout(): undefined | number

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

Getter for the recording timeout duration in seconds.

Returns

undefined | number

  • The recording timeout duration in seconds.
Set Signature
set timeout(seconds): void

Defined in: voice/lib/classes/NCCO/Record.ts:228

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

void

Methods

serializeToNCCO()
serializeToNCCO(): RecordAction

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

Serializes the Record action to NCCO format.

Returns

RecordAction

  • The serialized Record action.

Stream

Defined in: voice/lib/classes/NCCO/Stream.ts:10

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

This action allows streaming audio into the call.

Implements

  • StreamAction
  • Serializable

Constructors

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

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

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

Properties

action
action: STREAM = NCCOActions.STREAM;

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

The action type for this NCCO action.

Implementation of
StreamAction.action
bargeIn?
optional bargeIn: boolean;

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

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

Implementation of
StreamAction.bargeIn
level?
optional level: number;

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

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

Implementation of
StreamAction.level
loop?
optional loop: number;

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

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

Implementation of
StreamAction.loop
streamUrl
streamUrl: string[];

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

An array of stream URLs to play audio from.

Implementation of
StreamAction.streamUrl

Methods

serializeToNCCO()
serializeToNCCO(): StreamAction

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

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

Returns

StreamAction

  • The serialized Stream action.
Implementation of
Serializable.serializeToNCCO

Talk

Defined in: voice/lib/classes/NCCO/Talk.ts:10

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

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

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

Properties

action
action: TALK = NCCOActions.TALK;

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

The action type for this NCCO action.

Implementation of
TalkAction.action
bargeIn?
optional bargeIn: boolean;

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

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

Implementation of
TalkAction.bargeIn
language?
optional language: string;

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

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

Implementation of
TalkAction.language
level?
optional level: string;

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

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

Implementation of
TalkAction.level
loop?
optional loop: number;

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

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

Implementation of
TalkAction.loop
premium?
optional premium: boolean;

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

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

Implementation of
TalkAction.premium
style?
optional style: string;

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

The speech style (optional).

Implementation of
TalkAction.style
text
text: string;

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

The text to be spoken during the call.

Implementation of
TalkAction.text

Methods

serializeToNCCO()
serializeToNCCO(): TalkAction

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

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

Returns

TalkAction

  • The serialized Talk action.
Implementation of
Serializable.serializeToNCCO

Voice

Defined in: voice/lib/voice.ts:103

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

Defined in: server-client/dist/lib/client.d.ts:35

Creates a new instance of the Client.

Parameters
credentials

The authentication credentials or an authentication instance.

AuthInterface | AuthParams

options?

ConfigParams

Optional configuration settings for the client.

Returns

Voice

Inherited from

Client.constructor

Properties

auth
protected auth: AuthInterface;

Defined in: server-client/dist/lib/client.d.ts:24

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

Inherited from

Client.auth

authType
protected authType: AuthenticationType = AuthenticationType.JWT;

Defined in: voice/lib/voice.ts:104

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

Overrides

Client.authType

config
protected config: ConfigParams;

Defined in: server-client/dist/lib/client.d.ts:28

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

Inherited from

Client.config

transformers
static transformers: object;

Defined in: server-client/dist/lib/client.d.ts:11

Static property containing utility transformers.

camelCaseObjectKeys
camelCaseObjectKeys: PartialTransformFunction;
kebabCaseObjectKeys
kebabCaseObjectKeys: PartialTransformFunction;
omit()
omit: (keys, obj) => TransformedObject;
Parameters
keys

string[]

obj

ObjectToTransform

Returns

TransformedObject

snakeCaseObjectKeys
snakeCaseObjectKeys: PartialTransformFunction;
Inherited from

Client.transformers

Methods

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

Defined in: server-client/dist/lib/client.d.ts:43

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

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

Defined in: server-client/dist/lib/client.d.ts:71

Adds basic authentication headers to the request.

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.addBasicAuthToRequest

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

Defined in: server-client/dist/lib/client.d.ts:64

Adds a JWT to the request.

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.addJWTToRequest

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

Defined in: server-client/dist/lib/client.d.ts:57

Adds API key and secret to the request.

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.addQueryKeySecretToRequest

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

Defined in: server-client/dist/lib/client.d.ts:50

Adds API key and secret to the request body.

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.addQueryKeySecretToRequestBody

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

Defined in: voice/lib/voice.ts:678

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');
createOutboundCall()
createOutboundCall(call): Promise<CallResult>

Defined in: voice/lib/voice.ts:270

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);
downloadRecording()
downloadRecording(file, path): Promise<void>

Defined in: voice/lib/voice.ts:637

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

Parameters
file

string

The name or recording id 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');
downloadTranscription()
downloadTranscription(file, path): Promise<void>

Defined in: voice/lib/voice.ts:657

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

Parameters
file

string

The name or transcription id of the recording 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');
earmuffCall()
earmuffCall(uuid): Promise<void>

Defined in: voice/lib/voice.ts:606

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);
getAllCalls()
getAllCalls(params): AsyncGenerator<CallDetail, void & CommonCallFields & BasicCallDetail & object, undefined>

Defined in: voice/lib/voice.ts:119

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);
}
getCall()
getCall(uuid): Promise<CallDetail>

Defined in: voice/lib/voice.ts:226

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);
getCallsPage()
getCallsPage(params): Promise<CallPageResponse>

Defined in: voice/lib/voice.ts:178

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);
}
getConfig()
getConfig(): ConfigParams

Defined in: server-client/dist/lib/client.d.ts:36

Returns

ConfigParams

Inherited from

Client.getConfig

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

Defined in: voice/lib/voice.ts:561

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);
muteCall()
muteCall(uuid): Promise<void>

Defined in: voice/lib/voice.ts:576

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);
parseResponse()
protected parseResponse<T>(request, response): Promise<VetchResponse<T>>

Defined in: server-client/dist/lib/client.d.ts:168

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

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

Defined in: voice/lib/voice.ts:323

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);
playTTS()
playTTS(uuid, action): Promise<CallUpdateResult>

Defined in: voice/lib/voice.ts:396

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);
prepareBody()
protected prepareBody(request): undefined | string

Defined in: server-client/dist/lib/client.d.ts:158

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

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

Defined in: server-client/dist/lib/client.d.ts:151

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

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

Defined in: voice/lib/voice.ts:210

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);
};
sendDeleteRequest()
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>

Defined in: server-client/dist/lib/client.d.ts:78

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

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

Defined in: server-client/dist/lib/client.d.ts:86

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, undefined | 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

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

Defined in: server-client/dist/lib/client.d.ts:94

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

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

Defined in: server-client/dist/lib/client.d.ts:104

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

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

Defined in: server-client/dist/lib/client.d.ts:114

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

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

Defined in: server-client/dist/lib/client.d.ts:124

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

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

Defined in: server-client/dist/lib/client.d.ts:144

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

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

Defined in: server-client/dist/lib/client.d.ts:135

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

Type Parameters

T

Parameters
method

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

POST | PUT | PATCH

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

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

Defined in: voice/lib/voice.ts:489

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);
stopTTS()
stopTTS(uuid): Promise<CallUpdateResult>

Defined in: voice/lib/voice.ts:429

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);
streamAudio()
streamAudio(
   uuid, 
   url, 
   loop?, 
volumeLevel?): Promise<UpdateCallResponse>

Defined in: voice/lib/voice.ts:456

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);
subscribeDTMF()
subscribeDTMF(uuid, eventUrl): Promise<void>

Defined in: voice/lib/voice.ts:353

Register a listener to receive asynchronous DTMF inputs from a call

This is only applicable to Input NCCO events with the mode set to asynchronous. The payload delivered to this URL will be an Input webhook event with a single DTMF digit every time the callee enters DTMF into the call.

Parameters
uuid

string

The UUID of the call leg

eventUrl

string

The The URL to send DTMF events to, as a POST request.

Returns

Promise<void>

A promise that resolves to the result

Example
const result = await voiceClient.subscribeDTMF('CALL_UUID', 'https://example.com/dtmf');
console.log(result.status);
transferCallWithNCCO()
transferCallWithNCCO(uuid, ncco): Promise<void>

Defined in: voice/lib/voice.ts:518

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''
  }],
)
transferCallWithURL()
transferCallWithURL(uuid, url): Promise<void>

Defined in: voice/lib/voice.ts:544

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',
);
unearmuffCall()
unearmuffCall(uuid): Promise<void>

Defined in: voice/lib/voice.ts:621

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);
unmuteCall()
unmuteCall(uuid): Promise<void>

Defined in: voice/lib/voice.ts:591

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);
unsubscribeDTMF()
unsubscribeDTMF(uuid): Promise<void>

Defined in: voice/lib/voice.ts:371

Removes the registered DTMF listener

Parameters
uuid

string

The UUID of the call leg

Returns

Promise<void>

A promise that resolves to the result

Example
const result = await voiceClient.subscribeDTMF('CALL_UUID', 'https://example.com/dtmf');
console.log(result.status);

Interfaces

NCCOTransfer

Defined in: voice/lib/interfaces/NCCO/Transfer.ts:6

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

Properties

action
action: string;

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

The action type, which is 'transfer'.

destination
destination: object;

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

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'.


URLTransfer

Defined in: voice/lib/interfaces/NCCO/Transfer.ts:31

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

Properties

action
action: string;

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

The action type, which is 'transfer'.

destination
destination: object;

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

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.

Type Aliases

Action

type Action = NCCOAction;

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

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


AdvancedMachineDetection

type AdvancedMachineDetection = object;

Defined in: voice/lib/types/AdvancedMachineDetection.ts:10

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.


BasicCallDetail

type BasicCallDetail = object;

Defined in: voice/lib/types/BasicCallDetail.ts:6

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.


CallDetail

type CallDetail = CommonCallFields & BasicCallDetail & object;

Defined in: voice/lib/types/CallDetail.ts:9

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.


CallDetailResponse

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

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

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.


CallEndpoint

type CallEndpoint = 
  | WebsocketEndpoint
  | PhoneEndpoint
  | SIPEndpoint
  | VBCEndpoint;

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

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.


CallEndpointObject

type CallEndpointObject = CallEndpoint;

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

Deprecated

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


CallEndpointResponse

type CallEndpointResponse = 
  | PhoneEndpoint
  | WebsocketEndpoint
  | SIPEndpoint
  | VBCEndpoint;

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

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.


CallListFilter

type CallListFilter = object & GetCallDetailsParameters;

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

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


CallPageResponse

type CallPageResponse = object & APILinks;

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

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.


CallResult

type CallResult = object;

Defined in: voice/lib/types/CallResult.ts:6

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.


CallUpdateResult

type CallUpdateResult = object;

Defined in: voice/lib/types/CallUpdateResult.ts:4

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.


CallWithAnswerURL

type CallWithAnswerURL = CommonOutboundCall & object;

Defined in: voice/lib/types/CallWithAnswerURL.ts:7

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.


CallWithNCCO

type CallWithNCCO = CommonOutboundCall & object;

Defined in: voice/lib/types/CallWithNCCO.ts:7

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.


CommonCallFields

type CommonCallFields = object;

Defined in: voice/lib/types/CommonCallFields.ts:6

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.


CommonOutboundCall

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

Defined in: voice/lib/types/CommonOutboundCall.ts:10

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.


ConnectAction

type ConnectAction = ConnectActionType;

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

Deprecated

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


ConversationAction

type ConversationAction = ConnectionActionType;

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

Deprecated

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


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">;

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

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.


CreateCallResponse

type CreateCallResponse = object;

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

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.


CreateOutboundCallResponse

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

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

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.


DTMFSettings

type DTMFSettings = DTMFSettingsType;

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

Deprecated

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


EarmuffCallParameters

type EarmuffCallParameters = object;

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

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

Type declaration

action
action: "earmuff";

The action to earmuff the call.


GetCallDetailsParameters

type GetCallDetailsParameters = object;

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

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.


GetCallDetailsRequest

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

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

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.


HangupCallParameters

type HangupCallParameters = object;

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

Represents parameters for hanging up a call.

Type declaration

action
action: "hangup";

The action indicating that the call should be hung up.


InputAction

type InputAction = InputActionType;

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

Deprecated

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


IOutboundCallWithAnswerURL

type IOutboundCallWithAnswerURL = CallWithAnswerURL;

Defined in: voice/lib/interfaces/OutboundCallWithAnswerURL.ts:12

Deprecated

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


IOutboundCallWithNCCO

type IOutboundCallWithNCCO = CallWithNCCO;

Defined in: voice/lib/interfaces/OutboundCallWithNCCO.ts:11

Deprecated

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


ModifyCallRequestParameters

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

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

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.


MuteCallParameters

type MuteCallParameters = object;

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

Represents parameters for muting a call.

Type declaration

action
action: "mute";

The action indicating that the call should be muted.


NCCOAction

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

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

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.


NotifyAction

type NotifyAction = NotifyActionType;

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

Deprecated

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


OutboundCall

type OutboundCall = 
  | CallWithNCCO
  | CallWithAnswerURL;

Defined in: voice/lib/types/OutboundCall.ts:9

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.


PhoneEndpoint

type PhoneEndpoint = object;

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

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.


PhoneEndpointObject

type PhoneEndpointObject = PhoneEndpoint;

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

Deprecated

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


PlayDTMFRequest

type PlayDTMFRequest = PlayDTMFParameters;

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

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.


PlayTTSParameters

type PlayTTSParameters = object;

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

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.


PlayTTSRequest

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

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

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.


PSTNEndpoint

type PSTNEndpoint = object;

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

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.


RecordAction

type RecordAction = RecordActionType;

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

Deprecated

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


SIPEndpoint

type SIPEndpoint = object;

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

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.

standardHeaders?
optional standardHeaders: object;

Standard SIP INVITE headers. Unlike the headers property, these are not prepended with X-.

standardHeaders.User-to-User?
optional standardHeaders.User-to-User: string;

Allows using the pure header that is expected in the API call.

standardHeaders.userToUser?
optional standardHeaders.userToUser: string;

Transmit user-to-user information if supported by the CC / PBX vendor, as per RFC 7433.

Link

https://tools.ietf.org/html/rfc7433

type
type: "sip";

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

uri
uri: string;

The SIP URI associated with the endpoint.


SIPEndpointObject

type SIPEndpointObject = SIPEndpoint;

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

Deprecated

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


SpeechSettings

type SpeechSettings = SpeechSettingsType;

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

Deprecated

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


StreamAction

type StreamAction = StreamActionType;

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

Deprecated

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


StreamAudioRequest

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

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

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.


TalkAction

type TalkAction = TalkActionType;

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

Deprecated

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


TransferCallParameters

type TransferCallParameters = object;

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

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.


UnearmuffCallParameters

type UnearmuffCallParameters = object;

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

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.


UnmuteCallParameters

type UnmuteCallParameters = object;

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

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.


UpdateCallResponse

type UpdateCallResponse = object;

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

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.


VBCEndpoint

type VBCEndpoint = object;

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

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.


VBCEndpointObject

type VBCEndpointObject = VBCEndpoint;

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

Deprecated

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


WebsocketEndpoint

type WebsocketEndpoint = object;

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

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.


WebsocketEndpointObject

type WebsocketEndpointObject = WebsocketEndpoint;

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

Deprecated

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

Clone this wiki locally