So you're talking about cellphones automatically answering incoming calls.
If this is an option that's available with particular cellphones, then the manuals for those cellphones will describe how it works.
I don't see any reason why a cellphone, or especially a smartphone, couldn't automatically answer a call. The phone knows when a call is coming in, and it knows the calling line identification (unless it has been suppressed). It could answer the call, then play a recorded message, record a message for you to listen to later, and even detect incoming DTMF signals from the caller and take some action, such as calling another number or sending a text message.
In principle all of this can be done. I'm not aware of any phones that do it, and I don't know of any apps for iPhones or Android devices that will do it, but you can search the Apple iOS applications store and Google Play and see if there's anything there.
If you want to know what API functions you need to use to implement this on a smartphone, you would be best to ask in a forum for iOS or Android programming, after you have searched the relevant documentation for an answer.
If I haven't guessed what you're trying to find out, you will just have to explain your question clearly!