Hi Nick,
Problem solved. It would seem that 3CX can't cope with any fields returning DBNull, so just had to wrap everything like this:
ISNULL(directory.FirstName, '') AS [FirstName]
Now works as expected! Incidentally you only need to restart the Call History service to see the change in log...