Associate a Tag with a Recording
LiveSwitch supports associating a tag or metadata to a recording. When an application enables recording within a session, you can assign a unique ID (tag) to each recording so that application-level information can be associated with that recording for its lifecycle. This unique ID or tag can be any sort of contextual information such as:
- A user that enables a recording, or
- A call center that wants to add its representative's call ID to a recording.
This is useful especially in the later parts of a recording lifecycle after it has been mixed or is about to expire when the original context is long gone.
For example, when a recording is mixed and ready, you can associate it back to the user that enabled the recording so as to send them a notification, check their account level, and set an appropriate expiry. You can store this user information in the recording tag when enabling the recording and then acting on that information later when the appropriate events fire out of LiveSwitch Server.
Use the LiveSwitch SDK to associate a tag to a recording.
// ChannelClaims must have the "CanUpdate" flag set to true
var ChannelClaims = new[] { new ChannelClaim(ChannelId) { CanUpdate = true } };
var channelConfig = new ChannelConfig();
channelConfig.Recording = true;
channelConfig.RecordingTag = "My recording tag";
_Channel.Update(channelConfig);
Use the REST API to associate a tag to a recording on an active channel, user, device, client, or connection. REST API is the only way to associate a tag to a recording for a subset of connections instead of all connections on the channel.
PUT /api/v1/applications/{applicationId}/channels/{channelId}
PUT /api/v1/applications/{applicationId}/channels/{channelId}/users/{userId}
PUT /api/v1/applications/{applicationId}/channels/{channelId}/users/{userId}/devices/{deviceId}
In all cases, the body of the PUT request must have the following:
{
"recordingTag": "string"
}
Note
Other requirements for the calls can be found in their respective REST API documentation linked above.