I am not aware of any API support on Cisco devices for this. The best that you can do is to enable the appropriate debugs on the router to display the caller ids as and when the calls are received and dump them to a syslogd server. You can process these logs from the application. The downside is that the router might get overwhelmed with debug messages, so just be careful and try it out on a lab before deploying it in production environment.