初探 Azure Communication Service
讓 App 也有視訊、通話、即時聊天、簡訊和電話功能
Alan Tsai
簡單自我介紹
• Alan Tsai
• 威煦軟體 CTO
• 後端工程師
• .NET 技術爲主
• 喜歡學習不同東西
• Azure
• Data Science、Chatbot
• DevOps、Container
• 架構、加强開發的 Tools
• 翻譯文章/軟體
• 看小說
教就是最好的學習方式 - 喜歡考證驗證所學
喜歡技術分享
• 2020 .NET Conf
• 不會 Javascript 沒關係,用 Blazor 來解決前端需求
成為 Full Stack .NET 開發者吧
• 2020 Global Azure
• Azure API Management
協助邁向Open API及Micro Service架構的好用服務
• 2020 Microsoft Online Tech Forum
• Keep Azure cost down
• 2019 Microsoft Insider DevTour Taipei
• Future proof your desktop apps with .NET core
喜歡技術分享
• Trainocate
• AZ-104、AZ-204、AZ-400、AZ-500、SC-900、DP-200、DP-201、PL-900、DA-100
• 台灣智慧自動化與機器人協會
• 運用Python進行大數據分析
• 機器學習基礎理論課程及人工智慧 – ML.NET
• 中華電信學院
• Windows Container 技術實務班
• DevOps與CI/CD實務研習班
• 使用Azure AI打造有人工智能的Line聊天機器人
• 聖森内部教育訓練
• Azure DevOps CI/CD 應用
歡迎訂閲、按贊 + 分享
• Alan Tsai 的學習筆記
• https://blog.alantsai.net
• FB粉絲頁
• http://fb.alantsai.net
• Youtube
• http://yt.alantsai.net
contact@alantsai.net
Chat 已經是很常用的線上客服
如果文字溝通不了怎麼辦?
如果可以直接通話或者 Share 畫面就好了
This Photo by Unknown Author is licensed under CC BY-SA
Agenda
• Azure Communication Service (ACS) 是什麼?
• 結構
• Production Ready
• 結語
ACS 是什麼?
ACS 是什麼?
• 把「通訊」整合到應用程式的服務
• Video 和 Voice Calling
• Chat
• Phone(美國、英國)
• SMS
• 可以接入 PSTN – 自己的電話
• Microsoft Teams 的背後服務開放出來
Video 和 Voice Calling
• Voice Over IP (VoIP)
• 1 對 1 通話
• 多方通話
• Public switched telephone network (PSTN)
• 錄影功能 - preview
• Video
• H.264 (MPEG-4)
• iOS, Android SDKs Full HD 1080p
• JS SDK HD 720p
Chat
• 使用情景
• 1 對 1 聊天
• 群組聊天
• ChatThread
• 1個或多個 使用者
• 使用者
• 可以在 1個或者多個 ChatThread
https://docs.microsoft.com/en-us/azure/communication-services/concepts/chat/concepts?WT.mc_id=AZ-MVP-5003856
Chat
https://docs.microsoft.com/en-us/azure/communication-services/concepts/chat/concepts?WT.mc_id=AZ-MVP-5003856
Phone
https://docs.microsoft.com/en-us/azure/communication-services/concepts/telephony/telephony-concept?WT.mc_id=AZ-MVP-5003856
SMS
• 可以從 Azure 購買電話號碼(美國、英國)
• 可以寄送簡訊
• 可以收簡訊
結構
SDK
https://docs.microsoft.com/en-us/azure/communication-services/concepts/sdk-options?WT.mc_id=AZ-MVP-5003856#sdks
SDK
https://docs.microsoft.com/en-us/azure/communication-services/concepts/sdk-options?WT.mc_id=AZ-MVP-5003856#sdks
Demo
建立服務
Presenter
Authentication
https://docs.microsoft.com/en-us/azure/communication-services/concepts/authentication?WT.mc_id=AZ-MVP-5003856
Identity
• ACS 有個 Identity 儲存空間
• 可以無限建立 – 沒有費用
• 每一個 Identity 有
• Id
• Access Token
• 24 小時到期
• 可以設定 Scope
• 可以自己對應關聯:1:1, 1:N, N:1, N:M
Identity 管理
https://docs.microsoft.com/en-us/azure/communication-services/concepts/client-and-server-architecture?WT.mc_id=AZ-MVP-5003856
Demo
voice
Presenter
基本 1 on 1
https://docs.microsoft.com/en-us/azure/communication-services/concepts/client-and-server-architecture?WT.mc_id=AZ-MVP-5003856#calling-a-user-without-push-notifications
Demo
video
Presenter
Demo
Teams
Presenter
Teams Call
https://docs.microsoft.com/en-us/azure/communication-services/concepts/client-and-server-architecture?WT.mc_id=AZ-MVP-5003856#joining-a-scheduled-teams-call
應用情景
https://docs.microsoft.com/en-us/azure/communication-services/concepts/teams-interop?WT.mc_id=AZ-MVP-5003856
Production Ready
Group Chat
https://docs.microsoft.com/en-us/azure/communication-services/samples/chat-hero-sample?WT.mc_id=AZ-MVP-5003856
https://to.alantsai.net/demo-chat
Group Calling
https://docs.microsoft.com/en-us/azure/communication-services/samples/calling-hero-sample?pivots=platform-web&WT.mc_id=AZ-MVP-5003856
Group Calling
https://docs.microsoft.com/en-us/azure/communication-services/samples/calling-hero-sample?pivots=platform-web&WT.mc_id=AZ-MVP-5003856
https://to.alantsai.net/demo-group
Contoso Med App
https://github.com/Azure-Samples/communication-services-contoso-med-app
Retail App
https://github.com/Azure-Samples/communication-services-contoso-retail-app
UI Library - Web
https://azure.github.io/communication-ui-library/?path=/docs/overview--page&WT.mc_id=AZ-MVP-5003856
UI Library – android & ios
https://docs.microsoft.com/en-us/azure/communication-services/quickstarts/ui-library/get-started-composites?tabs=kotlin&pivots=platform-ios&WT.mc_id=AZ-MVP-5003856
結語
結語
• PaaS 的 Communication 服務
• 要打造 Teams 到各自應用程式不困難
• 重點是串聯提供更好的服務給使用者
等等,啊費用呢~~~
https://docs.microsoft.com/en-us/azure/communication-services/concepts/pricing?WT.mc_id=AZ-MVP-5003856
參考資料
• Overview
• Demo Code
工商一下
Thanks for joining!
Azure Taiwan
User Group

2021 Net Conf Taiwan-初探 Azure Communication Service 讓 App 也有視訊、通話、即時聊天、簡訊和電話功能

Editor's Notes

  • #10 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
  • #15 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.
  • #26 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.
  • #28  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.
  • #31 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.
  • #37 General features User authentication. View doctors and book appointments. Chat with QnA bot to book appointment or start a support consultation.