playRingtone
playRingtone
- playRingtone(
params):Promise<CallPlayback>
Plays a ringtone.
Parameters
params
Object containing the parameters for playing a ringtone.
name
The name of the ringtone. See RingtoneName.
duration
Duration of ringtone to play in seconds. Defaults to 1 ringtone iteration.
volume
Volume value between -40dB and +40dB where 0 is unchanged.
Returns
Promise<CallPlayback>
A promise that resolves to a CallPlayback object that you can use to
view the current state and results of the play session.
Example
In this example, we dial a phone number and play a ringtone for a duration of 10 seconds. Once the ringtone is finished playing, we hangup the call.