question

William Morales avatar image
William Morales asked William Morales commented

Manage multiple RingCentral accounts from private app

Hi,

I'm working on the development of a private app with the capacity to handle multiple RC accounts, the current situation it's that a person needs to open multiple browser windows to login into each one of these accounts in order to be able to work with them.

The solution I am trying to implement has an app to handle these multiple accounts in the same UI, but the question I have now is: how I can handle incoming calls for each one of these multiple accounts?


I read that we can handle that with the javascript SDK, but my question is regarding the workflow of the app, what I made so far is:

From server-side:

  • Login to the account
  • Made a ring-out
  • Connect to the push notification and receive the events for outbound and inbound calls

From client-side:

  • Receive the RingCentral answer when fetching the endpoints

What I don't know from this point on is:

  • Which endpoint should I use for answering a call? Answer Call Party is the correct one?
  • How do I get the audio stream after the call is answered?


I gladly appreciate any help you can provide to me.

integrationssdkringout
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered William Morales commented

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.

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

William Morales avatar image William Morales commented ·

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?
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys