sip-lab 1.12.26 → 1.12.29

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,32 +18,40 @@ 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).
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.
23
23
 
24
- This will require you to have some libraries installed. So do:
24
+ To install it, just do:
25
25
  ```
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
26
+ npm install sip-lab
27
27
  ```
28
28
 
29
- Then install sip-lab by doing:
29
+ If a prebuilt binary is not available, npm will try to build the addon.
30
+
31
+ This might fail if you don't have the required tools and libraries.
32
+
33
+ If this happens try installing them by doing:
30
34
  ```
31
- npm install 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
32
36
  ```
33
37
 
34
38
  To test from within this repo you will need to download and build dependencies. Do:
35
39
  ```
36
40
  ./build_deps.sh
37
41
  ```
42
+
38
43
  Then build the node addon by doing:
39
44
  ```
40
45
  npm install
41
46
  ```
47
+
42
48
  And run some sample script from subfolder samples:
43
49
  ```
44
50
  node samples/simple.js
45
51
  ```
52
+
46
53
  The above script has detailed comments.
54
+
47
55
  Please read it to undestand how to write your own test scripts.
48
56
 
49
57
  ### About the code
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
+ }
package/build_deps.sh CHANGED
@@ -69,4 +69,16 @@ EOF
69
69
  fi
70
70
 
71
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
+
72
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.26",
3
+ "version": "1.12.29",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "files": [
32
32
  "index.js",
33
- "bindings.gyp",
33
+ "binding.gyp",
34
34
  "build_deps.sh",
35
35
  "samples",
36
36
  "prebuilds"
Binary file
Binary file