Public Switched Telephone Network (PSTN)
The Video SDK call out feature allows users to join Video SDK sessions completely over the phone or use their phone as the audio connection to the session while viewing the Video on Web. This is useful when:
- You do not have a microphone or speaker on your computer.
- You do not have an iOS or Android smartphone.
- You cannot connect to a network for a video session with computer audio (VoIP).
See Customize audio conferencing for details.
Prerequisites
Get instance
To use PSTN, you must first get an instance of the ZoomVideoSdkPhoneHelper object.
ZoomVideoSdkPhoneHelper phoneHelper = zoom.phoneHelper;
Check whether the account supports PSTN
Use phoneHelper.isSupportPhoneFeature() to check whether the account supports PSTN.
await zoom.phoneHelper.isSupportPhoneFeature();
If the account supports the feature, you can continue. If not, you may want to display a message to the user that this feature is not supported.
Make a call
Use phoneHelper.inviteByPhone() to make a call.
- Provide the name if the user will join completely by phone.
- If the user is already connected to the session on the web, but wants to use their phone for the audio portion, the name will default to the name provided in the
client.join()function.
await zoom.phoneHelper.inviteByPhone("<country code>", "<phoneNumber>", "<name>");
Receive events
Use the onInviteByPhoneStatus event listener to find out about the status of the call, for example, ringing, accepted, hangup, etc.
final inviteByPhoneStatusListener =
eventListener.addListener(EventType.onInviteByPhoneStatus, (data) async {
data = data as Map;
debugPrint(
"onInviteByPhoneStatus: status: ${data['status']}, reason: ${data['reason']}");
});