Customization of IVR Options

I have replaced our Toshiba phone system finally. One of the features of the toshiba Voicemail was Token language. It enabled us to write our own apps for doing function in the voicemail. I can not for the life of me figure out where I would be able to do that in FreePBX. An example we had in place that I would like to figure out would be a caller ID function.
We would call into system and press 3 and it would read the caller ID in speaking form back to us and then say the current date and time and hang up on us (also testing CPC)
Any ideas on how to implement this or a simple nudge in the correct direction (i.e. read this post hereā€¦)
Thanks for all your help,
~JR