Class SrcUserAgent
SIP Recording Client (SRC) User Agent class. This class handles all calls being recorded by a SIP Recording Server (SRS) using a single, permanent connection to the SRS. It also logs NG9-1-1 I3V3 events.
To use this class, construct an instance of it, hook the events and then call the Start() method.
Call the Shutdown() method to close all network connections and release resources when the application is closing or when the interface to the SIPREC recorder is no longer needed.
Inherited Members
Namespace: SipRecClient
Assembly: SipRecClient.dll
Syntax
public class SrcUserAgent : QueuedActionWorkerTask
Constructors
| Edit this page View SourceSrcUserAgent(SipRecRecorderSettings, MediaPortManager, X509Certificate2, string, string, string, I3LogEventClientMgr, bool)
Constructor
Declaration
public SrcUserAgent(SipRecRecorderSettings settings, MediaPortManager portManager, X509Certificate2 certificate, string agencyID, string agentID, string elementID, I3LogEventClientMgr i3LogEventClientMgr, bool enableLogging)
Parameters
Type | Name | Description |
---|---|---|
SipRecRecorderSettings | settings | Configuration settings |
MediaPortManager | portManager | Used for allocating UDP and TCP ports for media streams. |
X509Certificate2 | certificate | X.509 certificate to use for SIP over TLS (SIPS) and MSRP over TLS (MSRPS). Required even if TLS is not currently in use. |
string | agencyID | Identity of the agency that is recording and logging calls |
string | agentID | Identity of the agent or call taker that is recording and logging calls. |
string | elementID | NG9-1-1 Element Identifier of the entity recording calls. |
I3LogEventClientMgr | i3LogEventClientMgr | Used for logging NG9-1-1 events. Required if NG9-1-1 event logging is required. If not using NG9-1-1 event logging, pass in a default I3LogEventClientMgr object that contains an empty list of I3LogEventClient objects. |
bool | enableLogging | If true then I3 event logging is enabled. |
Properties
| Edit this page View SourceEnabled
Gets the Enabled setting
Declaration
public bool Enabled { get; }
Property Value
Type | Description |
---|---|
bool |
SrsResponding
Gets the status of the SIP Recording Server (SRS)
Declaration
public bool SrsResponding { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceDoTimedEvents()
Declaration
protected override void DoTimedEvents()
Overrides
| Edit this page View SourceHandleReInvite(SrcCallParameters)
Call this method after the call being recorded has been re-invited. A re-INVITE can occur in order to re-target media and/or to add new media to an existing call.
If the call being recorded is re-invited just to retarget existing media, then it is necessary to hook the events of any RtpChannel and MsrpConnection objects of the call and it is not necessary to send a re-INVITE to the SRS or to rebuild the SIPREC metadata.
If media is added to the call being recorded, then it is necessary to send a re-INVITE request to the SRS with updated SIPREC metadata.
Declaration
public void HandleReInvite(SrcCallParameters newSrcCallParameters)
Parameters
Type | Name | Description |
---|---|---|
SrcCallParameters | newSrcCallParameters | Updated parameters for the SRC call |
Shutdown()
Shuts down all SIP transport connections and releases resources.
Declaration
public override Task Shutdown()
Returns
Type | Description |
---|---|
Task |
Overrides
| Edit this page View SourceStart()
Initializes the SIP transport interface to the SRS and starts communication with the SRS.
Declaration
public override void Start()
Overrides
| Edit this page View SourceStartRecording(SrcCallParameters)
Starts the SIPREC recording process for a new call
Declaration
public void StartRecording(SrcCallParameters srcCallParameters)
Parameters
Type | Name | Description |
---|---|---|
SrcCallParameters | srcCallParameters | Contains the parameters for the new call |
StopRecording(string)
Call this method to stop recording when a call has ended.
Declaration
public void StopRecording(string strCallId)
Parameters
Type | Name | Description |
---|---|---|
string | strCallId | Call-ID for the call. |
Events
| Edit this page View SourceSrsStatusChanged
This event is fired when the status of the SRS changes. This event will not be fired if the EnableOptions property of the SipRecRecorderSettings object for this SRC is false.
Declaration
public event SrsStatusDelegate? SrsStatusChanged
Event Type
Type | Description |
---|---|
SrsStatusDelegate |