When the iPhone receives a call, the application exits. You can register a callback to handle this event gracefully, see:
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIApplicationDelegate%5FProtocol/Reference/Reference.html#//apple%5Fref/occ/intfm/UIApplicationDelegate/applicationWillTerminate:
After the call has finished, your application will re-launch.
Applications that appear to preserve your state during a call are just written well :)
Arggh! I just read your actual question.
I cannot find, nor do I know of any APIs to access the phone application. My only advice would be that Phone is an application like any other - and it can publish information via the http tunnel all applications provide.
I wonder if you could just have an "I'm on the phone" button the user could press to achieve the same results?