This is called a Call Handler and here is the documentation. I would recommend starting there. Feel free to ask questions for clarification if needed afterward.
System Administration Guide for Cisco Unity Connection Release 7.x - Managing Call Handlers