I would like to send the otp code to my users using sms and voice. I already completed sending of otp by sms using clickatell provider.
I would like to do the same by using a outgoing call to the user's phone. Just like, whatsapp has the sendsms and call me features.
Can you suggest a good provider and which is cheap as well as implementation in java.
Thanks
Twilio developer evangelist here.
You can create this feature using the Twilio API to make calls and then read out the number to user.
You would need to purchase yourself a Twilio number with which to make a call. Then, use the REST API to create the call from your number to the user's number. In the API call you would supply a URL so that when the call connects Twilio would make an HTTP request to the URL to find out what to do next. Your URL would need to respond with TwiML, which is some XML that describes what Twilio should do next. To read out the OTP code you could use the
<Say>
verb.There isn't a full tutorial on this, but this tutorial shows you how to make calls from Java.
You could also check out how to accomplish this with Authy, which is a fully featured two factor authentication API that allows you to send SMS messages, make calls and use app based OTPs.
Let me know if this helps at all.