Skip to content

Commit 610f7b5

Browse files
Merge pull request #283930 from chriswhilar/patch-91
Update manage-calls-web.md
2 parents 1f97072 + 8a77149 commit 610f7b5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/communication-services/how-tos/calling-sdk/includes/manage-calls/manage-calls-web.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ For a 1:1 call to a PSTN number, use the following code:
3535
```js
3636
const pstnCallee = { phoneNumber: '<ACS_USER_ID>' }
3737
const alternateCallerId = {phoneNumber: '<ALTERNATE_CALLER_ID>'};
38-
const oneToOneCall = callAgent.startCall([pstnCallee], {alternateCallerId});
38+
const oneToOneCall = callAgent.startCall([pstnCallee], { alternateCallerId });
3939
```
4040

4141
For a 1:n call to a user and a PSTN number, use the following code:
@@ -44,7 +44,7 @@ For a 1:n call to a user and a PSTN number, use the following code:
4444
const userCallee = { communicationUserId: '<ACS_USER_ID>' }
4545
const pstnCallee = { phoneNumber: '<PHONE_NUMBER>'};
4646
const alternateCallerId = {phoneNumber: '<ALTERNATE_CALLER_ID>'};
47-
const groupCall = callAgent.startCall([userCallee, pstnCallee], {alternateCallerId});
47+
const groupCall = callAgent.startCall([userCallee, pstnCallee], { alternateCallerId });
4848
```
4949

5050
### Join a room call
@@ -196,7 +196,8 @@ To add a participant (either a user or a phone number) to a call, you can use th
196196
const userIdentifier = { communicationUserId: '<ACS_USER_ID>' };
197197
const pstnIdentifier = { phoneNumber: '<PHONE_NUMBER>' }
198198
const remoteParticipant = call.addParticipant(userIdentifier);
199-
const remoteParticipant = call.addParticipant(pstnIdentifier, {alternateCallerId: '<ALTERNATE_CALLER_ID>'});
199+
const alternateCallerId = { phoneNumber: '<ALTERNATE_CALLER_ID>' };
200+
const remoteParticipant = call.addParticipant(pstnIdentifier, { alternateCallerId });
200201
```
201202

202203
### Remove a participant from a call
@@ -335,6 +336,7 @@ Find out why a call ended by inspecting the `callEndReason` property:
335336

336337
```js
337338
const callEndReason = call.callEndReason;
339+
const callEndReasonMessage = callEndReason.message // (string) user friendly message
338340
const callEndReasonCode = callEndReason.code // (number) code associated with the reason
339341
const callEndReasonSubCode = callEndReason.subCode // (number) subCode associated with the reason
340342
```

0 commit comments

Comments
 (0)