4
votes

Problem

Would like to detect if an incoming call was answered by a person or a machine.

Details

Am using Twilio. And Twilio does have this feature. However, the way it is implemented within their system seems ill-suited to my use case.

Twilio uses answering machine detection to control the flow of the call. Because of this, Twilio waits a few seconds after the call connects in order to analyze the audio from the call to see if it is an answering machine. It does not continue with connecting the call until after it has delayed the call and performed this analysis.

For my use case. Weather the call was answered by a person or machine does not affect the call flow... so the delay is not necessary. It only affects statistics that are needed later on. Namely in this case "How often is the person who I am paying to answer the phone actually answering the phone as opposed to missing the call and letting it go to voice mail?"

All incoming calls are forwarded to a phone. Usually a cell phone.

Question

Is there a way to detect id the call was answered by a person or machine after the fact, but with no delay using Twilio?

If not, is there another pattern I have not thought of that can be used to accomplish the same objective? (To detect the frequency that an employee is answering the phone as opposed to missing calls)

Other things I have considered

  • Extend the number of rings on the cell phone, then let Twilio take the voice mail instead of the cell phone provider's voice mail.
    • The problem with this solution is that a lot of cell phone providers do not allow you to change the number of times that the phone will ring before voice mail picks up. Even more difficult is that the number of rings is not set. The cell phone provider might take a more or less time to locate the phone and this counts against the amount of time that the phone will ring before it goes to voice mail.
  • Implement answering machine detection within my own application (Python)
    • This is probably a viable alternative. The problem here is that I know very little about how Python could be used to analyze an audio file to see if it sounds like a person or a machine picked up.
1
There have been some updates to AMD here: twilio.com/docs/api/rest/…Megan Speir

1 Answers

4
votes

First a little background on how call progress analysis (CPA) is used to detect answering machines. There is no standard for answering machines and therefore no good consistent method for detection. All systems use CPA to detect how long there is voice when the phone is answered. A typical human will answer with just "Hello", whereas an answering machine will have a longer greeting message. The CPA is just looking for the length of the voice at the beginning of the call and if it goes over a certain threshold then it assumes an answering machine. Some can also detect the beep that the answering machine gives when it is time to leave a message, but again there is not standard tone used for the beep so it can be inconsistent also.

My point here is that no system has 100% accuracy in detecting voice mail systems and some people even try to fool these systems by just putting "Hello" as their greeting on the voice mail. If you want accuracy you can provide a simple prompt in the beginning that requires a DTMF response. If it goes to voice mail the system will not be able to respond with DTMF input and therefore you know 1) you got a voice mail system, or 2) you got a human that is not responding. It sounds like in your business case that it advantages for the user to respond, so they will. Some systems take a step further if they need to identify a specific person by having the user enter a PIN that identifies them.

I do not think you can do detection after the fact with Twilio. If you really require this I would use Call Control XML (CCXML) and VoiceXML. With CCXML it does not really occur after the fact, it happens in parallel. While your VoiceXML application is running CCXML can continue to run in the background performing the CPA. You can even send messages to other web service from CCXML to update the progress of the background CPA all while the voice application continues on. Voxeo has a great implementation of CCXML. Their CTO is the Editor in Chief of this W3C standard. Also their CPA implementation is some of the best I have ever used. Their detection of answering machines is the best and usually even captures the beep. Voxeo's online documentation for CCXML has a good description on implementing answering machine detection.