There might be a misunderstanding here, and I want to confirm with you first. Saying "multiple accounts", I think you meant multiple extensions, right? In RingCentral service, an account is an "Employer/Company" and , extensions are "Employees".
I don't know what you try to achieve here. But let me answer the 2 questions:
1. Which endpoint should I use for answering a call? Answer Call Party is the correct one?
A) This API is for answering an incoming call. However, in order to call the API, you must use the access token of the extension that is being called (the owner of the call). And you must know the device id of a particular phone device so that the call will be connected to that device.
2. How do I get the audio stream after the call is answered?
A) No, you cannot get the audio stream of the call after answering the call with that API.
All in all, that API is under the Call Control and can be used for implementing a 'remote control' for voice calls.
Please explain in details of what you want to achieve so I can help better.
Thank you for your quick answer
What I'm currently working on is a web-based application and the goal is to connect at least two accounts at the same time in order for me to receive a call (inbound calls) from any of them.
The same is true for the other case, I want to be able to make an outbound call easily selecting which line I want to use for that call, to better explain the idea is the same as having a mobile phone with a double sim card capability in which you select from what sim you want to make a new call.
The same exercise applies to sending and receiving SMS, all the described interactions must be done from the web browser.
The credentials for each account and the authentication flow for each one of them are handled in the back end.
Is there a way to achieve that, I hope this explanation helps you more to understand my goal.
In any case, just to be sure that I understood well what you answered me,
- It means that I can only manage the voice call traffic through the API, but I still need a hardphone or softphone to pick up the call, is it right?
- None of the voice APIs responds with the audio stream in order for me to catch it and use it in a web app, is it right?
- The ringcentral-web-phone can only handle one account at a time, what happens if I initialize multiple instances of the web phone at the same time?