Skip to content

SAIF.Application.Services.AudioVideo overview

Documentation context: Packaged Component (NuGet)

SAIF.Application.Services.AudioVideo is a single-assembly Framework4 component library that imports call recordings from the third-party CallRex call-recording appliance into SAIF, tracks their import status, and exposes a vendor-integration adapter for on-demand recording operations and a real-time agent-state feed.

Purpose

  • Orchestrate the end-to-end import of a call recording from the CallRex vendor system into SAIF: validate the import request, create or reuse a database record, back up and transcode the source media file, verify the result, remove the source recording from CallRex, and track import status throughout.
  • Provide a persistence-agnostic contract layer (IAudioVideoService, IRecordingSystem, IImportStatusManager) that decouples callers from the NHibernate persistence layer and the CallRex WCF vendor integration.
  • Isolate all communication with the CallRex vendor system behind a single adapter (CallRecordingSystem/IRecordingSystem), including both on-demand SOAP operations and a real-time duplex agent-state feed.
  • Consumed by applications elsewhere in the SAIF ecosystem that need to import, invalidate, or query call recordings, or monitor live agent call state.*

Responsibilities

  • Validate inbound import requests (AudioVideoValidator) before any database, file-system, or vendor-system action is taken.
  • Persist and query Recording and AudioImportStatus entities via NHibernate (IUnitOfWork/IRepository<T>).
  • Perform file-system side effects: back up the source recording file, verify integrity via MD5 hash, and transcode it to .wma using the bundled ffmpeg.exe (via MediaToolkit).
  • Delete successfully-imported recordings from the CallRex vendor system and mark local import status accordingly.
  • Relay real-time agent/call-state updates from CallRex to library consumers via the AgentStateCallback duplex WCF callback.

Key components

  • AudioVideoService: single public entry point (IAudioVideoService) that orchestrates the import, invalidation, cancellation, and lookup workflows.
  • AudioVideoValidator: FluentValidation rule set enforced against every ImportAudioRequest.
  • ImportStatusManager: tracks per-recording AudioImportStatus state independently of the Recording entity.
  • CallRecordingExtensions: computes recording description and legal-discoverability classification.
  • CallRecordingSystem: adapter (IRecordingSystem) that fronts the two CallRex WCF proxies.
  • CallRexServiceProxy / CallRexStateServiceProxy: WCF client proxies for on-demand recording operations and the real-time duplex agent-state feed, respectively.
  • AudioImportStatusMap / RecordingMap: FluentNHibernate ClassMap<T> mappings for the audio_import_status and RECORDING tables.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Application\SAIF.Application.Services.AudioVideo\SAIF.Application.Services.AudioVideo.csproj
  • Application\SAIF.Application.Services.AudioVideo\Core\Services\IAudioVideoService.cs
  • Application\SAIF.Application.Services.AudioVideo\Core\Contracts\AudioVideo\IRecordingSystem.cs
  • Application\SAIF.Application.Services.AudioVideo\Core\Contracts\AudioVideo\IImportStatusManager.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoService.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\AudioVideoValidator.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\ImportStatusManager.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\CallRecordingExtensions.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\RecordingSystem.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\CallRexServiceProxy.cs
  • Application\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\CallRexStateServiceProxy.cs
  • Application\SAIF.Application.Services.AudioVideo\Data\Mappings\AudioImportStatusMap.cs
  • Application\SAIF.Application.Services.AudioVideo\Data\Mappings\RecordingMap.cs