Newbie question

Hello people and nice to meet you.
I would like to ask you the following:
I want a device that will accept 2 lines with different telephone numbers.I mean i will have one number from one provider of pots and another number(line) from a second one.So i want to connect them to the device(fxo?) and be able to change between those two lines when one is busy.
I would like to tell me about the hardware.I need a device with two fxo.And what about the telephone devices that i have?Do i have to buy a device with fxs also support?
Could you suggest some hardware too?
Thank you!