The solution depends on whether you are using CallManager or CME, I'm assuming you're using H323 from the title of your post?
If you are using CME and have both PRIs on the CME router (or if you are using CM and a single H323 gateway with both PRIs on it) you just need to create a copy of all your dial-peers you have normally set up for the first PSTN line, but pointed at the other port. Then on each dial-peer set a preference.
e.g.
PRI A
dial-peer voice 1 pots
destination pattern 9T
port 1/0:24
preference 1
PRI B
dial-peer voice 2 pots
destination pattern 9T
port 1/1:24
preference 2
In that example calls will go to dial-peer 1 and 2 if 1 is busy/down...
If you are using CM and have the lines on two gateways then you will need to add each gateway to a route group, then create a route list and add the two route groups in the order you want them to be used.
Then set your route patterns to point at the route list.
Aaron
Aaron
Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!