Hello!
We want to develop a bot that will auto-answer (pick up) the call when it is ringing and will reply smartly when it hears something from the caller.
But we can't find the API on how to listen to the call after it's answered and how to reply by some audio to the caller.
Could you please help us to find the solution to how exactly to implement this?
In WebPhone SDK https://github.com/ringcentral/ringcentral-web-phone it looks like it is possible only to answer the incoming call, but there are no options on how to listen to the answered call or how to reply something back to the user.
Also, we found a similar post on the forum where the person was looking for the same API that we need, but it looks like it was not resolved.
https://community.ringcentral.com/questions/1535/realtime-voice-bot-with-ringcentral.html
Thanks in advance!
API for the realtime voice bot
The problem for https://github.com/ringcentral/ringcentral-web-phone is it can only run in a browser. In theory you will be able to get audio data, at least you computer's speaker can get the audio data.
This SDK is better in my opinion: https://github.com/ringcentral/ringcentral-softphone-ts
It can run on server side as a node.js app.
Sample code here https://github.com/ringcentral/ringcentral-softphone-ts/blob/main/demos/inbound-call.ts#L22-L32
tells you how to auto answers the call, how to get audio from remote peer and how to send/play local audio to remote peer.
Thanks! It seems like this is what we were looking for. I will check it out.
One thing that in this package I can't find call transfer.
Is it possible to transfer the call to another user in this library?
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.