Asterisk-Java get Phone number

Hi, I am new to asterisk, and i have a requirement to read a phone number in DTMF inputs received from user.

I am using Asterisk-Java to create the dialplans. getOption retrieves only a set of digits of length 1. Is there a seperate expression in getOption to read the entire phone number entered?