GET /api/v2/voice/byoctrunks pagination inconsistency

Is there a clean way to handle pagination for BYOC trunk lists when the response count fluctuates between requests?

  • Endpoint: GET /api/v2/voice/byoctrunks
  • Region: ap-southeast-1
  • SDK: Genesys Cloud Java SDK 12.4.0

The API returns 10 items per page, but the next_page_token sometimes points to an empty set even when we know 15 trunks exist in the org. This breaks our automated inventory sync scripts.