Skip to content

Dialing into or out of a meeting

Parimala032 edited this page Aug 6, 2024 · 7 revisions

Caution

This documentation may no longer be current. Click here to view the updated content on our Developer Portal.

When connected to a meeting, the following dialing capabilities are available:

  • Dial out: Allows the system to call a user's phone, enabling it to be used as the audio input/output device for the meeting.
  • Dial in: Permits users to call into Webex and use their phone as the meeting's audio input/output device.

The SDK also provides functionality to remotely end phone calls in both of the above scenarios.

Dial Into or Out of a Meeting

A user can trigger the dial-in or dial-out using the Meeting object's usePhoneAudio method and passing an optional phone number as a String:

await meeting.usePhoneAudio(phoneNumber);
Asynchronous Yes
Parameters String - phoneNumber (Optional)
Returns Promise Resolves once the dial-in or dial-out request gets completed, or rejects if it fails

When a phone number is provided, the SDK provisions a device for dial out functionality, and initiates a call to the specified phone number. When a user answers the call, the meeting's audio input and output are connected to the phone device. In the absence of a phone number, the SDK defaults to provisioning a device for the dial in functionality.

The SDK is designed to provision only one device each for either dialing in or out. Once a device is provisioned, subsequent calls to the usePhoneAudio() method do not result in additional provisioning.

After the usePhoneAudio() method successfully completes, the user is connected to the meeting through both the browser and the dial-in/dial-out device. Consequently, the next step involves updating the Meeting object to disable sending and receiving audio via the browser.

Beta & 3.x:

For 3.x and beta SDKs to disable sending and receiving audio via the browser, send the flag audioEnabled: false in the Meeting object's updateMedia method:

await meeting.updateMedia({
  audioEnabled: false
});
Asynchronous Yes
Parameters options
Returns Promise<undefined>

updateMedia Options

Name Description
audioEnabled (Optional) Toggles receiving and sending of main audio in a meeting.
videoEnabled (Optional) Toggles receiving and sending of main video in a meeting.
shareEnabled (Optional) Toggles screen sharing.

SDK 2.x

For the 2.x SDK to disable sending and receiving audio via the browser, send the flags sendAudio: false and receiveAudio: false as well as the Stream object to the Meeting object's updateAudio method:

await meeting.updateAudio({
  sendAudio: false,
  receiveAudio: false,
  stream
});
Asynchronous Yes
Parameters options
Returns Promise<undefined>

options

Name Description
sendAudio Boolean - Toggle audio input.
receiveAudio Boolean - Toggle audio output.
stream Media Stream - Stream containing the audio track you want to update.

Disconnect Dial In or Out Calls

Disconnect dial-in or dial-out calls using the Meeting object's disconnectPhoneAudio method:

await meeting.disconnectPhoneAudio();
Asynchronous Yes
Parameters None
Returns Promise Resolves once the phone audio disconnection has been completed.

Reenable Browser Audio

If, after disconnecting the phone audio for a meeting, you want to enable computer audio (assuming it was not already enabled or was disconnected during the use of phone audio), depending on the SDK version:

Beta & SDK 3.x

For 3.x and beta SDKs to enable sending and receiving audio via the browser, send the flag audioEnabled: true in the Meeting object's updateMedia method:

await meeting.updateMedia({
  audioEnabled: true
});

SDK 2.x

For the 2.x SDK to enable sending and receiving audio via the browser, send the flags sendAudio: true and receiveAudio: true as well as the Stream object to the Meeting object's updateAudio method:

await meeting.updateAudio({
  sendAudio: true,
  receiveAudio: true,
  stream
});
Clone this wiki locally