@voicenter-team/opensips-js 1.0.89 → 1.0.91

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 CHANGED
@@ -1,13 +1,21 @@
1
+ ---
2
+ title: Getting started
3
+ description: The Opensips JS library and its expansive ecosystem offer developers a powerful and flexible solution for integrating Opensips protocol functionalities into a multitude of applications.
4
+ navigation:
5
+ title: Getting Started
6
+ ---
7
+
1
8
  # Getting started
9
+
2
10
  ## Installation
3
11
  Using npm:
4
- ```shell
12
+ ```shell[Terminal]
5
13
  $ npm i @voicenter-team/opensips-js
6
14
  ```
7
15
 
8
16
  ## Usage
9
17
  Firstly lets import the library and create the OpenSIPS instance:
10
- ```javascript
18
+ ```javascript [file.js]
11
19
  import OpenSIPSJS from '@voicenter-team/opensips-js'
12
20
 
13
21
  const openSIPSJS = new OpenSIPSJS({
@@ -36,13 +44,13 @@ const openSIPSJS = new OpenSIPSJS({
36
44
  ```
37
45
 
38
46
  Then you can work with appropriate modules:
39
- ```javascript
47
+ ```javascript [file.js]
40
48
  openSIPSJS.audio
41
49
  openSIPSJS.video
42
50
  openSIPSJS.msrp
43
51
  ```
44
52
 
45
- # OpensipsJS
53
+ ## OpensipsJS
46
54
  ### OpensipsJS instance methods
47
55
  - `begin(): OpensipsInstance` - start opensips
48
56
  - `on(event: OpensipsEvent, callback): void` - remove event listener
@@ -87,7 +95,7 @@ Also, there are next public fields on OpensipsJS instance:
87
95
  ### OpensipsJS instance fields
88
96
  - `sipDomain: String` - returns sip domain
89
97
 
90
- # Audio
98
+ ## Audio
91
99
 
92
100
  ### Audio methods
93
101
  - `initCall(target: String, addToCurrentRoom: Boolean): void` - call to the target. If addToCurrentRoom is true then the call will be added to the user's current room
@@ -124,7 +132,7 @@ Also, there are next public fields on OpensipsJS instance:
124
132
  - `isDND: Boolean` - returns if the agent is in "Do not disturb" status
125
133
  - `isMuted: Boolean` - returns if the agent is muted
126
134
 
127
- # MSRP
135
+ ## MSRP
128
136
 
129
137
  ### MSRP methods
130
138
  - `initMSRP(target: String, body: String): void` - initialize connection with target contact. Body is the initial message to this target.
@@ -136,7 +144,7 @@ Also, there are next public fields on OpensipsJS instance:
136
144
  - `getActiveMessages: { [key: string]: IMessage }` - returns an object of active message sessions where key is session id and value is message session data.
137
145
 
138
146
 
139
- # Video
147
+ ## Video
140
148
 
141
149
  ### Video methods
142
150
  - `joinRoom(roomId: String, displayName: String, mediaConstraints: Object): void` - join conference room