---slug: /guides/how-to-gather-keypad-input-from-usersidebar_position: 5x-custom: author: danieleds---# Gathering User InputIn [Making and Receiving Phone Calls](./making-and-receiving-phone-calls/index.mdx) welearned the basics of using XML bins to define the behavior of phone calls. Inthis article, we are going to see how to gather input from the user.In general, there are three kinds of input that you could want to gather: keypadinput, text input via speech recognition, and audio recordings. In this articlewe are going to focus on keypad input and speech recognition.## XML for Gathering InputWe are going to define the forwarding instructions in an XML bin hosted onSignalWire. To create an XML bin, go to the LaML section in your [SignalWirespace](https://signalwire.com/signin), then click on Bins. To create a new XML bin, click the blue button in the LaML section of your SignalWire space. Create a new bin, and paste the following XML in it:xml Welcome! Please enter or say your account number. No input detected.We used the [](pathname:///compatibility-api/xml/voice/gather) verb to gather input as soon as the call starts. We set five attributes:- input, which specifies which kind of input we want to gather (in our case, both speech and DTMF keypad input);- action, which specifies the URL to fetch when the input has been collected (the URL should return a new XML document to execute);- timeout, i.e., the number of seconds of silence or inaction that denote the end of caller input;- numDigits, which indicates the number of digits to collect via DTMF keypad input; and- hints, an optional list of words to help the speech recognition algorithm.Within the verb, we nested [](pathname:///compatibility-api/xml/voice/say) in order to play some instructions.When input gathering completes, the script will fetch the URL specified inaction and will execute it. If, instead, no input is detected within thetimeout, then the following instructions keep executing: in our case, we say noinput detected and hang up.## Reading the User InputWhen fetching the Gathers action URL, SignalWire includes some parameters such as:- From: the callers number- To: the callees number- Digits: DTMF digits gathered from the user, if any- SpeechResult: Speech input gathered from the user, if any- ...moreWith a custom web server, you can read these parameters and, depending on theirvalue, emit a different XML document to execute. You can easily test this withsites such as https://webhook.site, which allow you to view the details forincoming webhook requests. For more information on how to use your web serverfor gathering user input, see [Gathering User Input from Code](guides/voice-api/guides/compatibility-api/gathering-user-input-from-code.mdx).## ConclusionXML bins offer a quick and easy way to get started with common use cases. If you are an advanced developer, or you need moreflexibility and real-time control on your calls, you may be interested in ourguide about how to [make and receive calls in Node.js](guides/voice-api/guides/realtime-api/first-steps-with-voice/index.mdx).