getPstnCalls filters

Was trying to get call records via getPstnCalls (see docs). You need to specify a start and end date so by default the query is like this:

Or using PowerShell (below it’s from 1st Jan to 1st March 2023):

But can I filter these? For example, based on usageCountryCode. Yes you can:

Notice the double single quotes around the country code. That’s important. Ditto for other fields like UPN:

Remember this only gives you part of the results. You need to keep looping. Something like this (where I add the results to an array):

Update: This doesn’t actually work. Doesn’t return an error, so you think it is filtering, but in reality it doesn’t.