Are you running ospf over the isdn connection? Why not just a static route with a higher admin distance.
If the static is configured with a higher admin distance, the traffic should prefer the ospf route once the frame-relay comes backup and the isdn should time out and disconnect.
Hope this helps,
Regards,
Harold Ritter, CCIE #4168 (EI, SP)