PSTN Line Testing

Hi,

I would like to know if the following is possible and if so, ideas on how you would go about.

I’m after a solution to test PSTN lines automatically using a script (First just want to make sure technically I can get it going before doing any scripting). Now I’m looking at using Asterisk with a Analogue Card to connect the PSTN lines.
The idea is to say have Asterisk call out on FXO Port 1 (Line 1) over the PSTN to call the number that is valid on FXO Port 2 (Line 2). I believe this shouldn’t be too hard. The hard part is I want to test that the line works correctly after the call is answered, say by using DTMF. So Line 1 sends Tone 1 and Line 2 reports i.e. via echo what Tone it was.

Thanks in advance for any suggestions and ideas.

On the dialing PBX I’d have it call the remote number, pick a random number and then send it via DTMF, Logging what I sent to CDR.

On the recieving PBX I’d create an autoattendant that would answer and listen for DTMF, then log what DTMF was recieved to the CDR in the userfield.