What are the legal issues involved if I want to route all incoming calls to my fixed line number to an IVR, and to allow a program to make automated calls using the same fixed line?

Also, can I use a PAP2 for the same? or do I need something like an SPA3102?