Monitoring play status?

We are using a couple of Raspberry Pi B+ units to play hold music and they’ve been working quite well over the iPods they replaced. They seem to stop playing after a period of time but we haven’t been able to determine why just yet. Is there any way we can check the playback status via script/API so we can monitor these and potentially restart playback if it stops?