Sending Debug Recording Files to Azure Blob Storage

You can configure the device to send locally stored debug recording files to your Microsoft Azure Blob Storage account (container).

When you start debug recording, the device duplicates all sent and received messages. The device writes these messages to debug recording files, which it creates and stores temporarily on the device's hard disk of the server platform on which the device is installed.

The files are temporarily stored in the /debug-recording folder. New debug recordings are stored in a file called "Current". Once this file meets a user-defined criteria—maximum file size or rotation period (whichever occurs first)—a debug recording file is created. The device compresses the debug recording into a GZIP file (.gz) and assigns it a name based on the following format:

<Deployment ID>_<Prefix>_DR_<Serial Number>_<YYYY>_<Month>_<DD>_<HH_MM_SS>_<Sequence>.gz

Where:

<Deployment ID> is a deployment identification that is included only when the device is deployed through AudioCodes Live Platform. The ID is configured by AudioCodes (DeploymentID ini file parameter).
<Prefix> is an optional, user-defined prefix string (discussed later in this section). A prefix may be useful for easily identifying and categorizing debug recording files.
<Serial Number> is the device's serial number (S/N).
<YYYY>_<Month>_<DD>_<HH_MM_SS> is the date and time of the file creation.
<Sequence> is a unique sequence number which is incremented for each new file.

Once the file created, the device sends it to the Azure Blob storage container (and deletes the file from local storage).

If you disable local storage (i.e., 'Local Storage' parameter configured to Disable), the device deletes all existing debug recording files.
When the device operates in High-Availability (HA) mode, active and redundant devices maintain their own locally stored debug recording files. In other words, upon an HA switchover the stored debug recording files on the active device are not copied to the redundant device (which becomes the new active device).
For a detailed description of the parameters in this section, see Syslog, CDR and Debug Parameters.

Configuration for sending debugging recording files to Azure Blob storage includes the following main steps:

Generating a SAS token key
Configuring the device for sending debug recording files to Azure Blob storage

Generating SAS Token for Blob Storage Container

Before you can configure the device, you need to generate a Shared Access Signature (SAS) token for your Blob storage container where you want the device to send the debug recording files. This process also includes other container settings such as token expiration date.

This section assumes that you have an Azure Blob Storage account with a storage container.
Make sure to renew the token key before it expires to ensure uninterrupted receipt of the debug recording files sent to your Blob storage.
To generate a SAS token:
1. Log in to your Microsoft Azure portal account.
2. Access the Storage accounts page, and then select the relevant Blob Storage account.
3. Navigate to Data storage > Containers, and then select the container where you want to store the debug recording files.
4. Right-click the container, and then from the drop-down menu, choose Generate SAS; the Generate SAS dialog box opens.
5. In the Generate SAS dialog box, configure access settings to the storage:
a. Under the Signing method group, select the Account key option.
b. From the 'Signing key' drop-down list, select Key 1.
c. From the 'Stored access policy' drop-down list, select a shared access policy.
d. From the 'Permissions' drop-down list, select (check) all the listed permissions check boxes.
e. In the 'Start' and 'Expiry' fields, define the start and expiry time-date of the signed key, respectively.
f. Under the Allowed protocols group, select the HTTPS only option to allow only requests using the HTTPS protocol.
g. Click the Generate SAS token and URL button; a shared access signature (SAS) token and URL are generated and displayed in the fields below the button:

6. In the 'Blob SAS token' field, click the copy-to-clipboard icon and paste the token in a secure location.
7. In the 'Blob SAS URL' field, copy the URL up until "sp=" (not including) and paste in a secure location.

You can also obtain the URL from your Azure storage account settings, by navigating to Settings > Endpoints, and then copying it from the 'Primary endpoint' field.

 

Configuring Device to Send Debug Recording Files to Azure Blob Storage

Once you've configured your Azure Blob Storage container and generated a SAS token, you can configure the device.

To configure device for Azure Blob storage of debug recording files:
1. Open the Logging Filters table (see Configuring Log Filter Rules), and then enable local storage for debug recording, by configuring a log filtering rule with the following settings:
'Filter Type': Configure this parameter to any value.
'Value': If 'Filter Type' is configured to any value except Any, then configure this parameter; otherwise, leave it empty.
'Log Destination': Select Local Storage.
'Log Type': Select any value, except CDR or SIP Ladder.
'Mode': Select Enable.
2. Open the Debug Recording page (Troubleshoot tab > Troubleshoot menu > Logging folder > Debug Recording).
3. Under the Local File Storage group, configure the following:
a. From the 'Local Storage' drop-down list, select Enable.
b. From the 'Recording' drop-down list, select Enable to start file creation and local storage of debug recording.
c. In the 'File Size' field, enter the maximum size of the debug recording file. When the "Current" file reaches this size, the device creates a debug recording file. However, if the 'Rotation Period' parameter value (see below) is reached before the file has reached this maximum size, the debug recording file is created.
d. In the 'Rotation Period' field, enter the periodic duration (in minutes) of how often a debug recording file is created from the "Current" file (even if empty). For example, if configured to 60, a debug recording file is created every hour (or before, if the maximum size is reached).
e. (Optional) In the 'File Name Prefix' field, type a prefix for the name of the debug recording file.
f. From the 'Storage Location' drop-down list, select Azure Blob.

4. Under the Azure Blob Storage group, configure the following:
a. In the 'Storage URL' field, paste the URL of the Blob storage container that you copied in the previous section.
b. In the 'Container' field, type the name of the Blob storage container.
c. In the 'Account Key' field, paste the SAS token key that you copied in the previous section.

5. Click Apply; the device calculates the required storage size for the debug recording files (number of files x file size):
If the device has sufficient storage size, it accepts your configuration and reserves disk space for the debug recording file.
If there is insufficient storage size, the device displays an error message. In this scenario, configure the 'Local Storage' parameter to Disable.

The status of the local file storage is displayed in the read-only 'Operational Status' field:

"On" indicates that debug recording is active (recording)
"Off" indicates that debug recording is not active