Twilio with python to repeat voice call until get answered?

827 Views Asked by At

I can make call using twilio programmable call as my python code here

The calls sometimes result as no-answer or busy i.e. the call get rejected or not-answered.

My google search here and search on our stackoverflow site here found little helpful result so I asked here - how to repeat calling until get answered?

p.s.

I'm looking for built-in solution from twilio directly e.g. some TwiML xml tag or attribute for callUntilAnswered='true'

2

There are 2 best solutions below

0
On BEST ANSWER

Here and here is how I have to code it manually to get the phone call auto-redial.

The main idea there is to keep pinging the api to get call status and detect busy call (ringing after 60s and no answer); redial when it is busy.

p.s.

To run in background and multiple numbers at the same time, the sample code is here

1
On

There is a blog covering this exact use case below using Twilio Studio - log in and visit this url to open it. There is no built in Twilio capability to retry on your behalf.

Call Me When You're Free - Using Twilio Studio and Python to Retry a Busy Number