NO.
You can't access the call details and message details programmatically.
If you do so apple will reject your app, also you can do it on jailbroken device.
If you are looking for jailbroken devices: Accessing iPhone Call History, anyway I won't recommend it.