Does anyone know if the Twilio api allows for the following use case? I can't find a good example in any of the documentation.
- I call a number through Twilio where I expect to be placed on hold
- Twilio recognizes that I am on hold and waits until someone picks up
- When a human picks up, Twilio calls me and connects me to the call.
Essentially, I don't want to wait on hold!
PS: I found this but I don't think it's what I need. Anyone agree/disagree? https://www.twilio.com/docs/voice/answering-machine-detection
CodePudding user response:
The challenge with this is the definition of "hold". Basically, you have an established call and you are waiting for a human to connect (while you wait in queue).
You need some logic to listen to the media portion of this existing call to identify utterances that sound similar to when an agent connects to a customer (vs. the on hold music and ads). However, the issue is the agent will probably say hello a few times and if you don't answer they will hang-up.
You could play back, please hold while I connect you to Nick but the agent may find that strange and may hang-up.
You could ask the agent to press any key (DTMF) to connect you to them but again, the agent may find that strange and hang-up (they expect the customer to be there when they get connected).
Anyway, for the stream processing, you would need to use something like Twilio Media Streams to fork the media to some processing logic for the voice stream and if that logic identifies patterns in the voice stream that appears to be the agent speaking, it would need to tell Twilio to call you back to connect you to that agent. The actual processing of the voice stream isn't something Twilio offers, you would need to use a service from a third party and at what expense, given it sounds like really long hold times.
So ultimately, not sure how realistic this would be. Maybe the most cost effective would be to have the agent press a key to reach you one they are connected to you.
Really, the contact center needs to have a callback option when an agent is available, which would do away with all this - that works really well.
How to transcribe live phone calls using Twilio Media Streams