News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
API for the realtime voice bot
Tags: sdk, rest api, phone
Mar 14, 2024 at 10:09am   •   1 replies  •  0 likes
Roman Pierce

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!

1 Answer
answered on Mar 14, 2024 at 1:23pm  

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.



 1
on Mar 18, 2024 at 6:09am   •  0 likes

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?

on Mar 19, 2024 at 10:00am   •  1 likes

Call Transfer is not supported by that library. You will have to use the RESTful API: https://developers.ringcentral.com/api-reference/Call-Control/transferCallParty

on Mar 20, 2024 at 8:03am   •  0 likes

Thanks! We already discovered that the only issue is that we can't find telephoneSessionId and partyId in the SIP message, I asked about this in a different topic https://community.ringcentral.com/comments/119076/view.html

on Mar 21, 2024 at 5:10pm   •  0 likes

I have a good news for you. ringcentral-softphone@0.9.0 supports call transfer. https://github.com/ringcentral/ringcentral-softphone-ts/blob/main/demos/inbound-call.ts#L54-L56



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us