You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/calling-sdk/spotlight.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,6 @@ ms.subservice: teams-interop
9
9
ms.topic: how-to
10
10
ms.date: 03/01/2023
11
11
ms.custom: template-how-to
12
-
13
12
---
14
13
15
14
# Spotlight states
@@ -20,7 +19,6 @@ In this article, you'll learn how to implement Microsoft Teams spotlight capabil
20
19
21
20
Since the video stream resolution of a participant is increased when spotlighted, it should be noted that the settings done on [Video Constraints](../../concepts/voice-video-calling/video-constraints.md) also apply to spotlight.
22
21
23
-
24
22
## Prerequisites
25
23
26
24
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
Copy file name to clipboardExpand all lines: articles/communication-services/tutorials/proxy-calling-support-tutorial.md
+130-5Lines changed: 130 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,27 @@ author: sloanster
6
6
services: azure-communication-services
7
7
8
8
ms.author: micahvivion
9
-
ms.date: 04/18/2023
9
+
ms.date: 04/20/2023
10
10
ms.topic: quickstart
11
11
ms.service: azure-communication-services
12
12
ms.subservice: calling
13
13
ms.custom: mode-other
14
14
---
15
-
# How to force calling traffic to be proxied across your own servers
15
+
# How to force calling traffic to be proxied across your own server
16
16
17
17
In certain situations, it might be useful to have all your client traffic proxied to a server that you can control. When the SDK is initializing, you can provide the details of your servers that you would like the traffic to route to. Once enabled all the media traffic (audio/video/screen sharing) travel through the provided TURN servers instead of the Azure Communication Services defaults. This tutorial guides on how to have WebJS SDK calling traffic be proxied to servers that you control.
18
18
19
19
>[!IMPORTANT]
20
20
> The proxy feature is available starting in the public preview version [1.13.0-beta.4](https://www.npmjs.com/package/@azure/communication-calling/v/1.13.0-beta.4) of the Calling SDK. Please ensure that you use this or a newer SDK when trying to use this feature. This Quickstart uses the Azure Communication Services Calling SDK version greater than `1.13.0`.
Many times, establishing a network connection between two peers isn't straightforward. A direct connection might not work because of many reasons: firewalls with strict rules, peers sitting behind a private network, or computers are running in a NAT environment. To solve these network connection issues, you can use a TURN server. The term stands for Traversal Using Relays around NAT, and it's a protocol for relaying network traffic STUN and TURN servers are the relay servers here. Learn more about how ACS [mitigates](../concepts/network-traversal.md) network challenges by utilizing STUN and TURN.
26
27
27
-
## Provide your TURN servers details to the SDK
28
-
To provide the details of your TURN servers, you need to pass details of what TURN server to use as part of `CallClientOptions` while initializing the `CallClient`. For more details how to setup a call see [Azure Communication Services Web SDK](../quickstarts/voice-video-calling/get-started-with-video-calling.md?pivots=platform-web)) for the Quickstart on how to setup Voice and Video.
28
+
###Provide your TURN servers details to the SDK
29
+
To provide the details of your TURN servers, you need to pass details of what TURN server to use as part of `CallClientOptions` while initializing the `CallClient`. For more information how to setup a call, see [Azure Communication Services Web SDK](../quickstarts/voice-video-calling/get-started-with-video-calling.md?pivots=platform-web)) for the Quickstart on how to setup Voice and Video.
@@ -77,7 +78,131 @@ const callClient = new CallClient({
77
78
78
79
The API reference for the `CallClientOptions` object, and the `networkConfiguration` property within it can be found here - [CallClientOptions](/javascript/api/azure-communication-services/@azure/communication-calling/callclientoptions?view=azure-communication-services-js&preserve-view=true).
79
80
80
-
## Set up a TURN server in Azure
81
+
###Set up a TURN server in Azure
81
82
You can create a Linux virtual machine in the Azure portal using this [guide](/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu), and deploy a TURN server using [coturn](https://github.com/coturn/coturn), a free and open source implementation of a TURN and STUN server for VoIP and WebRTC.
82
83
83
84
Once you have setup a TURN server, you can test it using the WebRTC Trickle ICE page - [Trickle ICE](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/).
85
+
86
+
## Proxy signaling traffic
87
+
88
+
To provide the URL of a proxy server, you need to pass it in as part of `CallClientOptions` while initializing the `CallClient`. For more details how to setup a call see [Azure Communication Services Web SDK](../quickstarts/voice-video-calling/get-started-with-video-calling.md?pivots=platform-web)) for the Quickstart on how to setup Voice and Video.
// While you are creating an instance of the CallClient (the entry point of the SDK):
94
+
constcallClient=newCallClient({
95
+
networkConfiguration: {
96
+
proxy: {
97
+
url:'https://myproxyserver.com'
98
+
}
99
+
}
100
+
});
101
+
102
+
// ...continue normally with your SDK setup and usage.
103
+
```
104
+
105
+
> [!NOTE]
106
+
> If the proxy URL provided is an invalid URL, the `CallClient` initialization will fail and will throw errors accordingly. The error messages thrown will help you troubleshoot if you run into issues.
107
+
108
+
The API reference for the `CallClientOptions` object, and the `networkConfiguration` property within it can be found here - [CallClientOptions](/javascript/api/azure-communication-services/@azure/communication-calling/callclientoptions?view=azure-communication-services-js&preserve-view=true).
109
+
110
+
### Setting up a signaling proxy middleware in express js
111
+
112
+
You can also create a proxy middleware in your express js server setup to have all the URLs redirected through it, using the [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware) npm package.
113
+
The `createProxyMiddleware` function from that package should cover what you need for a simple redirect proxy setup. Here's an example usage of it with some option settings that the SDK needs to have all of our URLs working as expected:
114
+
115
+
```js
116
+
constproxyRouter= (req) => {
117
+
// Your router function if you don't intend to setup a direct target
118
+
119
+
// An example:
120
+
if (!req.originalUrl&&!req.url) {
121
+
return'';
122
+
}
123
+
124
+
constincomingUrl=req.originalUrl||req.url;
125
+
if (incomingUrl.includes('/proxy')) {
126
+
return'https://microsoft.com/forwarder/';
127
+
}
128
+
129
+
return incomingUrl;
130
+
}
131
+
132
+
constmyProxyMiddleware=createProxyMiddleware({
133
+
target:'https://microsoft.com', // This will be ignore if a router function is provided, but createProxyMiddleware still requires this to be passed in (see it's official docs on the npm page for the most recent changes)
134
+
router: proxyRouter,
135
+
changeOrigin:true,
136
+
secure:false, // If you have proper SSL setup, set this accordingly
137
+
followRedirects:true,
138
+
ignorePath:true,
139
+
ws:true,
140
+
logLevel:'debug'
141
+
});
142
+
143
+
// And finally pass in your proxy middleware to your express app depending on your URL/host setup
144
+
app.use('/proxy', myProxyMiddleware);
145
+
```
146
+
147
+
> [!Tip]
148
+
> If you are having SSL issues, check out the [cors](https://www.npmjs.com/package/cors) package.
149
+
150
+
### Setting up a signaling proxy server on Azure
151
+
You can create a Linux virtual machine in the Azure portal and deploy an NGINX server on it using this guide - [Quickstart: Create a Linux virtual machine in the Azure portal](/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu).
152
+
153
+
Here's an NGINX config that you could make use of for a quick spin up:
0 commit comments