CallRex WCF proxy operations¶
CallRecordingSystem (the sole IRecordingSystem implementation) composes two WCF client wrappers — CallRexServiceProxy and CallRexStateServiceProxy — that talk to the third-party CallRex call-recording system's ClientService and AgentStateService endpoints. This page documents both proxies as one cross-cutting integration operation because they are always used together by CallRecordingSystem and share the same authentication pattern.
| Field | Value |
|---|---|
| Operation ID | OP-AV-CALLREX-PROXY |
| Trigger | Any IRecordingSystem member call routed through CallRecordingSystem (GetRecording, GetRecordings, GetCallUsers, GetAllUsersCurrentCallState, GetCallUser, MarkInvalid, DeleteRecording, StartRecording, StopRecording, PauseRecording, ResumeRecording, StartMonitoring, StopMonitoring) |
| Inputs | Varies by member: Guid recording/user identifiers, CallUser, RealtimeUserState (from the agent-state callback) |
| Outputs | CallRecording/CallUser collections, bool success flags, and CallMonitorState events raised through OnCallStateChanged |
| Primary components | CallRecordingSystem, CallRexServiceProxy, CallRexStateServiceProxy, AgentStateCallback |
| Entry point | Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\RecordingSystem.cs |
Steps¶
CallRexServiceProxywrapsCore.ThirdParty.CallRex.ClientServiceClient(WCF, endpoint address resolved at runtime fromAudioImportService.callRexServiceUrl; design-timeapp.configaddress ishttp://localhost:8002/ClientService, SPN identityqmssvc@corp.saif.com).- On construction, eagerly calls
_webService.Login("AI", "AudioImporter")— a hard-coded service-account credential pair. - All state-changing calls (
MarkInvalid,DeleteRecording,StartRecording,StopRecording,PauseRecording,ResumeRecording) are wrapped inAuthorizeClientServiceCall, which adds custom SOAP headersUsername/Password(same hard-coded credentials) to every outgoing message viaOperationContextScope. CallRexStateServiceProxywrapsCore.ThirdParty.CallRexAgentState.AgentStateServiceClient(dual/duplex WCF binding, endpoint resolved at runtime fromAudioImportService.callRexStateServiceUrl; design-timeapp.configaddresses arenet.tcp://localhost:8015/AgentStateServiceorhttp://localhost:8003/AgentStateService2).CallRexStateServiceProxypushes real-time agent call-state callbacks throughAgentStateCallback.ReceiveState, which converts the incomingRealtimeUserStateand raisesCallStateChanged.CallRecordingSystem.CallState_Changedhandles that delegate and re-raises it as theOnCallStateChangedevent exposed toCallRecordingSystemcallers.CallRecordingSystem.GetRecordings(string userId)resolves aCallUserfirst viaGetCallUser(case-insensitiveUserIdmatch), then delegates toGetRecordings(CallUser)— a two-step lookup rather than a single direct query.
Process flow¶
The following diagram visualizes the recording-control and agent-state-monitoring call paths.
flowchart TD
Consumer[AudioVideoService / IRecordingSystem consumer] --> RS[CallRecordingSystem]
RS -->|Recording retrieval/control| Proxy1[CallRexServiceProxy]
Proxy1 -->|Login once, auth header per call| ClientService["CallRex ClientService (WCF)"]
RS -->|Agent-state monitoring| Proxy2[CallRexStateServiceProxy]
Proxy2 -->|Duplex/callback| AgentStateService["CallRex AgentStateService (WCF)"]
AgentStateService -.->|RealtimeUserState| Callback[AgentStateCallback]
Callback --> RS
RS -->|OnCallStateChanged| Consumer
Failure and edge-case behavior¶
- A failed
LoginatCallRexServiceProxyconstruction leaves the proxy unable to authorize any subsequent state-changing call. GetRecordings(string userId)returns no recordings ifGetCallUsercannot resolve a matchingCallUserfor the givenuserId.- The hard-coded CallRex credentials (
"AI"/"AudioImporter") are compiled directly intoCallRexServiceProxyrather than retrieved viaIEnvironmentService.GetSecureConfigSetting— see Configuration for the associated configuration/secrets-management risk.
Related documentation¶
Sources¶
Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\RecordingSystem.csApplication\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\CallRexServiceProxy.csApplication\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\CallRexStateServiceProxy.csApplication\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\AgentStateCallback.csApplication\SAIF.Application.Services.AudioVideo.32\app.config