sip-lab 1.12.24 → 1.12.26

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.
Files changed (45) hide show
  1. package/README.md +6 -21
  2. package/{install.sh → build_deps.sh} +1 -6
  3. package/index.js +1 -1
  4. package/package.json +16 -5
  5. package/prebuilds/linux-x64/node.abi102.node +0 -0
  6. package/prebuilds/linux-x64/node.abi108.node +0 -0
  7. package/prebuilds/linux-x64/node.abi88.node +0 -0
  8. package/prebuilds/linux-x64/node.abi93.node +0 -0
  9. package/DEV.md +0 -35
  10. package/binding.gyp +0 -110
  11. package/devjournal +0 -449
  12. package/include/siplab_constants.h +0 -6
  13. package/runtests +0 -15
  14. package/src/Makefile +0 -42
  15. package/src/addon.cpp +0 -1094
  16. package/src/event_templates.cpp +0 -62
  17. package/src/event_templates.hpp +0 -29
  18. package/src/idmanager.cpp +0 -76
  19. package/src/idmanager.hpp +0 -26
  20. package/src/log.cpp +0 -18
  21. package/src/log.hpp +0 -15
  22. package/src/packetdumper.cpp +0 -234
  23. package/src/packetdumper.hpp +0 -67
  24. package/src/pjmedia/Makefile +0 -39
  25. package/src/pjmedia/devjournal +0 -26
  26. package/src/pjmedia/include/chainlink/README +0 -3
  27. package/src/pjmedia/include/chainlink/chainlink.h +0 -11
  28. package/src/pjmedia/include/chainlink/chainlink_dtmfdet.h +0 -56
  29. package/src/pjmedia/include/chainlink/chainlink_fax.h +0 -25
  30. package/src/pjmedia/include/chainlink/chainlink_tonegen.h +0 -178
  31. package/src/pjmedia/include/chainlink/chainlink_wav_port.h +0 -231
  32. package/src/pjmedia/include/chainlink/chainlink_wire_port.h +0 -50
  33. package/src/pjmedia/include/pjmedia/README +0 -3
  34. package/src/pjmedia/include/pjmedia/dtmfdet.h +0 -74
  35. package/src/pjmedia/src/chainlink/chainlink_dtmfdet.c +0 -125
  36. package/src/pjmedia/src/chainlink/chainlink_fax.c +0 -280
  37. package/src/pjmedia/src/chainlink/chainlink_tonegen.c +0 -901
  38. package/src/pjmedia/src/chainlink/chainlink_wav_player.c +0 -688
  39. package/src/pjmedia/src/chainlink/chainlink_wav_writer.c +0 -442
  40. package/src/pjmedia/src/chainlink/chainlink_wire_port.c +0 -93
  41. package/src/pjmedia/src/pjmedia/dtmfdet.c +0 -129
  42. package/src/pjmedia/src/pjmedia/simpleua_dtmfdet.c +0 -753
  43. package/src/pjmedia/src/pjmedia/tonegen_dtmfdet.c +0 -263
  44. package/src/sip.cpp +0 -5975
  45. package/src/sip.hpp +0 -107
package/README.md CHANGED
@@ -18,6 +18,9 @@ TODO:
18
18
 
19
19
  ### Installation
20
20
 
21
+ This is an node.js addon and it is known to work on Ubuntu 18.04, Ubuntu 20.04, Debian 10 and Debian 11 (it is known to not work on Debian 8 unless you build the addon yourself).
22
+ It is discributed with prebuild binaries for node.js 15.0.0 and above (it is possible to use older versions of node but you will need to build the addon yourself).
23
+
21
24
  This will require you to have some libraries installed. So do:
22
25
  ```
23
26
  apt install build-essential automake autoconf libtool libspeex-dev libopus-dev libsdl2-dev libavdevice-dev libswscale-dev libv4l-dev libopencore-amrnb-dev libopencore-amrwb-dev libvo-amrwbenc-dev libopus-dev libsdl2-dev libopencore-amrnb-dev libopencore-amrwb-dev libvo-amrwbenc-dev libboost-dev libtiff-dev libpcap-dev libssl-dev uuid-dev
@@ -28,23 +31,12 @@ Then install sip-lab by doing:
28
31
  npm install sip-lab
29
32
  ```
30
33
 
31
- Be patient because we will need to download pjproject and build it.
32
-
33
- We will also download and build spandsp, bcg729 and rapidjson.
34
-
35
- However since it takes several minutes to build this module, you can install it globally:
34
+ To test from within this repo you will need to download and build dependencies. Do:
36
35
  ```
37
- npm install -g sip-lab
36
+ ./build_deps.sh
38
37
  ```
39
-
40
- But if you do so, you will need to set NODE_PATH for node to find it by doing:
41
- ```
42
- export NODE_PATH=$(npm root --quiet -g)
38
+ Then build the node addon by doing:
43
39
  ```
44
-
45
- To test from within this repo just build and install by doing:
46
- ```
47
- npm install -g node-gyp
48
40
  npm install
49
41
  ```
50
42
  And run some sample script from subfolder samples:
@@ -54,13 +46,6 @@ And run some sample script from subfolder samples:
54
46
  The above script has detailed comments.
55
47
  Please read it to undestand how to write your own test scripts.
56
48
 
57
- The module is known to work properly in Ubuntu 18.04.4, Ubuntu 20.04.4, Debian 8 and Debian 10 (and it is expected to work in Debian 9).
58
-
59
- It was originally developed with node v.10 and tested with v.12 and v16.13.1 and it is expected to work with latest versions of node.
60
-
61
- (it is known to not work with node v.8)
62
-
63
-
64
49
  ### About the code
65
50
 
66
51
  Although the code in written in *.cpp/*.hpp named files, this is not actually a C++ project.
@@ -69,9 +69,4 @@ EOF
69
69
  fi
70
70
 
71
71
 
72
-
73
- cd $START_DIR
74
-
75
- node-gyp configure
76
-
77
- node-gyp build
72
+ echo "Build of dependencies successful"
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const addon = require('./build/Release/addon.node');
1
+ const addon = require('node-gyp-build')(__dirname);
2
2
 
3
3
  var events = require('events');
4
4
  var eventEmitter = new events.EventEmitter();
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "sip-lab",
3
- "version": "1.12.24",
3
+ "version": "1.12.26",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "engines": {
7
7
  "node": ">=10.22"
8
8
  },
9
9
  "scripts": {
10
- "install": "./install.sh",
10
+ "install": "node-gyp-build",
11
11
  "test": "./runtests"
12
12
  },
13
13
  "repository": {
@@ -19,9 +19,20 @@
19
19
  "gypfile": true,
20
20
  "homepage": "https://github.com/MayamaTakeshi/sip-lab",
21
21
  "dependencies": {
22
- "node-addon-api": "^1.7.2",
23
- "node-gyp": "^8.4.1",
24
22
  "@mayama/zeq": "^4.1.14",
23
+ "node-addon-api": "^5.0.0",
24
+ "node-gyp": "^9.1.0",
25
+ "node-gyp-build": "^4.5.0",
25
26
  "sip-matching": "^1.3.32"
26
- }
27
+ },
28
+ "devDependencies": {
29
+ "prebuildify": "^5.0.1"
30
+ },
31
+ "files": [
32
+ "index.js",
33
+ "bindings.gyp",
34
+ "build_deps.sh",
35
+ "samples",
36
+ "prebuilds"
37
+ ]
27
38
  }
package/DEV.md DELETED
@@ -1,35 +0,0 @@
1
- ### For devs
2
-
3
- We build and statically link to libs pjproject, spandsp, bgc729 and rapidjson.
4
-
5
- Basic tasks for development:
6
-
7
- #### To build
8
- ```
9
- npm install
10
- ```
11
-
12
- #### To clean up (for a clean rebuild)
13
- ```
14
- npx node-gyp clean
15
- ```
16
-
17
- #### To update pjproject, spandsp, bcg729 or rapidjson
18
- Just delete the corresponding library subfolder in subfolder 3drParty.
19
-
20
-
21
- Then temporarily change install.sh to not checkout a specific version (or checkout a desired commit)
22
-
23
- Then run
24
- ```
25
- npm install
26
- ```
27
-
28
- Then perform code changes and tests. When you are satisfied with them, update install.sh with the new commit id.
29
-
30
-
31
- #### Running tests
32
- ```
33
- npm test
34
- ```
35
-
package/binding.gyp DELETED
@@ -1,110 +0,0 @@
1
- {
2
- 'targets': [
3
- {
4
- 'target_name': 'addon',
5
- 'sources': [
6
- 'src/log.cpp',
7
- 'src/event_templates.cpp',
8
- 'src/idmanager.cpp',
9
- 'src/packetdumper.cpp',
10
- 'src/sip.cpp',
11
- 'src/addon.cpp',
12
- 'src/pjmedia/src/chainlink/chainlink_dtmfdet.c',
13
- 'src/pjmedia/src/chainlink/chainlink_tonegen.c',
14
- 'src/pjmedia/src/chainlink/chainlink_wav_player.c',
15
- 'src/pjmedia/src/chainlink/chainlink_wav_writer.c',
16
- 'src/pjmedia/src/chainlink/chainlink_wire_port.c',
17
- 'src/pjmedia/src/chainlink/chainlink_fax.c',
18
- ],
19
- 'include_dirs': [
20
- "3rdParty/pjproject/pjsip/include",
21
- "3rdParty/pjproject/pjlib/include",
22
- "3rdParty/pjproject/pjlib-util/include",
23
- "3rdParty/pjproject/pjnath/include",
24
- "3rdParty/pjproject/pjmedia/include",
25
- "include",
26
- "src",
27
- "src/pjmedia/include",
28
- "src/pjmedia/include/pjmedia",
29
- "src/pjmedia/include/chainlink",
30
- "3rdParty/rapidjson/include",
31
- "3rdParty/spandsp/src",
32
- "<!@(node -p \"require('node-addon-api').include\")",
33
- ],
34
- "dependencies": [
35
- "<!@(node -p \"require('node-addon-api').gyp\")"
36
- ],
37
- 'conditions': [
38
- [ 'OS!="win"', {
39
- 'cflags_cc': [
40
- '-g',
41
- '-fexceptions',
42
- '-Wno-maybe-uninitialized',
43
- '-fPIC',
44
- ],
45
- 'ldflags_cc': [
46
- '-all-static',
47
- ]
48
- }
49
- ]
50
- ],
51
- 'link_settings': {
52
- 'libraries': [
53
- '-L ../3rdParty/pjproject/pjnath/lib',
54
- '-L ../3rdParty/pjproject/pjlib/lib',
55
- '-L ../3rdParty/pjproject/pjlib-util/lib',
56
- '-L ../3rdParty/pjproject/third_party/lib',
57
- '-L ../3rdParty/pjproject/pjmedia/lib',
58
- '-L ../3rdParty/pjproject/pjsip/lib',
59
- '-L ../3rdParty/pjproject/third_party/lib',
60
- '-l pjnath-x86_64-unknown-linux-gnu',
61
- '-l ilbccodec-x86_64-unknown-linux-gnu',
62
- '-l srtp-x86_64-unknown-linux-gnu',
63
- '-l webrtc-x86_64-unknown-linux-gnu',
64
- '-l yuv-x86_64-unknown-linux-gnu',
65
- '-l speex-x86_64-unknown-linux-gnu',
66
- '-l gsmcodec-x86_64-unknown-linux-gnu',
67
- '-l g7221codec-x86_64-unknown-linux-gnu',
68
- '-l resample-x86_64-unknown-linux-gnu',
69
- '-l pjmedia-audiodev-x86_64-unknown-linux-gnu',
70
- '-l pjmedia-codec-x86_64-unknown-linux-gnu',
71
- '-l pjmedia-videodev-x86_64-unknown-linux-gnu',
72
- '-l pjmedia-x86_64-unknown-linux-gnu',
73
- '-l pjsdp-x86_64-unknown-linux-gnu',
74
- '-l pjsip-x86_64-unknown-linux-gnu',
75
- '-l pjsua2-x86_64-unknown-linux-gnu',
76
- '-l pjsip-ua-x86_64-unknown-linux-gnu',
77
- '-l pjsip-simple-x86_64-unknown-linux-gnu',
78
- '-l pjsua-x86_64-unknown-linux-gnu',
79
- '-l pj-x86_64-unknown-linux-gnu',
80
- '-l pjlib-util-x86_64-unknown-linux-gnu',
81
- '../3rdParty/spandsp/src/.libs/libspandsp.a',
82
- '../3rdParty/bcg729/src/libbcg729.a',
83
- '-lstdc++',
84
- '-lopus',
85
- '-lssl',
86
- '-lcrypto',
87
- '-luuid',
88
- '-lm',
89
- '-ldl',
90
- '-ltiff',
91
- '-lpcap',
92
- '-lrt',
93
- '-lpthread',
94
- '-lasound',
95
- '-lSDL2',
96
- '-lavdevice',
97
- '-lavformat',
98
- '-lavcodec',
99
- '-lswscale',
100
- '-lavutil',
101
- '-lv4l2',
102
- '-lopencore-amrnb',
103
- '-lopencore-amrwb',
104
- '-lvo-amrwbenc',
105
- '-lspeex',
106
- ],
107
- },
108
- },
109
- ]
110
- }