Hope I got your question right. If you are trying to create an app to replace default phone call handling app, then I guess you should know that it's not a cake walk.
Firstly let me make it clear that you simply can't create a phone app to replace default app.
If you really want to do it then you need to get the Android source code, recompile it by adding your phone app and flash it on a rooted device.