CallRexStateServiceProxy¶
CallRexStateServiceProxy is the WCF duplex client proxy for the CallRex real-time agent-state feed. It registers/unregisters live call-state monitoring for a single client, and exposes a synchronous poll variant used by OP-AV-07 Real-time call-state monitoring. It is wrapped by CallRecordingSystem.
Purpose¶
- Establish a WSDualHttpBinding duplex connection to the CallRex
AgentStateServiceClient, delivering real-time call-state push notifications to a supplied AgentStateCallback. - Provide a one-shot synchronous method to poll all monitored users' current call state without maintaining an ongoing registration.
Context¶
- Namespace:
SAIF.Services.ClientProxies.ThirdParty - Assembly/package:
SAIF.Application.Services.AudioVideo
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| (constructor) | public CallRexStateServiceProxy(string serviceUrl, ILogService logSvc, AgentStateCallback callback) |
Configures a WSDualHttpBinding (10-minute receive timeout, ordered reliable session) and constructs the duplex AgentStateServiceClient bound to callback. |
| Register | public void Register(CallUser user, Guid clientToken) |
Adds user.Id to the callback's monitored-user list, registers for the realtime feed filtered to that user, and immediately raises the user's current state via the callback. |
| GetAllUsersCurrentCallState | public IEnumerable<CallMonitorState> GetAllUsersCurrentCallState(CallUser requestingUser) |
Registers for a one-time realtime-feed snapshot under a fresh client token, immediately unregisters, and maps each vendor state to a CallMonitorState. |
| Unregister | public void Unregister(Guid clientToken) |
Unregisters the given client token from the realtime feed. |
| Dispose | public void Dispose() (from IDisposable) |
Closes the underlying AgentStateServiceClient WCF channel. |
Behavioral notes¶
RegisterandGetAllUsersCurrentCallStateboth translate the vendor'sCallStateType(OnPhone,Recording) into the library'sCallStateenum, defaulting toIdlefor any other vendor value.Registermutates the sharedAgentStateCallback.UserIdsToMonitorlist supplied at construction, meaning multipleRegistercalls against the same callback instance accumulate monitored users rather than replacing the set.*
Constraints and usage notes¶
- Constructor arguments
serviceUrl,logSvc, andcallbackmust all be non-null/non-empty (Enforce.ArgumentNotNullOrEmpty/Enforce.ArgumentNotNull). - Instances should be disposed after use to close the underlying duplex WCF channel.
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\ClientProxies\ThirdParty\CallRexStateServiceProxy.csApplication\SAIF.Application.Services.AudioVideo\Services\ClientProxies\ThirdParty\AgentStateCallback.cs