@wazo/sdk 0.37.25 → 0.37.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -58
- package/dist/wazo-sdk.js +3 -3
- package/esm/__tests__/api-client.test.js +2 -2
- package/esm/__tests__/web-rtc-client.test.js +10 -5
- package/esm/api/agentd.js +1 -1
- package/esm/api/amid.js +1 -1
- package/esm/api/application.js +1 -1
- package/esm/api/auth.js +1 -1
- package/esm/api/call-logd.js +1 -1
- package/esm/api/calld.js +1 -1
- package/esm/api/chatd.js +1 -1
- package/esm/api/confd.js +1 -1
- package/esm/api/ctid-ng.js +1 -1
- package/esm/api/dird.js +2 -2
- package/esm/api/webhookd.js +1 -1
- package/esm/api-client.js +2 -2
- package/esm/checker/Checker.js +10 -5
- package/esm/checker/checks/aor.js +2 -2
- package/esm/checker/checks/api.js +2 -2
- package/esm/checker/checks/index.js +10 -5
- package/esm/checker/checks/wazo-websocket.js +1 -1
- package/esm/checker/checks/webrtc-transport.js +10 -5
- package/esm/checker/checks/webrtc.js +10 -5
- package/esm/domain/AdHocAPIConference.js +2 -2
- package/esm/domain/CallSession.js +29 -2
- package/esm/domain/Contact.js +1 -1
- package/esm/domain/Features.js +2 -2
- package/esm/domain/Phone/CTIPhone.js +31 -4
- package/esm/domain/Phone/WebRTCPhone.js +55 -6
- package/esm/domain/SFUNotAvailableError.js +9 -0
- package/esm/domain/__tests__/CallSession.test.js +46 -2
- package/esm/domain/__tests__/Contact.test.js +1 -1
- package/esm/domain/__tests__/IndirectTransfer.test.js +29 -2
- package/esm/domain/__tests__/Room.test.js +29 -2
- package/esm/index.js +75 -10
- package/esm/lib/WazoSessionDescriptionHandler.js +9 -4
- package/esm/service/CallApi.js +2 -2
- package/esm/service/IssueReporter.js +1 -1
- package/esm/service/__tests__/IssueReporter.test.js +1 -1
- package/esm/service/getApiClient.js +2 -2
- package/esm/simple/Auth.js +74 -10
- package/esm/simple/Configuration.js +74 -10
- package/esm/simple/Directory.js +2 -2
- package/esm/simple/Phone.js +74 -10
- package/esm/simple/Websocket.js +1 -1
- package/esm/simple/index.js +74 -10
- package/esm/simple/room/LocalParticipant.js +74 -10
- package/esm/simple/room/Participant.js +74 -10
- package/esm/simple/room/RemoteParticipant.js +74 -10
- package/esm/simple/room/Room.js +74 -10
- package/esm/simple/room/SipRoom.js +74 -10
- package/esm/simple/room/Stream.js +74 -10
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +74 -10
- package/esm/simple/utils.js +74 -10
- package/esm/utils/__tests__/api-requester.test.js +1 -1
- package/esm/utils/api-requester.js +1 -1
- package/esm/web-rtc-client.js +10 -5
- package/esm/websocket-client.js +1 -1
- package/lib/__tests__/api-client.test.js +2 -2
- package/lib/__tests__/web-rtc-client.test.js +10 -5
- package/lib/api/agentd.js +1 -1
- package/lib/api/amid.js +1 -1
- package/lib/api/application.js +1 -1
- package/lib/api/auth.js +1 -1
- package/lib/api/call-logd.js +1 -1
- package/lib/api/calld.js +1 -1
- package/lib/api/chatd.js +1 -1
- package/lib/api/confd.js +1 -1
- package/lib/api/ctid-ng.js +1 -1
- package/lib/api/dird.js +2 -2
- package/lib/api/webhookd.js +1 -1
- package/lib/api-client.js +2 -2
- package/lib/checker/Checker.js +10 -5
- package/lib/checker/checks/aor.js +2 -2
- package/lib/checker/checks/api.js +2 -2
- package/lib/checker/checks/index.js +10 -5
- package/lib/checker/checks/wazo-websocket.js +1 -1
- package/lib/checker/checks/webrtc-transport.js +10 -5
- package/lib/checker/checks/webrtc.js +10 -5
- package/lib/domain/AdHocAPIConference.js +2 -2
- package/lib/domain/CallSession.js +29 -2
- package/lib/domain/Contact.js +1 -1
- package/lib/domain/Features.js +2 -2
- package/lib/domain/Phone/CTIPhone.js +31 -4
- package/lib/domain/Phone/WebRTCPhone.js +55 -5
- package/lib/domain/SFUNotAvailableError.js +11 -0
- package/lib/domain/__tests__/CallSession.test.js +46 -2
- package/lib/domain/__tests__/Contact.test.js +1 -1
- package/lib/domain/__tests__/IndirectTransfer.test.js +29 -2
- package/lib/domain/__tests__/Room.test.js +29 -2
- package/lib/index.js +75 -10
- package/lib/lib/WazoSessionDescriptionHandler.js +9 -4
- package/lib/service/CallApi.js +2 -2
- package/lib/service/IssueReporter.js +1 -1
- package/lib/service/__tests__/IssueReporter.test.js +1 -1
- package/lib/service/getApiClient.js +2 -2
- package/lib/simple/Auth.js +74 -10
- package/lib/simple/Configuration.js +74 -10
- package/lib/simple/Directory.js +2 -2
- package/lib/simple/Phone.js +74 -10
- package/lib/simple/Websocket.js +1 -1
- package/lib/simple/index.js +74 -10
- package/lib/simple/room/LocalParticipant.js +74 -10
- package/lib/simple/room/Participant.js +74 -10
- package/lib/simple/room/RemoteParticipant.js +74 -10
- package/lib/simple/room/Room.js +74 -10
- package/lib/simple/room/SipRoom.js +74 -10
- package/lib/simple/room/Stream.js +74 -10
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +74 -10
- package/lib/simple/utils.js +74 -10
- package/lib/utils/__tests__/api-requester.test.js +1 -1
- package/lib/utils/api-requester.js +1 -1
- package/lib/web-rtc-client.js +10 -5
- package/lib/websocket-client.js +1 -1
- package/package.json +1 -1
- package/src/domain/CallSession.js +32 -4
- package/src/domain/Contact.js +1 -1
- package/src/domain/Phone/WebRTCPhone.js +24 -2
- package/src/domain/SFUNotAvailableError.js +7 -0
- package/src/domain/__tests__/CallSession.test.js +17 -0
- package/src/index.js +2 -0
- package/src/lib/WazoSessionDescriptionHandler.js +8 -3
- package/src/simple/Phone.js +2 -1
- package/src/simple/index.js +2 -0
- package/src/utils/api-requester.js +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
21
21
|
## Table of contents
|
|
22
22
|
|
|
23
23
|
* [Install](#install)
|
|
24
|
-
+ [Install / Add](#install
|
|
24
|
+
+ [Install / Add](#install--add)
|
|
25
25
|
+ [Content Delivery Networks](#content-delivery-networks)
|
|
26
26
|
- [UNPKG](#unpkg)
|
|
27
27
|
- [jsDelivr](#jsdelivr)
|
|
@@ -35,26 +35,31 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
35
35
|
- [Setting a callback when a new token is refreshed](#setting-a-callback-when-a-new-token-is-refreshed)
|
|
36
36
|
- [Loggin out](#loggin-out)
|
|
37
37
|
+ [Conference](#conference)
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
38
|
+
- [Joining a room](#joining-a-room)
|
|
39
|
+
- [Sending a chat message in the room](#sending-a-chat-message-in-the-room)
|
|
40
|
+
- [Sending a custom message to all participants](#sending-a-custom-message-to-all-participants)
|
|
41
|
+
- [Sharing the user screen](#sharing-the-user-screen)
|
|
42
|
+
- [Stopping the screen share](#stopping-the-screen-share)
|
|
43
|
+
- [Disabling the camera](#disabling-the-camera)
|
|
44
|
+
- [Enabling the camera](#enabling-the-camera)
|
|
45
|
+
- [Disabling the microphone](#disabling-the-microphone)
|
|
46
|
+
- [Enabling the microphone](#enabling-the-microphone)
|
|
47
|
+
- [Accessing room participants](#accessing-room-participants)
|
|
48
|
+
- [Disconnect from the room](#disconnect-from-the-room)
|
|
49
49
|
+ [Conference events](#conference-events)
|
|
50
|
+
+ [Conference features](#ad-hoc-conference-features)
|
|
51
|
+
- [Merging sessions in one conference](#merging-sessions-in-one-conference)
|
|
52
|
+
- [Add a session to a conference](#add-a-call-to-a-conference)
|
|
53
|
+
- [Remove a session from a conference](#remove-a-call-from-a-conference)
|
|
54
|
+
- [Unmerge a sessions from a conference](#terminating-a-conference)
|
|
50
55
|
+ [Accessing the current WebRtc phone](#accessing-the-current-webrtc-phone)
|
|
51
56
|
+ [Domains](#domains)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
- [Participant](#participant)
|
|
58
|
+
- [Participant events](#participant-events)
|
|
59
|
+
- [Stream](#stream)
|
|
55
60
|
* [Advanced API](#advanced-api)
|
|
56
61
|
+ [Libraries](#libraries)
|
|
57
|
-
- [Require / Import](#require
|
|
62
|
+
- [Require / Import](#require--import)
|
|
58
63
|
- [API Client Library](#api-client-library)
|
|
59
64
|
- [WebRTC Library](#webrtc-library)
|
|
60
65
|
- [WebSocket Library](#websocket-library)
|
|
@@ -62,11 +67,8 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
62
67
|
- [Initialization](#initialization)
|
|
63
68
|
- [When using API Client](#when-using-api-client)
|
|
64
69
|
- [When using WebRTC](#when-using-webrtc)
|
|
65
|
-
- [When using WebSocket](#when-using-websocket)
|
|
66
|
-
* [Opening the socket](#opening-the-socket)
|
|
67
|
-
* [Closing the socket](#closing-the-socket)
|
|
68
70
|
- [Log In](#log-in)
|
|
69
|
-
- [Set token (and refresh token)](#set-token
|
|
71
|
+
- [Set token (and refresh token)](#set-token-and-refresh-token)
|
|
70
72
|
- [Add an event when the token is refreshed](#add-an-event-when-the-token-is-refreshed)
|
|
71
73
|
- [Log Out](#log-out)
|
|
72
74
|
- [Check token](#check-token)
|
|
@@ -82,7 +84,7 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
82
84
|
- [Chatd](#chatd)
|
|
83
85
|
- [Calling an API endpoint without WazoApiClient](#calling-an-api-endpoint-without-wazoapiclient)
|
|
84
86
|
+ [WebRTCClient](#webrtcclient)
|
|
85
|
-
- [WebRTCClient Configuration](#
|
|
87
|
+
- [WebRTCClient Configuration](#webrtcclient-configuration)
|
|
86
88
|
- [Basic client features](#basic-client-features)
|
|
87
89
|
- [Calling a number](#calling-a-number)
|
|
88
90
|
- [Be notified to a phone call](#be-notified-to-a-phone-call)
|
|
@@ -97,11 +99,6 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
97
99
|
- [Sending a DTMF tone](#sending-a-dtmf-tone)
|
|
98
100
|
- [Sending a message](#sending-a-message)
|
|
99
101
|
- [Closing the RTC connection](#closing-the-rtc-connection)
|
|
100
|
-
- [Conference features](#conference-features)
|
|
101
|
-
- [Merging sessions in one conference](#merging-sessions-in-one-conference)
|
|
102
|
-
- [Add a session to a conference](#add-a-session-to-a-conference)
|
|
103
|
-
- [Remove a session from a conference](#remove-a-session-from-a-conference)
|
|
104
|
-
- [Unmerge a sessions from a conference](#unmerge-a-sessions-from-a-conference)
|
|
105
102
|
+ [WebRTCPhone](#webrtcphone)
|
|
106
103
|
- [Basic phone features](#basic-phone-features)
|
|
107
104
|
- [Calling a number](#calling-a-number)
|
|
@@ -121,8 +118,8 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
121
118
|
- [Stop screen sharing](#stop-screen-sharing)
|
|
122
119
|
- [Conference phone features](#conference-phone-features)
|
|
123
120
|
- [Starting a conference](#starting-a-conference)
|
|
124
|
-
- [Adding a participant to the conference](#
|
|
125
|
-
- [Holding a conference](#
|
|
121
|
+
- [Adding a participant to the conference](#adding-a-participant-to-the-conference)
|
|
122
|
+
- [Holding a conference](#holding-a-conference)
|
|
126
123
|
- [Resuming a conference](#resuming-a-conference)
|
|
127
124
|
- [Muting a conference](#muting-a-conference)
|
|
128
125
|
- [Unmuting a conference](#unmuting-a-conference)
|
|
@@ -151,12 +148,16 @@ Wazo's Javascript SDK allows you to use these features :
|
|
|
151
148
|
|
|
152
149
|
## Install
|
|
153
150
|
|
|
154
|
-
### Install / Add
|
|
151
|
+
### Install / Add
|
|
152
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
153
|
+
|
|
155
154
|
You may install the Wazo JavaScript Software Development Kit to your project one of the following ways:
|
|
156
155
|
* `npm install @wazo/sdk`
|
|
157
156
|
* `yarn add @wazo/sdk`
|
|
158
157
|
|
|
159
|
-
### Content Delivery Networks
|
|
158
|
+
### Content Delivery Networks
|
|
159
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
160
|
+
|
|
160
161
|
Alternatively, you may load the Wazo SDK from a CDN. Use one of the following Content Delivery Networks:
|
|
161
162
|
|
|
162
163
|
#### UNPKG
|
|
@@ -426,27 +427,29 @@ Triggered when a participant is talking, or stops talking.
|
|
|
426
427
|
- `participant`: `Wazo.RemoteParticipant` or `Wazo.LocalParticipant`.
|
|
427
428
|
The participant instance, your can access the `participant.isTalking` attribute to know the status.
|
|
428
429
|
|
|
429
|
-
|
|
430
|
-
|
|
430
|
+
### Ad hoc Conference features
|
|
431
|
+
**`Voice`** **`Video`**
|
|
432
|
+
|
|
433
|
+
#### Merging sessions in one conference
|
|
431
434
|
Use this method to merge multiple calls in a new ad hoc conference.
|
|
432
435
|
```js
|
|
433
436
|
const adHocConference = Wazo.Phone.startConference(host: CallSession, otherCalls: CallSession[]): Promise<AdHocAPIConference>;
|
|
434
437
|
```
|
|
435
438
|
|
|
436
|
-
|
|
439
|
+
#### Add a call to a conference
|
|
437
440
|
Use this method to add a single call to an existing conference room.
|
|
438
441
|
```js
|
|
439
442
|
adHocConference.addParticipant(participant: CallSession);
|
|
440
443
|
```
|
|
441
444
|
|
|
442
|
-
|
|
445
|
+
#### Remove a call from a conference
|
|
443
446
|
Use this method to remove a participant from a conference.
|
|
444
447
|
```js
|
|
445
448
|
adHocConference.removeParticipant(callSession: CallSession);
|
|
446
449
|
// shouldHold indicate if the session should be held after removed from session
|
|
447
450
|
```
|
|
448
451
|
|
|
449
|
-
|
|
452
|
+
#### Terminating a conference
|
|
450
453
|
Use this method to remove a single participant from a conference.
|
|
451
454
|
```js
|
|
452
455
|
adHocConference.hangup();
|
|
@@ -593,7 +596,9 @@ Detaches a stream from an existing htmlElement.
|
|
|
593
596
|
## Advanced API
|
|
594
597
|
|
|
595
598
|
### Libraries
|
|
596
|
-
#### Require / Import
|
|
599
|
+
#### Require / Import
|
|
600
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
601
|
+
|
|
597
602
|
Depending on your preference, you may require or add the Wazo SDK to your own client application one of the following ways using:
|
|
598
603
|
|
|
599
604
|
##### API Client Library
|
|
@@ -617,7 +622,8 @@ import { WazoWebSocketClient } from '@wazo/sdk';
|
|
|
617
622
|
```
|
|
618
623
|
|
|
619
624
|
### Authentication
|
|
620
|
-
#### Initialization
|
|
625
|
+
#### Initialization
|
|
626
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
621
627
|
|
|
622
628
|
##### When using API Client
|
|
623
629
|
|
|
@@ -635,7 +641,9 @@ const client = new WazoApiClient({
|
|
|
635
641
|
const session = await client.auth.logIn({ ... });
|
|
636
642
|
```
|
|
637
643
|
|
|
638
|
-
#### Log In
|
|
644
|
+
#### Log In
|
|
645
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
646
|
+
|
|
639
647
|
```js
|
|
640
648
|
client.auth.logIn({
|
|
641
649
|
expiration, // optional integer. Session life in number of seconds. If omitted, defaults to 3600 (an hour).
|
|
@@ -664,12 +672,14 @@ client.auth.logIn({
|
|
|
664
672
|
xivo_user_uuid
|
|
665
673
|
});
|
|
666
674
|
// or
|
|
667
|
-
const { refreshToken, ...result } = await client.auth.
|
|
675
|
+
const { refreshToken, ...result } = await client.auth.logIn(/* ... */);
|
|
668
676
|
```
|
|
669
677
|
|
|
670
678
|
Note: you need to set `clientId` in your WazoAPIClient in order to get a refresh token.
|
|
671
679
|
|
|
672
|
-
#### Set token (and refresh token)
|
|
680
|
+
#### Set token (and refresh token)
|
|
681
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
682
|
+
|
|
673
683
|
```js
|
|
674
684
|
client.setToken(token);
|
|
675
685
|
client.setRefreshToken(refreshToken);
|
|
@@ -678,7 +688,8 @@ client.setRefreshTokenExpiration(tokenExpirationInSeconds);
|
|
|
678
688
|
|
|
679
689
|
Note: you need to set `clientId` in your WazoAPIClient in order to get a refresh token.
|
|
680
690
|
|
|
681
|
-
#### Add an event when the token is refreshed
|
|
691
|
+
#### Add an event when the token is refreshed
|
|
692
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
682
693
|
|
|
683
694
|
```js
|
|
684
695
|
client.setOnRefreshToken((newToken, newSession) => {
|
|
@@ -688,21 +699,27 @@ client.setOnRefreshToken((newToken, newSession) => {
|
|
|
688
699
|
|
|
689
700
|
Note: you need to set `clientId` in your WazoAPIClient in order to refresh token.
|
|
690
701
|
|
|
691
|
-
#### Log Out
|
|
702
|
+
#### Log Out
|
|
703
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
704
|
+
|
|
692
705
|
```js
|
|
693
706
|
client.auth.logOut(token).then(/* ... */);
|
|
694
707
|
// or
|
|
695
708
|
await client.auth.logOut(token);
|
|
696
709
|
```
|
|
697
710
|
|
|
698
|
-
#### Check token
|
|
711
|
+
#### Check token
|
|
712
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
713
|
+
|
|
699
714
|
```
|
|
700
715
|
client.auth.checkToken(token).then(valid);
|
|
701
716
|
// or
|
|
702
717
|
const valid = await client.auth.checkToken(token);
|
|
703
718
|
```
|
|
704
719
|
|
|
705
|
-
#### Other auth methods
|
|
720
|
+
#### Other auth methods
|
|
721
|
+
**`Config`**
|
|
722
|
+
|
|
706
723
|
```js
|
|
707
724
|
client.auth.listTenants();
|
|
708
725
|
client.auth.createTenant(name);
|
|
@@ -719,7 +736,8 @@ client.auth.listPolicies();
|
|
|
719
736
|
|
|
720
737
|
### Sending logs to fluentd via a http endpoint
|
|
721
738
|
|
|
722
|
-
#### Logger
|
|
739
|
+
#### Logger
|
|
740
|
+
**`Log`**
|
|
723
741
|
|
|
724
742
|
```
|
|
725
743
|
import Wazo from '@wazo/sdk/lib/simple';
|
|
@@ -748,7 +766,9 @@ Wazo.IssueReporter.log(Wazo.IssueReporter.INFO, 'my log');
|
|
|
748
766
|
```
|
|
749
767
|
|
|
750
768
|
### Interact with the engine
|
|
751
|
-
#### Applicationd
|
|
769
|
+
#### Applicationd
|
|
770
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`**
|
|
771
|
+
|
|
752
772
|
Use Applicationd to construct your own communication features.
|
|
753
773
|
|
|
754
774
|
```js
|
|
@@ -762,7 +782,9 @@ client.application.addCallNodes(applicationUuid, nodeUuid, callId); // add call
|
|
|
762
782
|
client.application.playCall(applicationUuid, callId, language, uri); // play a sound into a call
|
|
763
783
|
```
|
|
764
784
|
|
|
765
|
-
#### Calld
|
|
785
|
+
#### Calld
|
|
786
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`**
|
|
787
|
+
|
|
766
788
|
Use Calld to directly control interactions.
|
|
767
789
|
(Please note, ctidNg endpoint is deprecated but continue to work with old version. **Please update your code**.)
|
|
768
790
|
|
|
@@ -788,7 +810,9 @@ client.calld.relocateCall(callId, destination, lineId);
|
|
|
788
810
|
client.calld.updatePresence(presence);
|
|
789
811
|
```
|
|
790
812
|
|
|
791
|
-
#### Confd
|
|
813
|
+
#### Confd
|
|
814
|
+
**`Config`**
|
|
815
|
+
|
|
792
816
|
Use Confd to interact with configurations.
|
|
793
817
|
```js
|
|
794
818
|
client.confd.listUsers();
|
|
@@ -797,7 +821,9 @@ client.confd.getUserLineSip(userUuid, lineId);
|
|
|
797
821
|
client.confd.listApplications();
|
|
798
822
|
```
|
|
799
823
|
|
|
800
|
-
#### Dird
|
|
824
|
+
#### Dird
|
|
825
|
+
**`Misc`**
|
|
826
|
+
|
|
801
827
|
Use Dird to interact with directories.
|
|
802
828
|
```js
|
|
803
829
|
client.dird.search(context, term);
|
|
@@ -810,7 +836,9 @@ client.dird.markAsFavorite(source, sourceId);
|
|
|
810
836
|
client.dird.removeFavorite(source, sourceId);
|
|
811
837
|
```
|
|
812
838
|
|
|
813
|
-
#### Agentd
|
|
839
|
+
#### Agentd
|
|
840
|
+
**`Misc`**
|
|
841
|
+
|
|
814
842
|
Use Agentd to handle agent states
|
|
815
843
|
|
|
816
844
|
Legacy (all versions)
|
|
@@ -833,7 +861,9 @@ client.agentd.staticPause();
|
|
|
833
861
|
client.agentd.staticResume();
|
|
834
862
|
```
|
|
835
863
|
|
|
836
|
-
#### callLogd
|
|
864
|
+
#### callLogd
|
|
865
|
+
**`Voice`** **`Misc`**
|
|
866
|
+
|
|
837
867
|
Use callLogd to interact with call logs.
|
|
838
868
|
```js
|
|
839
869
|
client.callLogd.search(search, limit);
|
|
@@ -841,7 +871,9 @@ client.callLogd.listCallLogs(offset, limit);
|
|
|
841
871
|
client.callLogd.listCallLogsFromDate(from, number);
|
|
842
872
|
```
|
|
843
873
|
|
|
844
|
-
#### Chatd
|
|
874
|
+
#### Chatd
|
|
875
|
+
**`Chat`** **`Status`**
|
|
876
|
+
|
|
845
877
|
Use chatd to send and retrieve chat messages and user statuses.
|
|
846
878
|
```js
|
|
847
879
|
client.chatd.getContactStatusInfo(contactUuid: UUID);
|
|
@@ -857,7 +889,8 @@ client.chatd.sendRoomMessage(roomUuid: string, message: ChatMessage);
|
|
|
857
889
|
client.chatd.getMessages(options: GetMessagesOptions);
|
|
858
890
|
```
|
|
859
891
|
|
|
860
|
-
#### Calling an API endpoint without WazoApiClient
|
|
892
|
+
#### Calling an API endpoint without WazoApiClient
|
|
893
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`** **`Config`** **`Misc`**
|
|
861
894
|
|
|
862
895
|
Use this generic method to request endpoints directly.
|
|
863
896
|
|
|
@@ -946,7 +979,8 @@ const uaConfigOverrides = {
|
|
|
946
979
|
const client = new WazoWebRTCClient(config, session, /* optional */ uaConfigOverrides);
|
|
947
980
|
```
|
|
948
981
|
|
|
949
|
-
#### Basic client features
|
|
982
|
+
#### Basic client features
|
|
983
|
+
**`Voice`** **`Video`** **`Chat`**
|
|
950
984
|
|
|
951
985
|
##### Calling a number
|
|
952
986
|
Use this method to dial a number.
|
|
@@ -1080,7 +1114,8 @@ const phone = new WebRTCPhone(
|
|
|
1080
1114
|
);
|
|
1081
1115
|
```
|
|
1082
1116
|
|
|
1083
|
-
#### Basic phone features
|
|
1117
|
+
#### Basic phone features
|
|
1118
|
+
**`Voice`** **`Video`** **`Chat`**
|
|
1084
1119
|
|
|
1085
1120
|
##### Calling a number
|
|
1086
1121
|
Use this method to dial a number.
|
|
@@ -1212,7 +1247,8 @@ const screenShareStream: MediaStream = await phone.startScreenSharing({
|
|
|
1212
1247
|
phone.stopScreenSharing();
|
|
1213
1248
|
```
|
|
1214
1249
|
|
|
1215
|
-
#### Conference phone features
|
|
1250
|
+
#### Conference phone features
|
|
1251
|
+
**`Voice`** **`Video`** **`Chat`**
|
|
1216
1252
|
|
|
1217
1253
|
##### Starting a conference
|
|
1218
1254
|
Use this method to start an ad-hoc conference.
|
|
@@ -1263,7 +1299,8 @@ phone.removeFromConference(participants: CallSession[]);
|
|
|
1263
1299
|
phone.hangupConference(participants: CallSession[]);
|
|
1264
1300
|
```
|
|
1265
1301
|
|
|
1266
|
-
#### Advanced phone features
|
|
1302
|
+
#### Advanced phone features
|
|
1303
|
+
**`Voice`** **`Video`** **`Chat`**
|
|
1267
1304
|
|
|
1268
1305
|
##### Registering the phone
|
|
1269
1306
|
Sends a SIP `REGISTER` payload
|
|
@@ -1354,7 +1391,8 @@ phone.stopHeartbeat();
|
|
|
1354
1391
|
### Wazo WebSocket
|
|
1355
1392
|
You can use the Wazo WebSocket to listen for real time events (eg: receiving a chat message, a presential update ...)
|
|
1356
1393
|
|
|
1357
|
-
#### Web Socket features
|
|
1394
|
+
#### Web Socket features
|
|
1395
|
+
**`Voice`** **`Video`** **`Chat`** **`Fax`** **`Status`**
|
|
1358
1396
|
|
|
1359
1397
|
##### Opening the socket
|
|
1360
1398
|
```js
|