---
title: Invalidate a call recording
summary: Removes local import status and annotates the vendor system to mark a call recording invalid.
status: draft
owner: <owner>
last_reviewed: 2026-09-15
library: SAIF.Application.Services.AudioVideo
reference_type: package
operation_id: OP-AV-02
trigger: External caller invokes IAudioVideoService.InvalidateRecording with a CallRecording
---

# Invalidate a call recording

This operation marks a previously imported recording invalid without deleting vendor-side data — it removes the local import-status tracking row and annotates the vendor system's attached-data description instead.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-AV-02 |
| **Trigger** | External caller invokes `IAudioVideoService.InvalidateRecording(CallRecording recording)`. |
| **Inputs** | `CallRecording` — must be non-null; unlike most other public methods in this library, there is no explicit null check before dereferencing `recording.Id`*. |
| **Outputs** | None (void). |
| **Primary components** | `AudioVideoService.InvalidateRecording` |
| **Entry point** | `Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs` |

## Steps

1. Guard: throw `NotImplementedException` if the service was constructed via the degraded constructor (`_enableServicesFlag == false`).
   - If `recording` is null: a `NullReferenceException` surfaces from the later `recording.Id` dereference rather than a validated argument exception — a null-guarding inconsistency compared to other methods in this library*.
2. Remove the local import status row by calling `_importStatusManager.RemoveStatus(recording.Id)`, deleting the `AudioImportStatus` row if present.
3. Mark the recording invalid at the vendor by calling `_recordingSystem.MarkInvalid(recording)`, which delegates to `CallRexServiceProxy.MarkInvalid`. The proxy calls the vendor `UpdateAttachedDataByCallLogID` SOAP method with an `AttachedDataContainer` whose `Description` is prefixed `"Invalid:" + recording.Description` — [BR-AV-10](../business-rules.md#br-av-10-invalidate-annotates-vendor-description).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([InvalidateRecording invoked]) --> Guard{Degraded mode?}
	Guard -->|Yes| ErrNotImpl([NotImplementedException])
	Guard -->|No| Remove[Remove AudioImportStatus row]
	Remove --> MarkInvalid[Mark invalid at CallRex<br>BR-AV-10]
	MarkInvalid --> End([Return])
```

## Failure and edge-case behavior
- A null `recording` argument raises an unguarded `NullReferenceException` instead of a validated `ArgumentNullException`, unlike the `Enforce.ArgumentNotNull` pattern used elsewhere in this library*.
- Degraded-mode construction blocks this operation entirely with `NotImplementedException`.
- The vendor recording is never deleted by this operation — only its attached-data description is annotated, preserving the underlying vendor record.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs`
- `Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\ImportStatusManager.cs`
- `Application\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\CallRexServiceProxy.cs`
