You do not configure anything for inboud, that is controlled by telco, DIDs will not overflow to POTS lines, they can only forward them to the POTS line numbers in which case you will need to desigante who the call goes to, this would be done via plar configuration on the pots voice port.
For outbound overflow the configuration depends on what protocol you are using to control the GW, if H323/SIP then simply build redundant dial peers with preference setting, if MGCP add these ports to the Route Group.
HTH,
Chris