About reading key press in JAVA ari application in conference call

I am using asterisk 13,using confbridge application we are making conference calls.How to read the keypess in JAVA.

Use AMI events to read the information through TCP