How to check Asterisk and pstn line connectivity

Hello all,
My asterisk server with pstn line should not be detached for a minute which is very important line for our project. So i need to know whether the asterisk and pstn line is connected or not. What i am trying to build is that whenever the link break, asterisk server sent email or some other notification. So that I can fix it as soon as possible.
Is there any way to check connectivity between PSTN and Asterisk?

The only fault you could reasonably detect is lack of battery voltage on the line. I don’t know if the hardware can distinguish this from busy on another extension, but I’m certain that it doesn’t signal this to Asterisk.

Automated line testing is normally done from the exchange end, but, even then, it is normally only done once a day, at most.

Thanks david,
whenever i disconnect the pstn line from the interface card it shows the massage:

Can’t we use this massage to run some script that notify the line is connected ?

what is the port number that is used to communicate between asterisk and PSTN interface card?
Is there any way to pinging the port to know whether the Phone line is connected or not?

PCI is not IP.

Most real analogue line faults will not cause loss of line voltage and therefore will not be detected.