CID in log show as unknown

I have a custom CID lookup script that works great. I’m wondering if it’s possible to show the result in “Call Event Logging”.

The log does show the name in the “Detail” column, but the “Caller” is still unknown. When a number is not found using the lookup script, it’s shown like this: 0123456789 <0123456789>. Also internal calls are logged like: ExtensionName <012>

Oh btw: the lookup script outputs the name when found, nothing else. If no name is found, it simply outputs the number.