You can communicate with Skype through their API. They have a variety of methods of doing this - including COM, Java, and Python - the "kick start guide" is a good place to start reading (and there's a link to the API tracer, where you can basically interactively work with Skype via text commands).
A very rough way to do it would be to do a "SEARCH CALLS", then run through each call and check what the current status is. I only looked at the API for a couple of minutes, so a more thorough look would probably get a more efficient method.