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/call-automation/custom-context.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Azure Communication Services Call Automation how-to for passing call contextual data in Call Automation
2
+
title: Azure Communication Services Call Automation How-to for Passing Call Contextual Data in Call Automation
3
3
titleSuffix: An Azure Communication Services how-to document
4
-
description: Provides a how-to guide for passing contextual information with Call Automation.
4
+
description: The article shows howto pass contextual information with Call Automation.
5
5
author: jutik0
6
6
ms.topic: how-to
7
7
ms.service: azure-communication-services
@@ -12,38 +12,39 @@ manager: visho
12
12
services: azure-communication-services
13
13
---
14
14
15
-
# How to pass contextual data between calls
15
+
# Pass contextual data between calls
16
16
17
-
Call Automation allows developers to pass along custom contextual information when routing calls. Developers can pass metadata about the call, callee or any other information that is relevant to their application or business logic. This allows businesses to manage, and route calls across networks without having to worry about losing context.
17
+
Call Automation allows developers to pass along custom contextual information when routing calls. Developers can pass metadata about the call, caller, or any other information that's relevant to their application or business logic. Businesses can then manage and route calls across networks without having to worry about losing context.
18
18
19
-
Passing context is supported by specifying custom headers. These are an optional list of key-value pairs that can be included as part of `AddParticipant` or `Transfer` actions. The context can be later retrieved as part of the `IncomingCall` event payload.
19
+
Passing context is supported by specifying custom headers. This optional list of key/value pairs is included as part of `AddParticipant` or `Transfer` actions. The context is retrieved later as part of the `IncomingCall` event payload.
20
20
21
-
Custom call context is also forwarded to the SIP protocol, this includes both the freeform custom headers as well as the standard User-to-User Information (UUI) SIP header. When routing an inbound call from your telephony network, the data set from your SBC in the custom headers and UUI is similarly included in the `IncomingCall` event payload.
21
+
Custom call context is also forwarded to the Session Initiation Protocol (SIP), which includes both the freeform custom headers and the standard user-to-user information (UUI) SIP header. When an inbound call from your telephony network is routed, the data set from your Session Border Controller (SBC) in the custom headers and UUI is similarly included in the `IncomingCall` event payload.
22
22
23
-
All custom context data is opaque to Call Automation or SIP protocols and its content is unrelated to any basic functions.
23
+
All custom context data is opaque to Call Automation or SIP protocols, and its content is unrelated to any basic functions.
24
24
25
-
Below are samples on how to get started using custom context headers in Call Automation.
25
+
The following samples show how to get started by using custom context headers in Call Automation.
26
26
27
-
As a prerequisite, we recommend you to read these articles to make the most of this guide:
27
+
## Prerequisites
28
28
29
-
- Call Automation [concepts guide](../../concepts/call-automation/call-automation.md#call-actions) that describes the action-event programming model and event callbacks.
30
-
- Learn about [user identifiers](../../concepts/identifiers.md#the-communicationidentifier-type) like CommunicationUserIdentifier and PhoneNumberIdentifierused in this guide.
29
+
-Read the Call Automation [concepts article](../../concepts/call-automation/call-automation.md#call-actions) that describes the action-event programming model and event callbacks.
30
+
- Learn about the [user identifiers](../../concepts/identifiers.md#the-communicationidentifier-type) like `CommunicationUserIdentifier` and PhoneNumberIdentifier` that are used in this article.
31
31
32
-
For all the code samples, `client` is CallAutomationClient object that can be created as shown and `callConnection` is the CallConnection object obtained from Answer or CreateCall response. You can also obtain it from callback events received by your application.
32
+
For all the code samples, `client` is the `CallAutomationClient` object that you can create, and `callConnection` is the `CallConnection` object that you obtain from an `Answer` or `CreateCall` response. You can also obtain it from callback events that your application receives.
33
33
34
34
## Technical parameters
35
-
Call Automation supports up to 5 custom SIP headers and 1000 custom VOIP headers. Additionally, developers can include a dedicated User-To-User header as part of SIP headers list.
36
35
37
-
The custom SIP header key must start with a mandatory ‘X-MS-Custom-’ prefix. The maximum length of a SIP header key is 64 chars, including the X-MS-Custom prefix. The SIP header key may consist of alphanumeric characters and a few selected symbols which includes `.`, `!`, `%`, `*`, `_`, `+`, `~`, `-`. The maximum length of SIP header value is 256 chars. The same limitations apply when configuring the SIP headers on your SBC. The SIP header value may consist of alphanumeric characters and a few selected symbols which includes `=`, `;`, `.`, `!`, `%`, `*`, `_`, `+`, `~`, `-`.
36
+
Call Automation supports up to five custom SIP headers and 1,000 custom voice-over-IP (VoIP) headers. Developers can include a dedicated user-to-user header as part of a SIP headers list.
38
37
39
-
The maximum length of a VOIP header key is 64 chars. These headers can be sent without ‘x-MS-Custom’ prefix. The maximum length of VOIP header value is 1024 chars.
38
+
The custom SIP header key must start with a mandatory `X-MS-Custom-` prefix. The maximum length of a SIP header key is 64 characters, including the `X-MS-Custom` prefix. The SIP header key consists of alphanumeric characters and a few selected symbols, which include `.`, `!`, `%`, `*`, `_`, `+`, `~`, and `-`. The maximum length of a SIP header value is 256 characters. The same limitations apply when you configure the SIP headers on your SBC. The SIP header value consists of alphanumeric characters and a few selected symbols, which include `=`, `;`, `.`, `!`, `%`, `*`, `_`, `+`, `~`, and `-`.
40
39
41
-
## Adding custom context when inviting a participant
40
+
The maximum length of a VoIP header key is 64 characters. These headers can be sent without the `x-MS-Custom` prefix. The maximum length of a VoIP header value is 1,024 characters.
42
41
43
-
### [csharp](#tab/csharp)
42
+
## Add custom context when you invite a participant
43
+
44
+
### [C#](#tab/csharp)
44
45
45
46
```csharp
46
-
// Invite a communication services user and include one VOIP header
47
+
// Invite an Azure Communication Services user and include one VOIP header
- For a sample payload of the incoming call, refer to this [guide](../../../event-grid/communication-services-voice-video-events.md#microsoftcommunicationincomingcall).
286
+
## Related content
288
287
288
+
- For a sample payload of the incoming call, see [Azure Communication Services: Voice and video calling events](../../../event-grid/communication-services-voice-video-events.md#microsoftcommunicationincomingcall).
289
289
- Learn more about [SIP protocol details for direct routing](../../concepts/telephony/direct-routing-sip-specification.md).
0 commit comments