How to detect keys?

Hi, I’m trying to make a program that when someone enters a series of numbers (like *57) a message will pop up on screen. (Pretty simple right?) How do I detect when keys are pressed? I can’t seem to find it in the API. Thank you!

Howdy,

phones.digium.com/content/onkeykey

Cheers