If a COLLECT verb is placed anywhere inside a dialplan, all the pressed DTMF tones will be gathered and sent to the URL that you define.
You are able to change the dialplan by providing a new valid dialplan at the eventUrl parameter of the COLLECT verb.

eventUrlDefine the URL that the collected tones will be sent to. A new valid dialplan may be set as response, in order to change the current one.
maxDigitsDefine the maximum collected digits. The default value is 30.
submitOnHashIf the value is true the collected tones are sent to the eventUrl after pressing #.
The default value is false.