Yes, it is possible. Use an Lua script in your inbound dialplan block.
I do this in a different way to help populate contacts in Fusion when caller-id-name is "Unknown". I use the event trigger in the IP phone to hit a PHP script on the server upon receiving a call on that extension. The script...