Skip to content

Commit 73660cf

Browse files
Merge pull request #260236 from fangchen0601/fangchen0601/consume_uui
Add sample code on UUI
2 parents de69907 + 4db541a commit 73660cf

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

articles/communication-services/how-tos/call-automation/actions-for-call-control.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ options.customCallingContext = customCallingContext;
494494
const result = await callConnection.transferCallToParticipant(transferDestination, options);
495495

496496
// Transfer pstn User
497-
const result = await callConnection.transferCallToParticipant(transferDestination, options);
498497
const transferDestination = { phoneNumber: "<taget_phoneNumber>" };
499498
const transferee = { phoneNumber: "<transferee_phoneNumber>" };
500499
const options = { transferee: transferee, operationContext: "<Your_context>", operationCallbackUrl: "<url_endpoint>" };

articles/communication-services/how-tos/call-automation/custom-context.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ AcsIncomingCallCustomContext callCustomContext = incomingEvent.CustomContext;
229229
var voipHeaders = callCustomContext.VoipHeaders;
230230
var sipHeaders = callCustomContext.SipHeaders;
231231

232+
// Get SIP UUI header value
233+
var userToUser = sipHeaders["user-To-User"]
234+
232235
// Proceed to answer or reject call as usual
233236
```
234237

@@ -242,6 +245,9 @@ AcsIncomingCallCustomContext callCustomContext = incomingEvent.getCustomContext(
242245
Map<String, String> voipHeaders = callCustomContext.getVoipHeaders();
243246
Map<String, String> sipHeaders = callCustomContext.getSipHeaders();
244247

248+
// Get SIP UUI header value
249+
String userToUser = sipHeaders.get("user-To-User");
250+
245251
// Proceed to answer or reject call as usual
246252
```
247253

@@ -254,6 +260,9 @@ const callCustomContext = incomingEvent.customContext;
254260
const voipHeaders = callCustomContext.voipHeaders;
255261
const sipHeaders = callCustomContext.sipHeaders;
256262

263+
// Get SIP UUI header value
264+
const userToUser = sipHeaders["user-To-User"];
265+
257266
// Proceed to answer or reject call as usual
258267
```
259268

@@ -265,6 +274,11 @@ callCustomContext = incomingEvent.customContext
265274
# Inspect dictionary with key/value pairs
266275
voipHeaders = callCustomContext.voipHeaders
267276
sipHeaders = callCustomContext.sipHeaders
277+
278+
# Get SIP UUI header value
279+
userToUser = sipHeaders.get("user-To-User")
280+
281+
# Proceed to answer or reject call as usual
268282
```
269283

270284
-----

0 commit comments

Comments
 (0)