Real-time call-state monitoring¶
This operation family lets an external caller (e.g., a live agent-monitoring UI) subscribe to or poll real-time call-state updates for one or more users from the CallRex vendor system. Unlike the other operations in this library, it has no database interaction — it is a pure WCF pass-through to the vendor real-time feed.
| Field | Value |
|---|---|
| Operation ID | OP-AV-07 |
| Trigger | External caller invokes CallRecordingSystem.StartMonitoring(CallUser user), StopMonitoring(), or GetAllUsersCurrentCallState(CallUser requestingUser). |
| Inputs | CallUser (subscribe/poll target) |
| Outputs | OnCallStateChanged events (subscribe path); IEnumerable<CallMonitorState> (poll path). |
| Primary components | CallRecordingSystem.StartMonitoring / StopMonitoring / GetAllUsersCurrentCallState, CallRexStateServiceProxy, AgentStateCallback |
| Entry point | Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\RecordingSystem.cs |
Steps¶
StartMonitoring(CallUser user)registers the caller's_clientTokenand targetuserwithCallRexStateServiceProxy.Register.- The proxy calls the vendor
AgentStateServiceClient.RegisterForRealtimeFeedOnReportsFilteredand immediately raises the initial state through theAgentStateCallbackduplex WCF callback contract. - Ongoing state changes arrive asynchronously via
AgentStateCallback.ReceiveState, which filters to only the currently-monitoredUserIdsToMonitorand raisesCallStateChanged→CallRecordingSystem.CallState_Changed→ theOnCallStateChangedevent to the library's caller. StopMonitoring()callsCallRexStateServiceProxy.Unregister(_clientToken), which invokes the vendorUnregisterForRealtimeFeed.GetAllUsersCurrentCallState(CallUser requestingUser)is a synchronous poll variant: it registers, immediately reads via the vendorRegisterForRealtimeFeedOnReports, unregisters, and maps each vendorExtendedRealtimeUserStateto aCallMonitorState.
Process flow¶
The following diagram visualizes this operation family's control flow.
flowchart TD
Start([StartMonitoring invoked]) --> Register[Register with CallRexStateServiceProxy]
Register --> Vendor["Vendor: RegisterForRealtimeFeedOnReportsFiltered"]
Vendor --> Callback[AgentStateCallback.ReceiveState]
Callback --> Filter{User in UserIdsToMonitor?}
Filter -->|Yes| Raise[Raise OnCallStateChanged]
Filter -->|No| Ignore([Ignore update])
Stop([StopMonitoring invoked]) --> Unregister[Unregister with CallRexStateServiceProxy]
Poll([GetAllUsersCurrentCallState invoked]) --> RegisterPoll[Register] --> ReadPoll["Vendor: RegisterForRealtimeFeedOnReports"] --> UnregisterPoll[Unregister] --> Map[Map to CallMonitorState list]
Failure and edge-case behavior¶
- No database interaction occurs in this operation family — it is purely a WCF pass-through to the vendor real-time feed.
CallRexStateServiceProxyusesWSDualHttpBindingwith security modeNone, so the real-time duplex channel carries no transport or message security.
Related documentation¶
Sources¶
Application\SAIF.Application.Services.AudioVideo\Services\Utilities\AudioVideo\RecordingSystem.csApplication\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\CallRexStateServiceProxy.csApplication\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\AgentStateCallback.cs