@babblevoice/babble-drachtio-callmanager 2.0.2 → 2.1.0
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/.eslintrc.js +67 -0
- package/index.js +3 -4
- package/lib/call.js +710 -650
- package/lib/callmanager.js +4 -4
- package/lib/sdp.js +78 -46
- package/lib/store.js +91 -41
- package/package.json +7 -3
- package/test/interface/call.js +131 -131
- package/test/interface/callmanager.js +12 -12
- package/test/interface/callsdp.js +6 -6
- package/test/interface/early.js +72 -73
- package/test/interface/events.js +10 -10
- package/test/interface/hold.js +15 -15
- package/test/interface/latecall.js +8 -8
- package/test/interface/sdp.js +323 -47
- package/test/interface/xfer.js +47 -56
- package/test/mock/srf.js +2 -2
- package/test/interface/serverconnect.js +0 -79
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": false,
|
|
4
|
+
"node": true,
|
|
5
|
+
"mocha": true,
|
|
6
|
+
"commonjs": true,
|
|
7
|
+
"es2021": true
|
|
8
|
+
},
|
|
9
|
+
"extends": [ "plugin:promise/recommended", "eslint:recommended" ],
|
|
10
|
+
"overrides": [
|
|
11
|
+
],
|
|
12
|
+
"parserOptions": {
|
|
13
|
+
"ecmaVersion": "latest"
|
|
14
|
+
},
|
|
15
|
+
"ignorePatterns": [ "out" ],
|
|
16
|
+
"rules": {
|
|
17
|
+
"require-atomic-updates": [
|
|
18
|
+
"error"
|
|
19
|
+
],
|
|
20
|
+
"no-invalid-this": [
|
|
21
|
+
"error"
|
|
22
|
+
],
|
|
23
|
+
"no-useless-call": [
|
|
24
|
+
"error"
|
|
25
|
+
],
|
|
26
|
+
"no-useless-return": [
|
|
27
|
+
"error"
|
|
28
|
+
],
|
|
29
|
+
"no-var": [
|
|
30
|
+
"error"
|
|
31
|
+
],
|
|
32
|
+
"prefer-const": [
|
|
33
|
+
"error"
|
|
34
|
+
],
|
|
35
|
+
"complexity": [
|
|
36
|
+
"error",
|
|
37
|
+
10
|
|
38
|
+
],
|
|
39
|
+
"max-depth": [
|
|
40
|
+
"error",
|
|
41
|
+
5
|
|
42
|
+
],
|
|
43
|
+
"no-eval": [
|
|
44
|
+
"error"
|
|
45
|
+
],
|
|
46
|
+
"indent": [
|
|
47
|
+
"error",
|
|
48
|
+
2
|
|
49
|
+
],
|
|
50
|
+
"linebreak-style": [
|
|
51
|
+
"error",
|
|
52
|
+
"unix"
|
|
53
|
+
],
|
|
54
|
+
"quotes": [
|
|
55
|
+
"error",
|
|
56
|
+
"double"
|
|
57
|
+
],
|
|
58
|
+
"semi": [
|
|
59
|
+
"error",
|
|
60
|
+
"never"
|
|
61
|
+
],
|
|
62
|
+
"yoda": [
|
|
63
|
+
"error",
|
|
64
|
+
"always"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
package/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
const assert = require( "assert" )
|
|
3
2
|
const callmanager = require( "./lib/callmanager.js" )
|
|
4
3
|
const store = require( "./lib/store.js" )
|
|
5
4
|
|
|
@@ -9,7 +8,7 @@ const default_options = {
|
|
|
9
8
|
"preferedcodecs": "g722 ilbc pcmu pcma",
|
|
10
9
|
//"transcode": true, - this never made it into the software - TODO
|
|
11
10
|
"uactimeout": 30000, /* timeout when calling a client */
|
|
12
|
-
"seexpire": 120000, /* session expires timeout */
|
|
11
|
+
"seexpire": 120000, /* session expires timeout mS */
|
|
13
12
|
"rfc2833": true, /* Enable RFC 2833 - DTMF */
|
|
14
13
|
"late": false, /* Late negotiation */
|
|
15
14
|
"registrar": false, /* our registrar object or falsey */
|
|
@@ -21,7 +20,7 @@ const default_options = {
|
|
|
21
20
|
@returns { callmanager }
|
|
22
21
|
*/
|
|
23
22
|
module.exports.callmanager = ( options ) => {
|
|
24
|
-
|
|
23
|
+
const ouroptions = { ...default_options, ...options }
|
|
25
24
|
return callmanager.callmanager( ouroptions )
|
|
26
25
|
}
|
|
27
26
|
|
|
@@ -43,4 +42,4 @@ module.exports.store = store
|
|
|
43
42
|
/**
|
|
44
43
|
* Call
|
|
45
44
|
*/
|
|
46
|
-
|
|
45
|
+
module.exports.call = callmanager.call
|