Enable Earmuff on Emergency Call
Enables earmuff mode on an active emergency call. When earmuff is enabled, you will not hear audio from the emergency operator, but they will still be able to hear you.
Signature
// Callback version
fun enableEarmuffEmergencyCall(
callId: EmergencyCallId,
callback: (Exception?) -> Unit
)
// Suspend version
suspend fun enableEarmuffEmergencyCall(
callId: EmergencyCallId
)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
callId | string | Yes | Unique identifier of the emergency call |
Return Type
Returns void (or Promise<void> for JavaScript/TypeScript). The method completes successfully when earmuff is enabled, or throws an error if the operation fails.
Usage Example
// Callback
client.enableEarmuffEmergencyCall("callId") { err ->
err?.let {
// Handle Error in enabling earmuff on emergency call
println("Error in enabling earmuff on emergency call: $err")
} ?: run {
println("Earmuff enabled on emergency call successfully")
}
}
// Coroutine
try {
client.enableEarmuffEmergencyCall("callId")
println("Earmuff enabled on emergency call successfully")
} catch (e: Exception) {
// Handle Error in enabling earmuff on emergency call
}
Errors
| Error Type | Error Code | Description |
|---|---|---|
INTERNAL_ERROR | voice:error:no_call_found | No emergency call found with the specified call ID |
INTERNAL_ERROR | Media client errors | Errors from the media layer when attempting to enable earmuff |
UNKNOWN_ERROR | N/A | Unexpected error that should be reported to support |
For complete error reference and handling guidelines, see Error Reference.
Notes
- Earmuff mode blocks incoming audio - you won't hear the emergency operator
- The emergency operator can still hear you when earmuff is enabled
- Use
disableEarmuffEmergencyCallto disable earmuff mode - The call must be active and have an established media connection
- This is a local media operation and does not require server communication
- Earmuff is useful when you need to consult with someone nearby without the operator hearing
Related Actions
disableEarmuffEmergencyCall- Disable earmuff mode