Problems with analog lines


I have instaled Asterisk and FreePBX on a Debian and another on Ubuntu. In both, I have analog lines connected to a TDM400P card. The problem is that when I have to restart the computer for whatever reason, the asterisk doesn’t see the lines. When I try to make a call from any extension, I receive the same tone I receive when the lines are busy. If I see the Asterisk command console, it gives me a CHANNEL UNAVAILABLE message when I make the call.

However, if I go to the computer and disconnect and connect again the lines, it works fine. Also when I make an incoming call to each one of the lines, all of them begin to work fine.

I have modified parameters like hangonswitchpolarity, busydetect, busycount, signaling and I don´t get the solution. Although everything is working fine, I want to solve this problem, because I don´t want to have to disconnect the lines everytime I want to restart the computer, and I don´t want to make a script that makes incoming calls to all the lines.