I use a certain piece of sofware (Asterisk) which includes in its source tree a nifty little script to automatically download and install all packages it needs from your distro's repositories, including of course Ubuntu. One of these prerequisites (libvpb1) requires a piece of information (the default country phone prefix), so the script becomes not so automatic:
It's innocuous to have this library installed in a system that doesn't run telephony stuff, so you can test it yourself.
My question is: How do I feed the answer non-interactively beforehand so apt-get install (or, rather, dpkg -i) grabs that and uses it as if it had been typed in that ncurses screen?
A generic solution would be better, like, how do I know if any package requires information like this, and how do I set it from a script?