github: https://github.com/alantsai-samples/2021-net-conf-acs-demo
如果今天你的 Application 使用者遇到了問題可以怎麼樣尋求協助?最快的方式肯定是透過視訊或者通話等功能來達到。但是要做這件事並不容易。以現有流程,可能使用者要打電話找客服,客服在開 Teams 的會議鏈接,然後想辦法傳鏈接過去,然後使用者可能還要下載應用程式,等連上的時候都要下班了。難道不能直接在應用程式一鍵就連上客服,直接就可以馬上共享畫面找出問題嗎?
Azure Communication Service 是一系列的 API 和 SDK 可以讓我們做到視訊、通話、即時聊天、簡訊和電話功能非常容易做到並且整合到 Application。尤其是最近整合到 Teams(在 Preview),讓我們客服人員可以使用 Teams 作為後端而一般使用者直接使用 Application 進行交談。
在這節裡面,我們來看一下什麼是 Azure Communication Service,以及如何在我們 Application 整合它讓我們可以提供豐富的通訊方式。
When you establish a peer-to-peer or group call, two protocols are used behind the scenes - HTTP (REST) for signaling and SRTP for media.
Signaling between the SDKs or between SDKs and Communication Services Signaling Controllers is handled with HTTP REST (TLS). For Real-Time Media Traffic (RTP), the User Datagram Protocol (UDP) is preferred. If the use of UDP is prevented by your firewall, the SDK will use the Transmission Control Protocol (TCP) for media.
Case 1: VoIP where a direct connection between two devices is possible
Case 2: VoIP where a direct connection between devices is not possible, but where connection between NAT devices is possible
Case 3: VoIP where neither a direct nor NAT connection is possible
Voice Over IP (VoIP)
When a user of your application calls another user of your application over an internet or data connection, the call is made over Voice Over IP (VoIP). In this case, both signaling and media flow over the internet.
Public switched telephone network (PSTN)
Any time your users interact with a traditional telephone number, calls are facilitated by PSTN (Public Switched Telephone Network) voice calling. To make and receive PSTN calls, you need to add telephony capabilities to your Azure Communication Services resource. In this case, signaling and media use a combination of IP-based and PSTN-based technologies to connect your users.
One-to-one call
A one-to-one call on Azure Communication Services happens when one of your users connects to another user using one of our SDKs. The call can be either VoIP or PSTN.
Group call
A group call on Azure Communication Services happens when three or more participants connect to one another. Any combination of VoIP and PSTN-connected users can be present on a group call. A one-to-one call can be converted into a group call by adding more participants to the call. One of those participants can be a bot.
Supported video standards
We support H.264 (MPEG-4).
Video quality
We support up to Full HD 1080p on the native (iOS, Android) SDKs. For Web (JS) SDK we support Standard HD 720p. The quality depends on the available bandwidth.
Dataflows
The user starts the client application. The design of this application and user authentication scheme is in your control.
The client application contacts your identity management service. The identity management service maintains a mapping between your users and other addressable objects (for example services or bots) to Azure Communication Service identities.
The identity management service creates a user access token for the applicable identity. If no Azure Communication Services identity has been allocated the past, a new identity is created.
Dataflows
The accepting user initializes the Call client, allowing them to receive incoming phone calls.
The initiating user needs the Azure Communication Services identity of the person they want to call. A typical experience may have a friend's list maintained by the identity management service that collates the user's friends and associated Azure Communication Service identities.
The initiating user initializes their Call client and calls the remote user.
The accepting user is notified of the incoming call through the Calling SDK.
The users communicate with each other using voice and video in a call.
Dataflows
The Call Management Service creates a group call with Graph APIs. Another pattern involves end users creating the group call using Bookings, Outlook, Teams, or another scheduling experience in the Microsoft 365 ecosystem.
The Call Management Service shares the Teams call details with Azure Communication Service clients.
Typically, a Teams user must join the call and allow external users to join through the lobby. However this experience is sensitive to the Teams tenant configuration and specific meeting settings.
Azure Communication Service users initialize their Call client and join the Teams meeting, using the details received in Step 2.
The users communicate with each other using voice and video in a call.
General features
User authentication.
View doctors and book appointments.
Chat with QnA bot to book appointment or start a support consultation.