sip-lab 1.17.2 → 1.17.3
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/DEV.md +24 -1
- package/binding.gyp +1 -6
- package/build_deps.sh +9 -0
- package/package.json +1 -1
- package/prebuilds/linux-x64/sip-lab.node +0 -0
- package/samples/100_calls.js +5 -5
- package/samples/delayed_media.js +2 -2
- package/samples/four_audio_streams_two_refused.js +2 -2
- package/samples/g729.js +2 -2
- package/samples/mrcp_and_audio.js +2 -2
- package/samples/mrcp_and_audio.simplified_media.js +2 -2
- package/samples/options.js +2 -2
- package/samples/refuse_telephone_event.js +2 -2
- package/samples/register_no_expires.js +2 -2
- package/samples/register_subscribe.js +2 -2
- package/samples/reinvite_and_dtmf.js +2 -2
- package/samples/reinvite_audio_audio.js +2 -2
- package/samples/reinvite_with_hold_unhold.js +2 -2
- package/samples/send_and_receive_fax.js +2 -2
- package/samples/sip_cancel.js +2 -2
- package/samples/tcp_and_extra_headers.js +2 -2
- package/samples/two_audio_streams.js +2 -2
- package/samples/two_audio_streams.port_zero.js +2 -2
package/DEV.md
CHANGED
|
@@ -52,12 +52,35 @@ npx prebuildify --strip -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 19.0.0 20.0.0 21
|
|
|
52
52
|
```
|
|
53
53
|
However the above will build the addon to run on the current OS.
|
|
54
54
|
|
|
55
|
-
Instead we will force the build on debian11 (using docker). So do this instead:
|
|
55
|
+
Instead we will force the build on debian11 (using docker) using prebuildify-cross. So do this instead:
|
|
56
|
+
|
|
57
|
+
Make sure you have the docker image built.
|
|
58
|
+
|
|
59
|
+
cd docker-images/debian11/
|
|
60
|
+
./build_image.sh
|
|
61
|
+
|
|
62
|
+
If it fails due to proxy problems, check if you have proxy configured in ~/.docker/config.json like this:
|
|
63
|
+
```
|
|
64
|
+
{
|
|
65
|
+
"proxies": {
|
|
66
|
+
"default": {
|
|
67
|
+
"httpProxy": "http://192.168.67.50:3128",
|
|
68
|
+
"httpsProxy": "http://192.168.67.50:3128",
|
|
69
|
+
"noProxy": "*.test.example.com,.example.org,127.0.0.0/8"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
After the message is built you can pass them to prebuildify-cross:
|
|
56
77
|
```
|
|
57
78
|
nvm use v16.13.1
|
|
58
79
|
npx prebuildify-cross -i mayamatakeshi/sip-lab-debian11:latest -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 --strip
|
|
59
80
|
```
|
|
60
81
|
|
|
82
|
+
Obs: however the above will fail if you are behind proxy (solution pending).
|
|
83
|
+
|
|
61
84
|
#### Running tests
|
|
62
85
|
```
|
|
63
86
|
npm test
|
package/binding.gyp
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"src/pjmedia/include/pjmedia",
|
|
17
17
|
"src/pjmedia/include/chainlink",
|
|
18
18
|
"3rdParty/rapidjson/include",
|
|
19
|
+
"3rdParty/boost_1_51_0",
|
|
19
20
|
"3rdParty/spandsp/src",
|
|
20
21
|
"<!@(node -p \"require('node-addon-api').include\")",
|
|
21
22
|
],
|
|
@@ -75,16 +76,10 @@
|
|
|
75
76
|
'-lrt',
|
|
76
77
|
'-lpthread',
|
|
77
78
|
'-lasound',
|
|
78
|
-
'-lSDL2',
|
|
79
|
-
'-lavdevice',
|
|
80
79
|
'-lavformat',
|
|
81
80
|
'-lavcodec',
|
|
82
81
|
'-lswscale',
|
|
83
82
|
'-lavutil',
|
|
84
|
-
'-lv4l2',
|
|
85
|
-
'-lopencore-amrnb',
|
|
86
|
-
'-lopencore-amrwb',
|
|
87
|
-
'-lvo-amrwbenc',
|
|
88
83
|
'-lspeex',
|
|
89
84
|
'-l srtp-x86_64-unknown-linux-gnu',
|
|
90
85
|
],
|
package/build_deps.sh
CHANGED
|
@@ -73,6 +73,15 @@ EOF
|
|
|
73
73
|
fi
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
cd $START_DIR/3rdParty
|
|
77
|
+
if [[ ! -d boost_1_51_0 ]]
|
|
78
|
+
then
|
|
79
|
+
wget http://sourceforge.net/projects/boost/files/boost/1.51.0/boost_1_51_0.tar.bz2
|
|
80
|
+
tar xf boost_1_51_0.tar.bz2
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
76
85
|
#cd $START_DIR/3rdParty
|
|
77
86
|
#if [[ ! -d openssl ]]
|
|
78
87
|
#then
|
package/package.json
CHANGED
|
Binary file
|
package/samples/100_calls.js
CHANGED
|
@@ -48,7 +48,7 @@ async function test() {
|
|
|
48
48
|
event: "incoming_call",
|
|
49
49
|
call_id: m.push("ic_ids"),
|
|
50
50
|
transport_id: t.id,
|
|
51
|
-
})).value(),
|
|
51
|
+
})).value(), 30000)
|
|
52
52
|
|
|
53
53
|
// Now we answer the calls
|
|
54
54
|
z.store.ic_ids.forEach(ic_id => {
|
|
@@ -84,7 +84,7 @@ async function test() {
|
|
|
84
84
|
status: 'ok',
|
|
85
85
|
})).value())
|
|
86
86
|
|
|
87
|
-
await z.wait(events,
|
|
87
|
+
await z.wait(events, 30000)
|
|
88
88
|
|
|
89
89
|
ocs.forEach(oc => {
|
|
90
90
|
sip.call.send_dtmf(oc.id, {digits: '1234', mode: 0})
|
|
@@ -96,7 +96,7 @@ async function test() {
|
|
|
96
96
|
digits: '1234',
|
|
97
97
|
mode: 0,
|
|
98
98
|
media_id: 0,
|
|
99
|
-
})).value(),
|
|
99
|
+
})).value(), 30000)
|
|
100
100
|
|
|
101
101
|
z.store.ic_ids.forEach(ic_id => {
|
|
102
102
|
sip.call.send_dtmf(ic_id, {digits: '4321', mode: 1})
|
|
@@ -108,7 +108,7 @@ async function test() {
|
|
|
108
108
|
digits: '4321',
|
|
109
109
|
mode: 1,
|
|
110
110
|
media_id: 0,
|
|
111
|
-
})).value(),
|
|
111
|
+
})).value(), 30000)
|
|
112
112
|
|
|
113
113
|
// now we terminate the calls
|
|
114
114
|
ocs.forEach(oc => {
|
|
@@ -136,7 +136,7 @@ async function test() {
|
|
|
136
136
|
call_id: ic_id,
|
|
137
137
|
})).value())
|
|
138
138
|
|
|
139
|
-
await z.wait(events,
|
|
139
|
+
await z.wait(events, 30000)
|
|
140
140
|
|
|
141
141
|
console.log("Success")
|
|
142
142
|
|
package/samples/delayed_media.js
CHANGED
|
@@ -16,8 +16,8 @@ async function test() {
|
|
|
16
16
|
|
|
17
17
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
18
18
|
|
|
19
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
19
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
20
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
21
21
|
|
|
22
22
|
console.log("t1", t1)
|
|
23
23
|
console.log("t2", t2)
|
|
@@ -26,8 +26,8 @@ async function test() {
|
|
|
26
26
|
|
|
27
27
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
28
28
|
|
|
29
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
30
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
29
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
30
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
31
31
|
|
|
32
32
|
console.log("t1", t1)
|
|
33
33
|
console.log("t2", t2)
|
package/samples/g729.js
CHANGED
|
@@ -18,8 +18,8 @@ async function test() {
|
|
|
18
18
|
|
|
19
19
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
20
20
|
|
|
21
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
22
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
23
23
|
|
|
24
24
|
console.log("t1", t1)
|
|
25
25
|
console.log("t2", t2)
|
|
@@ -20,8 +20,8 @@ async function test() {
|
|
|
20
20
|
|
|
21
21
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
22
22
|
|
|
23
|
-
var t1 = sip.transport.create({address: "127.0.0.1",
|
|
24
|
-
var t2 = sip.transport.create({address: "127.0.0.1",
|
|
23
|
+
var t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
24
|
+
var t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
25
25
|
|
|
26
26
|
console.log("t1", t1)
|
|
27
27
|
console.log("t2", t2)
|
|
@@ -18,8 +18,8 @@ async function test() {
|
|
|
18
18
|
|
|
19
19
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
20
20
|
|
|
21
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
22
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
23
23
|
|
|
24
24
|
console.log("t1", t1)
|
|
25
25
|
console.log("t2", t2)
|
package/samples/options.js
CHANGED
|
@@ -17,8 +17,8 @@ async function test() {
|
|
|
17
17
|
|
|
18
18
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
19
19
|
|
|
20
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
21
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
22
|
|
|
23
23
|
console.log("t1", t1)
|
|
24
24
|
console.log("t2", t2)
|
|
@@ -18,8 +18,8 @@ async function test() {
|
|
|
18
18
|
|
|
19
19
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
20
20
|
|
|
21
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
22
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
23
23
|
|
|
24
24
|
console.log("t1", t1)
|
|
25
25
|
console.log("t2", t2)
|
|
@@ -17,8 +17,8 @@ async function test() {
|
|
|
17
17
|
|
|
18
18
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
19
19
|
|
|
20
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
21
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
22
|
|
|
23
23
|
console.log("t1", t1)
|
|
24
24
|
console.log("t2", t2)
|
|
@@ -17,8 +17,8 @@ async function test() {
|
|
|
17
17
|
|
|
18
18
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
19
19
|
|
|
20
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
21
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
22
|
|
|
23
23
|
console.log("t1", t1)
|
|
24
24
|
console.log("t2", t2)
|
|
@@ -18,8 +18,8 @@ async function test() {
|
|
|
18
18
|
|
|
19
19
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
20
20
|
|
|
21
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
22
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
23
23
|
|
|
24
24
|
console.log("t1", t1)
|
|
25
25
|
console.log("t2", t2)
|
|
@@ -18,8 +18,8 @@ async function test() {
|
|
|
18
18
|
|
|
19
19
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
20
20
|
|
|
21
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
22
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
23
23
|
|
|
24
24
|
console.log("t1", t1)
|
|
25
25
|
console.log("t2", t2)
|
|
@@ -18,8 +18,8 @@ async function test() {
|
|
|
18
18
|
|
|
19
19
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
20
20
|
|
|
21
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
22
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
21
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
22
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
23
23
|
|
|
24
24
|
console.log("t1", t1)
|
|
25
25
|
console.log("t2", t2)
|
|
@@ -16,8 +16,8 @@ async function test() {
|
|
|
16
16
|
|
|
17
17
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
18
18
|
|
|
19
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
19
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
20
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
21
21
|
|
|
22
22
|
console.log("t1", t1)
|
|
23
23
|
console.log("t2", t2)
|
package/samples/sip_cancel.js
CHANGED
|
@@ -16,8 +16,8 @@ async function test() {
|
|
|
16
16
|
|
|
17
17
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
18
18
|
|
|
19
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
19
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
20
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
21
21
|
|
|
22
22
|
console.log("t1", t1)
|
|
23
23
|
console.log("t2", t2)
|
|
@@ -16,8 +16,8 @@ async function test() {
|
|
|
16
16
|
|
|
17
17
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
18
18
|
|
|
19
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
20
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
19
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'tcp'})
|
|
20
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'tcp'})
|
|
21
21
|
|
|
22
22
|
console.log("t1", t1)
|
|
23
23
|
console.log("t2", t2)
|
|
@@ -26,8 +26,8 @@ async function test() {
|
|
|
26
26
|
|
|
27
27
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
28
28
|
|
|
29
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
30
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
29
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
30
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
31
31
|
|
|
32
32
|
console.log("t1", t1)
|
|
33
33
|
console.log("t2", t2)
|
|
@@ -26,8 +26,8 @@ async function test() {
|
|
|
26
26
|
|
|
27
27
|
console.log(sip.start((data) => { console.log(data)} ))
|
|
28
28
|
|
|
29
|
-
t1 = sip.transport.create({address: "127.0.0.1",
|
|
30
|
-
t2 = sip.transport.create({address: "127.0.0.1",
|
|
29
|
+
t1 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
30
|
+
t2 = sip.transport.create({address: "127.0.0.1", type: 'udp'})
|
|
31
31
|
|
|
32
32
|
console.log("t1", t1)
|
|
33
33
|
console.log("t2", t2)
|