Learn about the Voice namespace methods in the Service Client API.
 
Methods
The Voice namespace includes the following methods:
answer
| Signature
 | 
<static> answer('interactionId', succeeded, failed)
 | 
| Description
 | 
Answers the incoming call.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
dial
| Signature
 | 
<static> dial(destination, userData, succeeded, failed)
 | 
| Description
 | 
Calls the destination in the same way Workspace Web Edition calls the destination from Team Communicator.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| destination
 | 
string
 | 
 
 | 
The call destination number.
 |  
| userData
 | 
object
 | 
 
 | 
The attached user data key/value object that is updated with each interaction event.
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
dialEx
| Signature
 | 
<static> dialEx(destination, userData, extensions, succeeded, failed)
 | 
| Description
 | 
Calls the destination with the attached data and extensions.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| destination
 | 
string
 | 
 
 | 
The call destination number.
 |  
| userData
 | 
object
 | 
 
 | 
The attached user data key/value object. Set an undefined or empty JSON object if you don't want to set any user data.
 |  
| extensions
 | 
object
 | 
 
 | 
The extensions key/value object. Set an undefined or empty JSON object if you don't want to set any extensions.
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
hangUp
| Signature
 | 
<static> hangUp('interactionId', succeeded, failed)
 | 
| Description
 | 
Releases the incoming call.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
hold
| Signature
 | 
<static> hold('interactionId', succeeded, failed)
 | 
| Description
 | 
Holds the incoming call.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
resume
| Signature
 | 
<static> resume('interactionId', succeeded, failed)
 | 
| Description
 | 
Resumes the held call.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
pauseCallRecording
| Signature
 | 
<static> pauseCallRecording('interactionId', succeeded, failed)
 | 
| Description
 | 
Pause the call recording.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
resumeCallRecording
| Signature
 | 
<static> resumeCallRecording('interactionId', succeeded, failed)
 | 
| Description
 | 
Resumes the call recording.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
startCallRecording
| Signature
 | 
<static> startCallRecording('interactionId', succeeded, failed)
 | 
| Description
 | 
Starts the call recording.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
stopCallRecording
| Signature
 | 
<static> stopCallRecording('interactionId', succeeded, failed)
 | 
| Description
 | 
Stops the call recording.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| interactionId
 | 
string
 | 
 
 | 
The interaction identifier
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
isMicrophoneMute
| Signature
 | 
<static> isMicrophoneMute(succeeded, failed)
 | 
| Description
 | 
Get the mute state of the microphone of the SIP Endpoint.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
muteMicrophone
| Signature
 | 
<static> muteMicrophone(succeeded, failed)
 | 
| Description
 | 
Mute the microphone of the SIP Endpoint.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
unmuteMicrophone
| Signature
 | 
<static> unmuteMicrophone(succeeded, failed)
 | 
| Description
 | 
Unmute the microphone of the SIP Endpoint.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
isSpeakerMute
| Signature
 | 
<static> isSpeakerMute(succeeded, failed)
 | 
| Description
 | 
Get the mute state of the speaker of the SIP Endpoint.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
muteSpeaker
| Signature
 | 
<static> muteSpeaker(succeeded, failed)
 | 
| Description
 | 
Mute the speaker of the SIP Endpoint.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 | 
unmuteSpeaker
| Signature
 | 
<static> unmuteSpeaker(succeeded, failed)
 | 
| Description
 | 
Unmute the speaker of the SIP Endpoint.
 | 
| Parameters
 | 
| Name
 | 
Type
 | 
Argument
 | 
Description
 |  
| succeeded
 | 
function
 | 
 
 | 
A function called when the operation succeeds.
 |  
| failed
 | 
function
 | 
 
 | 
A function called when the operation fails.
 |   
 |