question

parul Kundra avatar image
parul Kundra asked Phong Vu answered

please tell me the flow of testing the conference call functionality in RingCentral WebPhone Demo

I login in RingCentral WebPhone Demo https://ringcentral.github.io/ringcentral-web-phone/

than I Received a call from partyA and after that I click on start conference button to start conference call and I also make call to another caller partyB then pop up get open and I again click on start conference button but my conference call not start please tell me the correct steps to test the conference call functionality on demo app

conference callconferencing
1 |3000

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

Phong Vu avatar image
Phong Vu answered

There is a bug in the demo code. We will fix it and update the code soon.

1 |3000

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

parul Kundra avatar image
parul Kundra answered Phong Vu commented

is there any update on this?

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.

Phong Vu avatar image Phong Vu ♦♦ commented ·

It's updated but I have not tried it yet. You can just retry the online demo.

0 Likes 0 ·
sattar k avatar image
sattar k answered

It is not working for me can you please test it for your sides and tell me the steps also

1 |3000

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

Phong Vu avatar image
Phong Vu answered

I test the latest code and it works well. Unfortunately, the demo just only creates a conference call and transfers the original call to a conference call with 2 parties. It does not provide methods to make a new call and transfer the third party to the conference call. That will be left for developers to implement. Here are the core functions and you need to develop them further.

function initConference() {
    if (!onConference) {
      getPresenceActiveCalls()
        .then((res) => res.json())
        .then((response) => {
          const pId = response.activeCalls[0].partyId;
          const tId = response.activeCalls[0].telephonySessionId;
          getConfVoiceToken(pId, tId).then((voiceToken) => {
            startConferenceCall(voiceToken, pId, tId);
            onConference = true;
          });
        });
    }
  }

function getPresenceActiveCalls() {
    return platform.get('/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true');
  }

function getConfVoiceToken(pId, tId) {
    return platform
      .post('/restapi/v1.0/account/~/telephony/conference', {})
      .then((res) => res.json())
      .then((res) => {
        confSessionId = res.session.id;
        return res.session.voiceCallToken;
      });
  }

function startConferenceCall(number, pId, tId) {
    const session = webPhone.userAgent.invite(number, {
      fromNumber: username,
    });
    session.on('established', () => {
      onAccepted(session);
      console.log('Conference call started');
      bringIn(tId, pId)
        .then((res) => res.json())
        .then((response) => {
          console.log('Adding call to conference successful', response);
        })
        .catch((e) => {
          console.error('Conference call failed', e.stack || e);
        });
    });
  }

function bringIn(tId, pId) {
    const url = '/restapi/v1.0/account/~/telephony/sessions/' + confSessionId + '/parties/bring-in';
    return platform.post(url, {
      telephonySessionId: tId,
      partyId: pId,
    });
  }

The demo app initiate a conference call and immediately calls the bringIn() function, passing the telephony session id and the party id.

You need to implement a control to make a new call or bringIn existing call by calling the the bringIn method passing the telephonySessionId and partyId of the third call party.

1 |3000

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

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