Integrating Zoom Video SDK with Twilio Audio - Need Clarification on PSTN Add-on and Dual Usage

Hello everyone, and especially @tommy :smiley:

We are integrating the Zoom Video SDK with Twilio Audio, following this article: IVR Dial Trees with Video SDK. We currently have 17 Twilio numbers purchased for various countries, working with Twilio Video.

  1. Just for the sake of clarification, am I right that the global_dial_in_numbers, which are currently unavailable in our session object for Zoom Video SDK API, will be available after purchasing the PSTN (audio conferencing) add-on?
  2. I donā€™t have an access to a Zoom Account. Have I rightly understood that once the add-on is purchased, the business will be able to access the dial-in numbers for necessary countries in the admin panel, and provide them to the development team for integration with our Twilio setup?
  3. Until December, we need to maintain simultaneous usage of our current Twilio Video setup. How can we manage this in the best way? During the transition period, is it possible to use these Zoom-provided numbers for Twilio Video as well, ensuring a seamless switch between the two services?

Any insights would be greatly appreciated.

Thank you!

Hey @dmytro.prusov , happy to help! :slight_smile:

  1. That is correct.
  2. Checkout this flow here, it shows how you can use your Twilio Audio/Voice with Zoom Video SDK: How to use Twilio IVR Dial Trees with the Zoom Video SDK
  3. I would make sure you are just swapping Twilio Video with Zoom Video SDK. You can keep your Twilio Programmable Voice the same, but connect it to Zoom Video SDK instead of Twilio Programmable Video.

Does that make sense? Happy to walk you through it on a meeting as well.

Best,
Tommy

Thanks so much for the clarification!

So it looks like all we need to do is:

  1. Purchase the audio plan.
  2. Update the backend code with the logic you outlined in your article using the sendDigits approach.

I really appreciate the offer to have a meeting, but fingers crossed :crossed_fingers:, I wonā€™t get stuck so badly that I need it! If I do, Iā€™ll be ready with my SOS emoji :rotating_light:.

Thanks again for your help!

Exactly!

Let me know how it goes!

-Tommy

1 Like

Hi @tommy !

Thanks again for your previous help! I have a follow-up question regarding user identification for Zoom Video SDK dial-in users.

With Twilio Video, we handle this like so:

const VoiceResponse = require('twilio').twiml.VoiceResponse;

function connectToTwilioRoom(userIdentity: string, liveRoomName: string) {
    const response = new VoiceResponse();
    const connect = response.connect();
    const room = connect.room(liveRoomName);
    room.setAttribute('participantIdentity', userIdentity);

    return response;
}

And also when connecting to a Zoom session via JWT, we can set a user_identity key in the token payload, which is crucial for mapping users to our system. [from docs: param user_key (string) - Another identifier for the user. Set with the user_identity key in the Video SDK JWT payload]

However, using the sendDigits approach for phone dial-ins doesnā€™t seem to offer a way to set this user_identity. Is there a way to achieve this, or any recommended workarounds? Itā€™s quite important for us to uniquely identify users for tracking and managing sessions in our backend.

Thanks for your guidance!

HI @tommy !

I had a bit of a ā€œEureka!ā€ moment, almost like Newton under the apple tree. The idea is to capture the From number in Twilio webhook, save it in our system, and then, when using Zoomā€™s API to list session users, we can match the call_number to identify exactly which user from our system has dialed in.

This way, we can identify and track dial-in users based on their phone numbers, just like we do with user_identity in JWTs.

Does this approach seem feasible to you?

Best, Dmytro

1 Like

Hey @dmytro.prusov , great approach!

-Tommy

1 Like

Hello @tommy , I have one more question for you.

Our organization has separate environments for testing and production purposes. We also want to keep our production Zoom Live Video SDK API keys private.

To achieve that, we registered 2 separate Zoom accounts and used them for testing and production environments accordingly. In case we want to use Audio Conferencing addon, we will need to have a $100 commitment for each account.
Please advise. Can we use one account for the development and production but have 2 separate API keys on this account? Is there some kind of sandbox or test account for this purpose offered by Zoom?

Sincerely, Dmytro

Hi @tommy ,

I hope youā€™re doing well. We recently purchased the PSTN audio add-on for our Zoom Video SDK integration. However, Iā€™m encountering a critical issue with the sendDigits functionality in Twilio, which requires numeric data [from Twilio docs, "sendDigits attribute may only contain the following characters "0123456789#w].

According to the documentation here and the recent changelog update here, the session_number should be returned, but itā€™s missing in the API response.

Hereā€™s an example of the data Iā€™m receiving (GET https://api.zoom.us/v2/videosdk/sessions/Xc090QtISQmEEGvBGGOWQw==?type=live):

(
 [id] => Xc090QtISQmEEGvBGGOWQw==
 [session_name] => c89fe046-8977-4441-b966-63017b4d11d9:room
 [start_time] => 2024-08-29T15:05:54Z
 [end_time] => 
 [duration] => 
 [user_count] => 1
 [has_voip] => 
 [has_video] => 
 [has_screen_share] => 
 [has_recording] => 
 [has_pstn] => 
)

This is blocking our dial-in integration, as sendDigits cannot process the session ID due to non-numeric characters. Could you please assist or escalate this issue?

Thank you for your help!

Best regards, Dmytro

@tommy , I think weā€™ve hit a point where a live chat would be really helpful ā€” especially given the missing session_number issue. :smiling_face_with_tear:

If youā€™re still up for it, Iā€™d love to set up a meeting to walk through this together. Let me know when youā€™re available!

Sincerelly, Dmytro

Hey @dmytro.prusov ,

Letā€™s setup a meeting: Zoom Scheduler

Sorry for the late reply, was out of the office.

Best,
Tommy

2 Likes

Hi @tommy ,

Thanks you for having an opportunity to have a meeting! I booked it on Friday! Before that, I wanted to clarify the flow we discussed to make sure Iā€™m on the right track.

So thus the concept is:

  1. Twilio Number is an Entry Point: The user dials into the Twilio number, which acts as middleware.
  2. Connect to Zoom PSTN Number: Using the sendDigits property, Twilio dials the Zoom PSTN number and passes the Zoom session information (session number, participant ID, and passcode).

Hereā€™s the Node.js code I want to use:

const VoiceResponse = require('twilio').twiml.VoiceResponse;

function connectToZoom(zoomDialInNumber, zoomSessionNumber) {
    const response = new VoiceResponse();
    const dial = response.dial();
    dial.number({
        sendDigits: 'wwww' + zoomSessionNumber + '#ww#ww#'
    }, zoomDialInNumber);
    return response;
}

I believe the zoomSessionNumber corresponds to session_number from the docs, and the zoomDialInNumber is the number from the global_dial_in_numbers field. However, weā€™re currently not receiving the global_dial_in_numbers field via the API, even though we purchased the audio add-on.

Could you clarify how to configure the admin panel so that these numbers are returned? A screenshot would be incredibly helpful. I also noticed in your YouTube video here, the dial-in numbers werenā€™t displayed. Is this related?

Thanks again, and Iā€™m looking forward to our meeting!

Best regards, Dmytro

@tommy Iā€™ve also run into another challenge that will appear immediately after user connects to the Zoom meeting using sendDigits approach. :frowning: In our Twilio Video integration, we use a server-side callback to notify the frontend (via WebSockets) when a dial-in participant connects or disconnects, allowing us to display them in real-time.

For Zoom Video SDK, I canā€™t find an equivalent solution for dial-in users. I know there are hooks for the Meeting SDK, but is there a way to notify the frontend when dial-in users connect/disconnect in the Video SDK?

Thanks for your help!

@tommy
Iā€™ve been reviewing the Zoom documentation in a more meticulous way and found the session.user_data event, which seems to handle user events, including dial-in users.

I believe the flow is that I would need to subscribe to this event using the Event Subscription API (an access to which. should be purchased), configure the webhook endpoint in the admin panel (e.g., via ngrok for testing), and then forward the data to the frontend via WebSockets for real-time updates.

Could you confirm if I understood this correctly?

Thanks!

Hey @dmytro.prusov ,

Looking forward to chatting on Friday.

Yes, the Video SDK user-added event will fire when a PSTN user joins as well.

These are the events you should be looking at, not the paid add on QSS.

Client Side: VideoClient | Zoom Video SDK for Web - 1.12.1
Server Side: Zoom API Events - Video SDK

Best,
Tommy

1 Like