Make a PSTN call with UI Composites inside JavaScript-based Applications

Võ Quốc Minh 0 Reputation points
2024-06-18T07:29:39.8666667+00:00

I'm implementing PSTN calling functionality on my website (with HTML and Javascript) and I'm using UI Composites inside JavaScript-based Applications as instructed in: [azure.github.io/communication-ui-library/?path =/docs/use-composite-in-non-react-environment--page].

But I have a problem that I don't know where to pass the alternateCallerId and targetCallees so that I can make a call immediately when the [Start Call] button is pressed.

Here is my sample code:

<script src="./callcomposite.js"></script> // a prebuilt bundles that I downloaded from the website above.
<script type="module">
    const callAdapter = await callComposite.loadCallComposite(
        {
            locator: { groupId: "test-group-id" },
            displayName: "test-name",
            userId: { communicationUserId: "..." },
            token: "..."
        },
        document.getElementById('call-container'),
    );
</script>

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
785 questions
0 comments No comments
{count} votes