Help me navigate through phone trees without manually pressing buttons
December 10, 2015 9:58 AM   Subscribe

For work, I've been asked to call a phone hotline and navigate touch-tone menus (entering data) to get data. I'd prefer to automate the process if possible, because data entry sucks.

(I'd also prefer not to do this from my own phone, because it's a lot of data and I feel like I shouldn't be burning my own phone time to do this.)

We have a spreadsheet with a lot of data - essentially numbers we need to enter in a hotline to receive data about our data. Ideally, what I would like is a program that dials the number and navigates through the phone menu for a single entry, waits for me to listen to the response, and then hangs up and starts again for the next entry.

I know about Twilio but all the use cases for it listed on its web site seem to be about setting up phone trees, not navigating through phone trees, and it's not something I intend to purchase unless the company pays for it.
posted by LSK to Computers & Internet (9 answers total)
 
Maybe the answer is to just not do it like that? It's very unlikely that in 2015 the only data-interface that a company has is a touch-tone phone system, and _very_ likely that there is a way better way of doing that. Does the company have a Web API, and the person who gave you that job doesn't know about it? Is there somebody at that company you can call to get this done in a single, bulk instance?

There are ways to automate what you're asking for, but any automation that involves a touchtone phone system (you can probably gin something up here with a Unix box, expect and a modem) will be flaky and gross. There has to be a better way of doing this that skips the "make a phone call" step entirely.
posted by mhoye at 10:11 AM on December 10, 2015 [3 favorites]


Best answer: mhoye, is right, there should be (is?) a better way.

But, This might work, add the phone number that you have to call to the first column of the spread sheet, and then add the touch tone menu tree sequence to the second column.

Download the touch-tone sounds.

Then have a find and replace go through your spreadsheet and replace all "1"s with "mplayer touch-tone-phone-sound-key-1.mp3", replace all "2"s with "mplayer touch-tone-phone-sound-key-2.mp3", and so on. You could then replace all the hyphens in the spreadsheet with a fraction of a second pause like "mplayer pause-0.2-seconds.mp3"

And then dump that out to a text file, create a batch or bash, and run your file from the command prompt (you would have to have mplayer or similar command line media player). You'd then use a desktop speakerphone and have the phone next to the computer's speaker. You would have to hang up the phone yourself, but you could avoid dialing, going through the phone-tree, and entering the data sequence.

This might work, but it will probably be flaky. Figuring out how long to pause between playing the tones will probably be a pain.

For dialing 1-800-555 you might end up with a script like:
mplayer touch-tone-phone-sound-key-1.mp3
mplayer pause-0.2-seconds.mp3
mplayer touch-tone-phone-sound-key-8.mp3
mplayer touch-tone-phone-sound-key-0.mp3
mplayer touch-tone-phone-sound-key-0.mp3
mplayer pause-0.2-seconds.mp3
mplayer touch-tone-phone-sound-key-5.mp3
mplayer touch-tone-phone-sound-key-5.mp3
mplayer touch-tone-phone-sound-key-5.mp3

posted by gregr at 10:57 AM on December 10, 2015 [3 favorites]


You can download Audacity (free, multi-platform) which would allow you to generate DTMF tones (Generate > DTMF Tones...) in a sequence. Like gregr suggested, play the tones from your speaker into the headset/speakerphone.

It's basically the same thing, except it allows you to generate each sequence of tones as a single audio clip instead of arranging via the spreadsheet.

Edit: On the twilio front, it's a bit convoluted but you could use their sendDigits attribute when your IVR answers. Twilio costs real money, so keep that in mind, too!
posted by spbb at 1:14 PM on December 10, 2015


you probably need a pause between each tone (not just between groups of digits as above).
posted by andrewcooke at 1:18 PM on December 10, 2015


Oh, andrewcooke brought up a good point. Audacity will allow you to specify a pause between each tone.
posted by spbb at 1:24 PM on December 10, 2015


Response by poster: With gregr's comment in mind, I put together a Python script to do this, pauses and everything, and it's perfectly functional... except sometimes the phone tree on the other side interprets a single tone as the button being pressed twice instead of once :(
posted by LSK at 1:43 PM on December 10, 2015 [1 favorite]


how long are the tones? you shouldn't need much time at all.

ffmpeg -t 1 -i inputfile.mp3 -acodec copy outputfile.mp3

should give a 1s version of a file.
posted by andrewcooke at 2:17 PM on December 10, 2015 [2 favorites]


andrewcooke, those files linked above are 1s, so maybe half a second would suffice? So, maybe,
ffmpeg -t 0.5 -i inputfile.mp3 -acodec copy outputfile.mp3
posted by gregr at 2:38 PM on December 10, 2015


yeah, maybe even 1/10 s? i have no real idea what they sound like. but aim for the sound of someone naturally tappng out numbers. beep boop beep.
posted by andrewcooke at 2:52 PM on December 10, 2015


« Older android music player that won't play podcasts   |   Avoid "old person" thinking but keep privacy and... Newer »
This thread is closed to new comments.