On CUCM admin, go to Device > Phones
User filter, if you want to filter specific phones e.g. begins with SEP if you want Cisco IP Phones, or you can also use 'LSC Status' filter from dropdown. Then click on Find.
Now go to 'Related Links' on top right corner and select 'CAPF Report in File' from the dropdown, then click Go. You will get the CSV file.
Regards,
Onkar Mahajan
Please rate if this is helpful.