opensips-js 0.1.12 → 0.1.13
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 +37 -21
- package/dist/opensips-js.cjs.js +138 -138
- package/dist/opensips-js.es.js +834 -835
- package/dist/opensips-js.iife.js +78 -78
- package/dist/opensips-js.umd.js +78 -78
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,27 +119,33 @@ If you prefer using ES modules in the browser and your environment supports them
|
|
|
119
119
|
import OpensipsJS from 'https://cdn.opensipsjs.org/opensipsjs/v0.1.1/opensips-js.es.js';\
|
|
120
120
|
|
|
121
121
|
const opensipsJS = new OpensipsJS({
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
122
|
+
configuration: {
|
|
123
|
+
session_timers: false,
|
|
124
|
+
noiseReductionOptions: {
|
|
125
|
+
mode: 'dynamic',
|
|
126
|
+
noiseThreshold: 0.004
|
|
127
|
+
checkEveryMs: 500
|
|
128
|
+
noiseCheckInterval: 2000
|
|
129
|
+
},
|
|
130
|
+
uri: 'sip:extension_user@domain',
|
|
131
|
+
// --- Use password or authorization_jwt to authorize
|
|
132
|
+
password: 'password',
|
|
133
|
+
// or
|
|
134
|
+
authorization_jwt: 'token',
|
|
135
|
+
},
|
|
136
|
+
socketInterfaces: ['wss://domain'],
|
|
137
|
+
pnExtraHeaders: {
|
|
138
|
+
'pn-provider': 'acme',
|
|
139
|
+
'pn-param': 'acme-param',
|
|
140
|
+
'pn-prid': 'ZH11Y4ZDJlMNzODE1NgKi0K>',
|
|
141
|
+
},
|
|
142
|
+
sipDomain: 'domain',
|
|
143
|
+
sipOptions: {
|
|
144
|
+
session_timers: false,
|
|
145
|
+
extraHeaders: ['X-Bar: bar'],
|
|
146
|
+
pcConfig: {},
|
|
147
|
+
},
|
|
148
|
+
modules: ['audio', 'video', 'msrp'],
|
|
143
149
|
});
|
|
144
150
|
|
|
145
151
|
// Use the modules as before
|
|
@@ -237,6 +243,16 @@ Also, there are next public fields on OpensipsJS instance:
|
|
|
237
243
|
- `isDND: Boolean` - returns if the agent is in "Do not disturb" status
|
|
238
244
|
- `isMuted: Boolean` - returns if the agent is muted
|
|
239
245
|
|
|
246
|
+
### Noise Reduction Options
|
|
247
|
+
|
|
248
|
+
| Parameter | Type | Default | Description |
|
|
249
|
+
|----------------------|----------------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
250
|
+
| `mode` | `disabled \| enabled \| dynamic` | `disabled` | Noice reduction mode |
|
|
251
|
+
| `vadConfig` | `Partial<RealTimeVADOptions>` | `{}` | VAD configuration |
|
|
252
|
+
| `noiseThreshold` | `number` | `0.004` | Noise threshold |
|
|
253
|
+
| `noiseCheckInterval` | `number` | `2000` | The interval, used to check if we need to disable/enable outgoing audio every N-milliseconds |
|
|
254
|
+
| `checkEveryMs` | `number` | `500` | The interval, used inside noiseCheckInterval loop, checks current noise state every N-milliseconds, to define the average noise level. Then on every noiseCheckInterval iteration, the values getting on checkEveryMs will be summed, then divided by it's number and compared to noiseThreshold |
|
|
255
|
+
|
|
240
256
|
## MSRP
|
|
241
257
|
|
|
242
258
|
### MSRP methods
|