sip-lab 1.12.25 → 1.12.28

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
@@ -18,33 +18,31 @@ TODO:
18
18
 
19
19
  ### Installation
20
20
 
21
- This will require you to have some libraries installed. So do:
22
- ```
23
- 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
24
- ```
21
+ This is an node.js addon and it is known to work on Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Debian 10 and Debian 11 (it is known to not work on Debian 8 unless the app is built locally).
22
+ It is distributed with prebuild binaries for node.js 15.0.0 and above.
25
23
 
26
- Then install sip-lab by doing:
24
+ To install it, just do:
27
25
  ```
28
26
  npm install sip-lab
29
27
  ```
30
28
 
31
- Be patient because we will need to download pjproject and build it.
29
+ If a prebuilt binary is not available, npm will try to build the addon.
32
30
 
33
- We will also download and build spandsp, bcg729 and rapidjson.
31
+ This might fail if you don't have the required tools and libraries.
34
32
 
35
- However since it takes several minutes to build this module, you can install it globally:
33
+ If this happens try installing them by doing:
36
34
  ```
37
- npm install -g sip-lab
35
+ 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 cmake
38
36
  ```
39
37
 
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)
43
38
  ```
44
39
 
45
- To test from within this repo just build and install by doing:
40
+ To test from within this repo you will need to download and build dependencies. Do:
41
+ ```
42
+ ./build_deps.sh
43
+ ```
44
+ Then build the node addon by doing:
46
45
  ```
47
- npm install -g node-gyp
48
46
  npm install
49
47
  ```
50
48
  And run some sample script from subfolder samples:
@@ -54,13 +52,6 @@ And run some sample script from subfolder samples:
54
52
  The above script has detailed comments.
55
53
  Please read it to undestand how to write your own test scripts.
56
54
 
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
55
  ### About the code
65
56
 
66
57
  Although the code in written in *.cpp/*.hpp named files, this is not actually a C++ project.
package/binding.gyp ADDED
@@ -0,0 +1,117 @@
1
+ {
2
+ 'targets': [
3
+ {
4
+ 'target_name': 'addon',
5
+ 'actions': [
6
+ {
7
+ 'action_name': 'build_deps',
8
+ 'message': 'executing build_deps.sh',
9
+ 'inputs': [],
10
+ 'outputs': ['./3rdParty'],
11
+ 'action': ['./build_deps.sh'],
12
+ },
13
+ ],
14
+ 'sources': [
15
+ 'src/log.cpp',
16
+ 'src/event_templates.cpp',
17
+ 'src/idmanager.cpp',
18
+ 'src/sip.cpp',
19
+ 'src/addon.cpp',
20
+ 'src/pjmedia/src/chainlink/chainlink_dtmfdet.c',
21
+ 'src/pjmedia/src/chainlink/chainlink_tonegen.c',
22
+ 'src/pjmedia/src/chainlink/chainlink_wav_player.c',
23
+ 'src/pjmedia/src/chainlink/chainlink_wav_writer.c',
24
+ 'src/pjmedia/src/chainlink/chainlink_wire_port.c',
25
+ 'src/pjmedia/src/chainlink/chainlink_fax.c',
26
+ ],
27
+ 'include_dirs': [
28
+ "3rdParty/pjproject/pjsip/include",
29
+ "3rdParty/pjproject/pjlib/include",
30
+ "3rdParty/pjproject/pjlib-util/include",
31
+ "3rdParty/pjproject/pjnath/include",
32
+ "3rdParty/pjproject/pjmedia/include",
33
+ "include",
34
+ "src",
35
+ "src/pjmedia/include",
36
+ "src/pjmedia/include/pjmedia",
37
+ "src/pjmedia/include/chainlink",
38
+ "3rdParty/rapidjson/include",
39
+ "3rdParty/spandsp/src",
40
+ "<!@(node -p \"require('node-addon-api').include\")",
41
+ ],
42
+ "dependencies": [
43
+ "<!@(node -p \"require('node-addon-api').gyp\")"
44
+ ],
45
+ 'conditions': [
46
+ [ 'OS!="win"', {
47
+ 'cflags_cc': [
48
+ '-g',
49
+ '-fexceptions',
50
+ '-Wno-maybe-uninitialized',
51
+ '-fPIC',
52
+ ],
53
+ 'ldflags_cc': [
54
+ '-all-static',
55
+ ]
56
+ }
57
+ ]
58
+ ],
59
+ 'link_settings': {
60
+ 'libraries': [
61
+ '-L ../3rdParty/pjproject/pjnath/lib',
62
+ '-L ../3rdParty/pjproject/pjlib/lib',
63
+ '-L ../3rdParty/pjproject/pjlib-util/lib',
64
+ '-L ../3rdParty/pjproject/third_party/lib',
65
+ '-L ../3rdParty/pjproject/pjmedia/lib',
66
+ '-L ../3rdParty/pjproject/pjsip/lib',
67
+ '-L ../3rdParty/pjproject/third_party/lib',
68
+ '-l pjnath-x86_64-unknown-linux-gnu',
69
+ '-l ilbccodec-x86_64-unknown-linux-gnu',
70
+ '-l srtp-x86_64-unknown-linux-gnu',
71
+ '-l webrtc-x86_64-unknown-linux-gnu',
72
+ '-l yuv-x86_64-unknown-linux-gnu',
73
+ '-l speex-x86_64-unknown-linux-gnu',
74
+ '-l gsmcodec-x86_64-unknown-linux-gnu',
75
+ '-l g7221codec-x86_64-unknown-linux-gnu',
76
+ '-l resample-x86_64-unknown-linux-gnu',
77
+ '-l pjmedia-audiodev-x86_64-unknown-linux-gnu',
78
+ '-l pjmedia-codec-x86_64-unknown-linux-gnu',
79
+ '-l pjmedia-videodev-x86_64-unknown-linux-gnu',
80
+ '-l pjmedia-x86_64-unknown-linux-gnu',
81
+ '-l pjsdp-x86_64-unknown-linux-gnu',
82
+ '-l pjsip-x86_64-unknown-linux-gnu',
83
+ '-l pjsua2-x86_64-unknown-linux-gnu',
84
+ '-l pjsip-ua-x86_64-unknown-linux-gnu',
85
+ '-l pjsip-simple-x86_64-unknown-linux-gnu',
86
+ '-l pjsua-x86_64-unknown-linux-gnu',
87
+ '-l pj-x86_64-unknown-linux-gnu',
88
+ '-l pjlib-util-x86_64-unknown-linux-gnu',
89
+ '../3rdParty/spandsp/src/.libs/libspandsp.a',
90
+ '../3rdParty/bcg729/src/libbcg729.a',
91
+ '-lstdc++',
92
+ '-lopus',
93
+ '-lssl',
94
+ '-lcrypto',
95
+ '-luuid',
96
+ '-lm',
97
+ '-ldl',
98
+ '-ltiff',
99
+ '-lrt',
100
+ '-lpthread',
101
+ '-lasound',
102
+ '-lSDL2',
103
+ '-lavdevice',
104
+ '-lavformat',
105
+ '-lavcodec',
106
+ '-lswscale',
107
+ '-lavutil',
108
+ '-lv4l2',
109
+ '-lopencore-amrnb',
110
+ '-lopencore-amrwb',
111
+ '-lvo-amrwbenc',
112
+ '-lspeex',
113
+ ],
114
+ },
115
+ },
116
+ ]
117
+ }
@@ -68,3 +68,17 @@ EOF
68
68
  make dep && make clean && make
69
69
  fi
70
70
 
71
+
72
+ #cd $START_DIR/3rdParty
73
+ #if [[ ! -d openssl ]]
74
+ #then
75
+ # wget https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.5.tar.gz
76
+ # tar xf openssl-3.0.5.tar.gz
77
+ # mv openssl-openssl-3.0.5 openssl
78
+ # cd openssl
79
+ # ./Configure
80
+ # make
81
+ #fi
82
+
83
+
84
+ echo "Build of dependencies successful"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sip-lab",
3
- "version": "1.12.25",
3
+ "version": "1.12.28",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "files": [
32
32
  "index.js",
33
- "bindings.gyp",
34
- "install.sh",
33
+ "binding.gyp",
34
+ "build_deps.sh",
35
35
  "samples",
36
36
  "prebuilds"
37
37
  ]
Binary file
Binary file