Realtime Voice bot with RingCentral

  • 1
  • Question
  • Updated 1 month ago
I can't seem to find any API that allows me to listen to calls in realtime and reply programatically to the call in realtime. Can anyone please guide me to the right direction for this.Thanks
Photo of Khalil Choudhry

Khalil Choudhry

  • 120 Points 100 badge 2x thumb

Posted 1 month ago

  • 1
Photo of Embbnux Ji

Embbnux Ji, Employee

  • 1,310 Points 1k badge 2x thumb
Hi Khalil, If you don't need voice, you can use TelephonySession api to listen and control call:
https://developers.ringcentral.com/api-reference#Extension-Telephony-Sessions-Event-Beta
https://developers.ringcentral.com/api-reference#Call-Control-rejectParty

If you want to play with real time voice, you can use our webRTC phone library https://github.com/ringcentral/ringcentral-web-phone
Photo of Khalil Choudhry

Khalil Choudhry

  • 120 Points 100 badge 2x thumb
I want to reply to customer queries programmatically. Answer to what he/she asks on phone.
Photo of Phong Vu

Phong Vu, Devangelist

  • 5,416 Points 5k badge 2x thumb
You wrote "API that allows me to listen to calls in realtime ...". Did you mean to listen to incoming call (ringing) or to listen to the call after the call is picked up?

If you want to listen to incoming call while it is ringing, use the presence push notification or the telephony session API.

If you want to listen to the voice of the call, then the WebRTC would help.

Also, you wrote ".. reply programmatically to the call in realtime", did you mean to pick a ringing call programmatically? If so, I am afraid that you cannot do that unless you make a call handling rule to direct the call to a voicemail.
Photo of Khalil Choudhry

Khalil Choudhry

  • 120 Points 100 badge 2x thumb
Ok. I am actually looking for voicebots. Reply to the call while it is going on. Answer to the incoming calls.
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,818 Points 5k badge 2x thumb
So the bot will auto answer(pick up) the call when it is ringing, and will reply smartly when it hears something from the caller. Am I right?
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,818 Points 5k badge 2x thumb
I think you need to use WebPhone SDK . https://github.com/ringcentral/ringcentral-web-phone

Other SDKs/APIs don't have the ability to actually answer the call.

And I am afraid that there is no out-of-box solution. You need to do some development based on that SDK.

Tricky part might be voice to text conversion. You need a third party services so that your bot can know what is the caller saying.
Photo of Khalil Choudhry

Khalil Choudhry

  • 120 Points 100 badge 2x thumb
I have looked into the git repo but it does provide to play/reply audio message during call.
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,818 Points 5k badge 2x thumb
Hi Khalil, you are right. I don't think there is an out-of-box solution.  I might investigate further but I cannot promise any timeline.
Photo of Khalil Choudhry

Khalil Choudhry

  • 120 Points 100 badge 2x thumb
Thanks.