---title: CallPrompt---Represents a current or past prompting session in a call. You can obtain instances of this class by starting a Prompt with one of the following methods:- [Call.prompt](./voice-call.mdx#prompt)- [Call.promptAudio](./voice-call.mdx#promptaudio)- [Call.promptRingtone](./voice-call.mdx#promptringtone)- [Call.promptTTS](./voice-call.mdx#prompttts)#### ExamplePrompting for a PIN to be entered using the keypad, then waiting for the user tofinish entering the PIN before proceeding with the next instructions.jsimport { Voice } from @signalwire/realtime-api;const client = new Voice.Client({ project: , token: , contexts: [office],});const call = await client.dialPhone({ from: +YYYYYYYYYY, to: +XXXXXXXXXX,});// Prompt for digitsconst prompt = await call.promptTTS({ text: Please enter your PIN, digits: { max: 5, digitTimeout: 5, terminators: #*, },});const { digits } = await prompt.ended();console.log(Entered PIN:, digits);## Accessors### confidence• get **confidence**(): numberConfidence level for the speech recognition result (if [type](#type) is speech), from 0 to 100. For example, 83.2.#### Returnsnumber---### digits• get **digits**(): stringThe digits that have been collected (if [type](#type) is digit). For example, 12345.#### Returnsstring---### id• get **id**(): stringThe unique id for this prompt.#### Returnsstring---### reason• get **reason**(): no_match | no_input | errorAlias for [type](#type), in case of errors. Use this field to check the reason of the error.#### Returnsno_match | no_input | error---### terminator• get **terminator**(): stringThe terminator used to complete the prompt (if [type](#type) is digit). For example, #.#### Returnsstring---### text• get **text**(): stringThe text that has been collected (if [type](#type) is speech). For example, hello whos there.---### type• get **type**(): error | no_input | no_match | digit | speechThe type of this prompt.#### Returnserror | no_input | no_match | digit | speech## Methods### ended▸ **ended**(): Promise<[CallPrompt](./callprompt.mdx)\>Returns a promise that is resolved only after this prompt finishes (or is stopped).#### ReturnsPromise<[CallPrompt](./callprompt.mdx)\>#### Examplejsconst prompt = await call.promptTTS({ text: Please enter your PIN, digits: { max: 5, digitTimeout: 2, terminators: #*, },});const { type, digits, terminator } = await prompt.ended();---### setVolume▸ **setVolume**(volume): Promise<[CallPrompt](./callprompt.mdx)\>Changes the volume of the audio.#### Parameters| Name | Type | Description || :------- | :------- | :------------------------------------ || volume | number | Volume value between -40dB and +40dB. |#### ReturnsPromise<[CallPrompt](./callprompt.mdx)\>#### Examplejsconst prompt = await call.promptTTS({ text: Please enter your PIN, digits: { max: 5, digitTimeout: 2, terminators: #*, },});await prompt.setVolume(-20);---### stop▸ **stop**(): Promise<[CallPrompt](./callprompt.mdx)\>Stops the prompt.#### ReturnsPromise<[CallPrompt](./callprompt.mdx)\>#### Examplejsconst prompt = await call.promptTTS({ text: Please enter your PIN, digits: { max: 5, digitTimeout: 2, terminators: #*, },});await prompt.stop();---### ~~waitForResult~~▸ **waitForResult**(): Promise<[CallPrompt](./callprompt.mdx)\>Returns a promise that is resolved only after this prompt finishes (or is stopped).:::cautionThis method is deprecated. See [ended](#ended) instead.:::