SIP Trunk Recording Export Fails with 500 Error for Legal Hold Metadata

Can anyone explain why the bulk export job for SIP trunk recordings is failing with a 500 Internal Server Error when we include specific legal hold metadata filters? We are running a recurring export job via the /api/v2/recordings/exports endpoint to pull audio files and metadata for a specific legal discovery request. The environment is Genesys Cloud EU (eu-west-1), and we are using the BYOC S3 integration for storage.

The export job initiates correctly and processes the initial metadata scan. However, as soon as the job attempts to filter recordings based on the custom attribute “legal_hold_status” set to “active”, the job status changes to “FAILED”. The error response in the job details shows:

{
 "code": 500,
 "status": "Internal Server Error",
 "message": "Failed to process recording metadata filter. Check custom attribute mapping.",
 "errors": [
 {
 "code": "INTERNAL_ERROR",
 "message": "Database timeout during metadata query for custom attribute: legal_hold_status"
 }
 ]
}

We have verified that the custom attribute “legal_hold_status” is correctly mapped in the Architect flow for the SIP trunk IVR and is present in the recording metadata for a sample set of calls. The attribute is a simple string type. We are not using any complex regex or date range filters in this specific export job, only the custom attribute filter.

This issue is blocking a critical legal hold process. We need to ensure chain of custody for these recordings. The same export job works fine without the custom attribute filter, but that results in exporting unnecessary data, which violates our data retention policy.

Has anyone encountered a similar database timeout issue with custom attribute filters on SIP recordings? Are there known limitations or workarounds for filtering large volumes of SIP recordings by custom attributes in the EU region? Any advice on troubleshooting this database timeout would be appreciated. We are considering splitting the export into smaller date ranges, but that adds complexity to the legal hold process.

Thank you for your help.