FXS status lights on units with ATA

I would like a status light (1 per FXS) for routers with built in ATA. The status light should be:

1) Off, not configured

2) Green when registered

3) Blinking active call in progress

4) Red if registration failed