sip-lab 1.12.5 → 1.12.10
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/package.json +4 -5
- package/samples/artifacts/yosemitesam.wav +0 -0
- package/samples/delayed_media.js +2 -2
- package/samples/g729.js +2 -2
- package/samples/register_subscribe.js +3 -3
- package/samples/reinvite_and_dtmf.js +2 -2
- package/samples/send_and_receive_fax.js +2 -2
- package/samples/simple.js +5 -5
- package/samples/sip_cancel.js +2 -2
- package/samples/tcp_and_extra_headers.js +4 -4
- package/src/sip.cpp +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sip-lab",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -18,14 +18,13 @@
|
|
|
18
18
|
"gypfile": true,
|
|
19
19
|
"homepage": "https://github.com/MayamaTakeshi/sip-lab",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"-": "^0.0.1",
|
|
22
21
|
"node-addon-api": "^1.7.2",
|
|
23
22
|
"node-gyp": "^8.4.1"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
25
|
+
"@mayama/zeq": "^4.1.14",
|
|
26
26
|
"data-matching": "^1.23.8",
|
|
27
|
-
"sip-matching": "^1.3.
|
|
28
|
-
"string-matching": "^1.11.9"
|
|
29
|
-
"zester": "^4.1.1"
|
|
27
|
+
"sip-matching": "^1.3.31",
|
|
28
|
+
"string-matching": "^1.11.9"
|
|
30
29
|
}
|
|
31
30
|
}
|
|
Binary file
|
package/samples/delayed_media.js
CHANGED
package/samples/g729.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var sip = require ('../index.js')
|
|
2
|
-
var
|
|
3
|
-
var z = new
|
|
2
|
+
var Zeq = require('@mayama/zeq')
|
|
3
|
+
var z = new Zeq()
|
|
4
4
|
var m = require('data-matching')
|
|
5
5
|
var sip_msg = require('sip-matching')
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ async function test() {
|
|
|
35
35
|
},
|
|
36
36
|
})
|
|
37
37
|
|
|
38
|
-
sip.account.register(a1, {
|
|
38
|
+
sip.account.register(a1, {auto_refresh: true})
|
|
39
39
|
|
|
40
40
|
await z.wait([
|
|
41
41
|
{
|
package/samples/simple.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// This test creates 2 UDP SIP endpoints, makes a call between them and disconeects.
|
|
2
2
|
|
|
3
3
|
const sip = require ('../index.js')
|
|
4
|
-
const
|
|
4
|
+
const Zeq = require('@mayama/zeq')
|
|
5
5
|
const m = require('data-matching')
|
|
6
6
|
const sip_msg = require('sip-matching')
|
|
7
7
|
|
|
8
|
-
// here we create our
|
|
9
|
-
var z = new
|
|
8
|
+
// here we create our Zeq instance
|
|
9
|
+
var z = new Zeq()
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
async function test() {
|
|
13
|
-
// here we set our
|
|
13
|
+
// here we set our Zeq instance to trap events generated by sip-lab event_source
|
|
14
14
|
z.trap_events(sip.event_source, 'event', (evt) => {
|
|
15
15
|
var e = evt.args[0]
|
|
16
16
|
return e
|
|
@@ -57,7 +57,7 @@ async function test() {
|
|
|
57
57
|
}),
|
|
58
58
|
},
|
|
59
59
|
], 1000)
|
|
60
|
-
// Details about
|
|
60
|
+
// Details about zeq wait(list_of_events_to_wait_for, timeout_in_ms):
|
|
61
61
|
// The order of events in the list is irrelevant.
|
|
62
62
|
// What matters is that all events arrive within the specified timeout.
|
|
63
63
|
// When specifying events, you can be as detailed or succinct as you need.
|
package/samples/sip_cancel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var sip = require ('../index.js')
|
|
2
|
-
var
|
|
3
|
-
var z = new
|
|
2
|
+
var Zeq = require('@mayama/zeq')
|
|
3
|
+
var z = new Zeq()
|
|
4
4
|
var m = require('data-matching')
|
|
5
5
|
var sip_msg = require('sip-matching')
|
|
6
6
|
|
|
@@ -280,8 +280,8 @@ async function test() {
|
|
|
280
280
|
},
|
|
281
281
|
], 2000)
|
|
282
282
|
|
|
283
|
-
sip.call.start_playing(oc.id, {file: '/
|
|
284
|
-
sip.call.start_playing(ic.id, {file: '/
|
|
283
|
+
sip.call.start_playing(oc.id, {file: 'samples/artifacts/yosemitesam.wav'})
|
|
284
|
+
sip.call.start_playing(ic.id, {file: 'samples/artifacts/yosemitesam.wav'})
|
|
285
285
|
|
|
286
286
|
await z.sleep(2000)
|
|
287
287
|
|
package/src/sip.cpp
CHANGED
|
@@ -1457,7 +1457,7 @@ int pjw_account_register(long acc_id, const char *json)
|
|
|
1457
1457
|
|
|
1458
1458
|
char buffer[MAX_JSON_INPUT];
|
|
1459
1459
|
|
|
1460
|
-
bool
|
|
1460
|
+
bool auto_refresh = false;
|
|
1461
1461
|
|
|
1462
1462
|
Document document;
|
|
1463
1463
|
|
|
@@ -1471,11 +1471,11 @@ int pjw_account_register(long acc_id, const char *json)
|
|
|
1471
1471
|
goto out;
|
|
1472
1472
|
}
|
|
1473
1473
|
|
|
1474
|
-
if(!json_get_bool_param(document, "
|
|
1474
|
+
if(!json_get_bool_param(document, "auto_refresh", true, &auto_refresh)) {
|
|
1475
1475
|
goto out;
|
|
1476
1476
|
}
|
|
1477
1477
|
|
|
1478
|
-
status = pjsip_regc_register(regc,
|
|
1478
|
+
status = pjsip_regc_register(regc, auto_refresh, &tdata);
|
|
1479
1479
|
if(status != PJ_SUCCESS)
|
|
1480
1480
|
{
|
|
1481
1481
|
set_error("pjsip_regc_register failed");
|