@@ -35,7 +35,7 @@ For a 1:1 call to a PSTN number, use the following code:
35
35
``` js
36
36
const pstnCallee = { phoneNumber: ' <ACS_USER_ID>' }
37
37
const alternateCallerId = {phoneNumber: ' <ALTERNATE_CALLER_ID>' };
38
- const oneToOneCall = callAgent .startCall ([pstnCallee], {alternateCallerId});
38
+ const oneToOneCall = callAgent .startCall ([pstnCallee], { alternateCallerId });
39
39
```
40
40
41
41
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:
44
44
const userCallee = { communicationUserId: ' <ACS_USER_ID>' }
45
45
const pstnCallee = { phoneNumber: ' <PHONE_NUMBER>' };
46
46
const alternateCallerId = {phoneNumber: ' <ALTERNATE_CALLER_ID>' };
47
- const groupCall = callAgent .startCall ([userCallee, pstnCallee], {alternateCallerId});
47
+ const groupCall = callAgent .startCall ([userCallee, pstnCallee], { alternateCallerId });
48
48
```
49
49
50
50
### 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
196
196
const userIdentifier = { communicationUserId: ' <ACS_USER_ID>' };
197
197
const pstnIdentifier = { phoneNumber: ' <PHONE_NUMBER>' }
198
198
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 });
200
201
```
201
202
202
203
### Remove a participant from a call
@@ -335,6 +336,7 @@ Find out why a call ended by inspecting the `callEndReason` property:
335
336
336
337
` ` ` js
337
338
const callEndReason = call.callEndReason;
339
+ const callEndReasonMessage = callEndReason.message // (string) user friendly message
338
340
const callEndReasonCode = callEndReason.code // (number) code associated with the reason
339
341
const callEndReasonSubCode = callEndReason.subCode // (number) subCode associated with the reason
340
342
` ` `
0 commit comments