Add handler for specific event generated by call in specific application state. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler will be called.
Answer incoming call. Use it only for connecting non-P2P legs. Remember that you can use the Call.startEarlyMedia method before answering a call.
Custom parameters for answering calls.
Answer incoming call in peer-to-peer mode. Use it only for connecting P2P legs.
Returns Caller ID of the calling user, that is displayed to the called user. Normally it's some phone number that can be used for callback. IMPORTANT: virtual numbers rented from Voximplant can't be used as CallerID, the values can be only real numbers.
Custom call data to set. Maximum size is 200 bytes.
Enables or disables progress tone detection. Calling this method without an argument is equal to the call with true. Can be used only for outgoing calls. If progress tone is detected, the CallEvents.ToneDetected event will be triggered for the call object. Note that event is triggered only if the CallEvents.Connected event was triggered before.
true/false enable/disable progress tone. It's false by default.
Enables or disables Voicemail tone detection. Can be used only for outgoing calls. Tone signal is in the range 500 - 2000 Hz on the call. Right after the method's call VoxEngine will start to scan a media stream. The scanning will stop after the timeout. If Voicemail tone is detected (or is not detected for some time), the CallEvents.VoicemailToneDetected or CallEvents.VoicemailToneNotDetected event will be triggered for the call object.
Returns a name of the calling user, that is displayed to the called user. Normally it's a human-readable version of Call.callerid, e.g. a person's name.
Enables or disables detection of microphone status in the call. If detection is enabled, the CallEvents.MicStatusChange event will be triggered at each status' change.
Enable/disable microphone status analysis. It's false by default.
Change DTMF processing mode. If it's true, each received signal triggers the CallEvents.ToneReceived.
Enable/disable DTMF analysis. It's false by default.
Start finishing a call. Firstly it triggers the CallEvents.Disconnected event immediately. If there are no other active calls and/or ACD requests in a call session the AppEvents.Terminating and AppEvents.Terminated events will be triggered in 60 seconds (see the details in VoxEngine session limits).
Returns a dialed number of inbound or outbound call.
Provides country-specific progress tones. The method sends a command to the Voximplant cloud to start playing progress tones in the call. So the progress tones totally depend on the Voximplant cloud. Note that in order to work properly in a call that is not connected yet, you need to call the Call.startEarlyMedia method before using this function. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.
Start recording incoming and outgoing audio for this call. This method triggers the CallEvents.RecordStarted event. The default quality is 8kHz / 32kbps; the format is mp3. See this article for details.
Reject an incoming call. Firstly it triggers the CallEvents.Disconnected event immediately. The AppEvents.Terminating and AppEvents.Terminated events will be triggered in 60 seconds.
Provides progress tones for the incoming call. The method sends a low-level command to the endpoint device to start playing progress tones in the call. So the progress tones depend on endpoint device's behavior rather than the Voximplant cloud. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.
Say some text to the CallEvents.Connected call. If text length exceeds 1500 characters the PlayerEvents.PlaybackFinished event will be triggered with error description. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.
Language and voice to be used. List of all supported languages: Language. The default value is Language.UK_ENGLISH_FEMALE.
Optional parameters for TTS. SSML markup can be used to control aspects of speech such as pronunciation, volume, pitch, rate, etc. Note that if you specify at least one of ttsoptions, Voxengine automatically adds the <speak>...</speak> tags to either end of a passed string. If you want to use other SSML tags, specify the <speak>...</speak> tags manually.
Message content. Maximum size is 8192 bytes according to the limits.
Start sending media (voice and video) from this call to media unit specified in targetMediaUnit. The target call has to be CallEvents.Connected earlier. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.
Send text message during the call. See the similar methods in the WEB / iOS / Android SDKs.
Message text. Maximum size is 8192 bytes according to the limits.
Informs call endpoint that early media will be sent before accepting the call. It allows playing voicemail prompt or music during establishing the connection. It doesn't allow to listen to call endpoint. Note that unanswered call can be in "early media" state only for 60 seconds, see the VoxEngine session limits for details.
Internal information about codecs from the AppEvents.CallAlerting event.
Set the maximum possible video bitrate for the end user device in kbps.
Starts to play audio file to the Call.answer-ed call. You can stop playback manually by using the Call.stopPlayback method. After the very first playback, a file will be cached; the cache data is available up to 2 weeks. Note that cache addresses only the URL, without additional headers. The cached file is available for all applications and further sessions. File downloading has a timeout of 12 seconds. Reaching this timeout causes the "Timeout was reached" error. Media streams can later be attached using the Call.sendMediaTo method etc. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.
Url of an audio file. Supported formats are: mp3, ogg & flac (mp3, speex, vorbis and flac codecs respectively). Maximum file size is 10 Mb.
If it's true, playback will be looped.
Stop audio playback that was started before by calling the Call.startPlayback method.
Returns VAD (Voice Activity Detection) status. The including of the ASR also activates VAD so in that case vad() returns true.