Skip to content

Instantly share code, notes, and snippets.

@daguar
Created September 7, 2014 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daguar/ead5081d3a988c206739 to your computer and use it in GitHub Desktop.
Save daguar/ead5081d3a988c206739 to your computer and use it in GitHub Desktop.
Twilio problem: recording starting too late

I'm over at Code for America ( http://codeforamerica.org ) and we've got an app ( https://github.com/codeforamerica/balance/ ) built on Twilio that lets people on food stamps check their EBT card balance via text message.

In ~3 weeks we've got almost 300 successful balance checks so far!

We're trying to expand to states outside California, and I'm bumping up against a tricky issue with some states:

Right now, we're triggering an outbound phone call with sendDigits to navigate the phone tree.

(For example, wait 2 seconds, press 1 to select English, wait 2 seconds, enter the client's EBT card number)

The URL parameter given just basically has a Record with a transcribeCallback.

The problem is in some states, the recording is starting too late (because the phone line starts talking very soon after the EBT card has been input).

My first thought as that the URL request is too slow, but I'm seeing ~25ms response from our app.

Are there any good solutions for this? For example, is there an easy way to record & transcribe the ENTIRE call (i.e., not just AFTER the digits have been pressed, but the whole thing)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment