sip-lab 1.37.0 → 1.39.0

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 (58) hide show
  1. package/DEV.md +2 -2
  2. package/package.json +2 -2
  3. package/prebuilds/linux-x64/node.abi102.node +0 -0
  4. package/prebuilds/linux-x64/node.abi108.node +0 -0
  5. package/prebuilds/linux-x64/node.abi111.node +0 -0
  6. package/prebuilds/linux-x64/node.abi115.node +0 -0
  7. package/prebuilds/linux-x64/node.abi120.node +0 -0
  8. package/prebuilds/linux-x64/node.abi88.node +0 -0
  9. package/prebuilds/linux-x64/node.abi93.node +0 -0
  10. package/samples/100_calls.js +5 -5
  11. package/samples/16_audio_streams.js +2 -2
  12. package/samples/183_session_progress.js +2 -2
  13. package/samples/custom_call_id.js +5 -5
  14. package/samples/delayed_media.js +2 -2
  15. package/samples/four_audio_streams_two_refused.js +2 -2
  16. package/samples/g729.js +2 -2
  17. package/samples/media_fields.js +2 -2
  18. package/samples/mrcp_and_audio.js +3 -3
  19. package/samples/mrcp_and_audio.no_rest_between_msgs.js +254 -0
  20. package/samples/mrcp_and_audio.simplified_media.js +2 -2
  21. package/samples/multiple_audio_streams.js +2 -2
  22. package/samples/options.js +1 -1
  23. package/samples/opus.narrowband.js +2 -2
  24. package/samples/pcma.js +2 -2
  25. package/samples/play_wav_and_speech_recog.bad_transcript.pcmu8000.js +2 -2
  26. package/samples/refer.js +2 -2
  27. package/samples/refuse_telephone_event.js +2 -2
  28. package/samples/register_no_expires.js +1 -1
  29. package/samples/register_subscribe.js +5 -5
  30. package/samples/reinvite_and_dtmf.js +2 -2
  31. package/samples/reinvite_audio_audio.js +2 -2
  32. package/samples/reinvite_with_hold_unhold.js +2 -2
  33. package/samples/rtp_and_srtp.js +2 -2
  34. package/samples/rtp_and_srtp.rtp_refused.js +2 -2
  35. package/samples/send_and_receive_bfsk.js +2 -2
  36. package/samples/send_and_receive_fax.js +2 -2
  37. package/samples/session_expires.update.with_sipjs-lab.js +18 -18
  38. package/samples/simple.js +2 -2
  39. package/samples/sip_cancel.js +2 -2
  40. package/samples/speech_synth_and_recog.speex16000.js +2 -2
  41. package/samples/srtp.js +2 -2
  42. package/samples/start_play_wav_with_end_of_file_event.js +2 -2
  43. package/samples/start_play_wav_with_no_loop.js +2 -2
  44. package/samples/stop_with_cleanup.js +2 -2
  45. package/samples/tcp.js +2 -2
  46. package/samples/text_to_speech.js +2 -2
  47. package/samples/tls.js +2 -2
  48. package/samples/two_audio_streams.js +2 -2
  49. package/samples/two_audio_streams.port_zero.js +2 -2
  50. package/samples_extra/ws_speech_server.bfsk.js +2 -2
  51. package/samples_extra/ws_speech_server.dtmf.js +2 -2
  52. package/samples_extra/ws_speech_server.google.js +2 -2
  53. package/samples_extra/ws_speech_server.send_bfsk.js +2 -2
  54. package/samples_extra/ws_speech_server.start_bfsk_detection.js +2 -2
  55. package/src/sip.cpp +55 -46
  56. package/samples/ic.wav +0 -0
  57. package/samples/oc.wav +0 -0
  58. package/src/sip.cpp.old +0 -9236
package/DEV.md CHANGED
@@ -6,7 +6,7 @@ Basic tasks for development:
6
6
 
7
7
  #### To build
8
8
  ```
9
- sudo 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 libvo-amrwbenc-dev libboost-dev libtiff-dev libpcap-dev libssl-dev uuid-dev cmake
9
+ sudo 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 libvo-amrwbenc-dev libboost-dev libtiff-dev libpcap-dev libssl-dev uuid-dev cmake flite-dev
10
10
 
11
11
  npm install
12
12
  ```
@@ -73,7 +73,7 @@ If it fails due to proxy problems, check if you have proxy configured in ~/.dock
73
73
 
74
74
  ```
75
75
 
76
- After the message is built you can pass them to prebuildify-cross:
76
+ After the image is built you can pass them to prebuildify-cross:
77
77
  ```
78
78
  nvm use v16.13.1
79
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sip-lab",
3
- "version": "1.37.0",
3
+ "version": "1.39.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -21,7 +21,7 @@
21
21
  "gypfile": true,
22
22
  "homepage": "https://github.com/MayamaTakeshi/sip-lab",
23
23
  "dependencies": {
24
- "@mayama/zeq": "^4.21.0",
24
+ "@mayama/zeq": "^4.23.0",
25
25
  "data-matching": "^1.47.1",
26
26
  "mrcp": "^1.4.0",
27
27
  "mrcp-matching": "^1.3.0",
Binary file
Binary file
@@ -51,7 +51,7 @@ async function test() {
51
51
  })).value(), 50000)
52
52
 
53
53
  // Now we answer the calls
54
- z.store.ic_ids.forEach(ic_id => {
54
+ z.$ic_ids.forEach(ic_id => {
55
55
  sip.call.respond(ic_id, {code: 200, reason: 'OK'})
56
56
  })
57
57
 
@@ -72,7 +72,7 @@ async function test() {
72
72
  status: 'ok',
73
73
  })).value())
74
74
 
75
- events = events.concat(_.chain(z.store.ic_ids).map(ic_id => ({
75
+ events = events.concat(_.chain(z.$ic_ids).map(ic_id => ({
76
76
  event: 'media_update',
77
77
  call_id: ic_id,
78
78
  status: 'ok',
@@ -89,7 +89,7 @@ async function test() {
89
89
  sip.call.send_dtmf(oc.id, {digits: '1234', mode: 0})
90
90
  })
91
91
 
92
- await z.wait(_.chain(z.store.ic_ids).map(ic_id => ({
92
+ await z.wait(_.chain(z.$ic_ids).map(ic_id => ({
93
93
  event: 'dtmf',
94
94
  call_id: ic_id,
95
95
  digits: '1234',
@@ -98,7 +98,7 @@ async function test() {
98
98
  })).value(), 50000)
99
99
 
100
100
  // now send inband DTMF digits
101
- z.store.ic_ids.forEach(ic_id => {
101
+ z.$ic_ids.forEach(ic_id => {
102
102
  sip.call.send_dtmf(ic_id, {digits: '4321', mode: 1})
103
103
  })
104
104
 
@@ -131,7 +131,7 @@ async function test() {
131
131
  call_id: oc.id,
132
132
  })).value())
133
133
 
134
- events = events.concat(_.chain(z.store.ic_ids).map(ic_id => ({
134
+ events = events.concat(_.chain(z.$ic_ids).map(ic_id => ({
135
135
  event: 'call_ended',
136
136
  call_id: ic_id,
137
137
  })).value())
@@ -59,8 +59,8 @@ async function test() {
59
59
  // Here we store data for the incoming call
60
60
  // just to organize our code (not really needed)
61
61
  const ic = {
62
- id: z.store.call_id,
63
- sip_call_id: z.store.sip_call_id,
62
+ id: z.$call_id,
63
+ sip_call_id: z.$sip_call_id,
64
64
  }
65
65
 
66
66
  // Now we answer the call at t2 side and accept all 16 streams
@@ -42,8 +42,8 @@ async function test() {
42
42
  ], 1000)
43
43
 
44
44
  ic = {
45
- id: z.store.call_id,
46
- sip_call_id: z.store.sip_call_id,
45
+ id: z.$call_id,
46
+ sip_call_id: z.$sip_call_id,
47
47
  }
48
48
 
49
49
  sip.call.respond(ic.id, {code: 183, reason: 'Session Progress', media: 'audio,audio'})
@@ -66,8 +66,8 @@ async function test() {
66
66
 
67
67
 
68
68
  var ic = {
69
- id: z.store.call_id,
70
- sip_call_id: z.store.sip_call_id,
69
+ id: z.$call_id,
70
+ sip_call_id: z.$sip_call_id,
71
71
  }
72
72
 
73
73
  sip.call.respond(ic.id, {
@@ -111,7 +111,7 @@ async function test() {
111
111
  },
112
112
  })
113
113
 
114
- delete z.store.call_id
114
+ delete z.$call_id
115
115
 
116
116
  await z.wait([
117
117
  {
@@ -141,8 +141,8 @@ async function test() {
141
141
  ], 1000)
142
142
 
143
143
  ic = {
144
- id: z.store.call_id,
145
- sip_call_id: z.store.sip_call_id,
144
+ id: z.$call_id,
145
+ sip_call_id: z.$sip_call_id,
146
146
  }
147
147
 
148
148
  sip.call.respond(ic.id, {
@@ -41,8 +41,8 @@ async function test() {
41
41
  ], 1000)
42
42
 
43
43
  ic = {
44
- id: z.store.call_id,
45
- sip_call_id: z.store.sip_call_id,
44
+ id: z.$call_id,
45
+ sip_call_id: z.$sip_call_id,
46
46
  }
47
47
 
48
48
  sip.call.respond(ic.id, {code: 200, reason: 'OK'})
@@ -53,8 +53,8 @@ async function test() {
53
53
  ], 1000)
54
54
 
55
55
  ic = {
56
- id: z.store.call_id,
57
- sip_call_id: z.store.sip_call_id,
56
+ id: z.$call_id,
57
+ sip_call_id: z.$sip_call_id,
58
58
  }
59
59
 
60
60
  sip.call.respond(ic.id, {code: 200, reason: 'OK', media: [
package/samples/g729.js CHANGED
@@ -47,8 +47,8 @@ async function test() {
47
47
  ], 1000)
48
48
 
49
49
  ic = {
50
- id: z.store.call_id,
51
- sip_call_id: z.store.sip_call_id,
50
+ id: z.$call_id,
51
+ sip_call_id: z.$sip_call_id,
52
52
  }
53
53
 
54
54
  sip.call.respond(ic.id, {code: 200, reason: 'OK'})
@@ -106,8 +106,8 @@ async function test() {
106
106
  // Here we store data for the incoming call
107
107
  // just to organize our code (not really needed)
108
108
  const ic = {
109
- id: z.store.call_id,
110
- sip_call_id: z.store.sip_call_id,
109
+ id: z.$call_id,
110
+ sip_call_id: z.$sip_call_id,
111
111
  }
112
112
 
113
113
  // Now we answer the call at t2 side sending custom headers.
@@ -87,8 +87,8 @@ async function test() {
87
87
  ], 1000)
88
88
 
89
89
  ic = {
90
- id: z.store.call_id,
91
- sip_call_id: z.store.sip_call_id,
90
+ id: z.$call_id,
91
+ sip_call_id: z.$sip_call_id,
92
92
  }
93
93
 
94
94
  sip.call.respond(ic.id, {
@@ -163,7 +163,7 @@ async function test() {
163
163
  },
164
164
  ], 1000)
165
165
 
166
- var mrcp_channel = z.store.mrcp_channel
166
+ var mrcp_channel = z.$mrcp_channel
167
167
  var request_id = 1;
168
168
  var msg = mrcp.builder.build_request('SPEAK', request_id, {'channel-identifier': mrcp_channel, 'content-type': 'application/xml'}, "<root>test</root>")
169
169
 
@@ -0,0 +1,254 @@
1
+ var sip = require ('../index.js')
2
+ var Zeq = require('@mayama/zeq')
3
+ var z = new Zeq()
4
+ var m = require('data-matching')
5
+ var sip_msg = require('sip-matching')
6
+ var sdp = require('sdp-matching')
7
+ var mrcp = require('mrcp')
8
+ var mrcp_msg = require('mrcp-matching')
9
+
10
+ async function test() {
11
+ sip.set_log_level(9)
12
+
13
+ //sip.set_log_level(6)
14
+ sip.dtmf_aggregation_on(500)
15
+
16
+ z.trap_events(sip.event_source, 'event', (evt) => {
17
+ var e = evt.args[0]
18
+ return e
19
+ })
20
+
21
+ console.log(sip.start((data) => { console.log(data)} ))
22
+
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
+
26
+ console.log("t1", t1)
27
+ console.log("t2", t2)
28
+
29
+ var client_media = [
30
+ {
31
+ type: 'mrcp',
32
+ fields: [
33
+ 'a=setup:active',
34
+ 'a=connection:new',
35
+ 'a=resource:speechsynth',
36
+ 'a=cmid:1',
37
+ ],
38
+ },
39
+ {
40
+ type: 'audio',
41
+ fields: [
42
+ 'a=recvonly',
43
+ 'a=mid:1',
44
+ ],
45
+ },
46
+ ]
47
+
48
+ var server_media = [
49
+ {
50
+ type: 'mrcp',
51
+ fields: [
52
+ 'a=setup:passive',
53
+ 'a=connection:new',
54
+ 'a=channel:32AECB234338@speechsynth',
55
+ 'a=cmid:1',
56
+ ],
57
+ },
58
+ {
59
+ type: 'audio',
60
+ fields: [
61
+ 'a=sendonly',
62
+ ],
63
+ },
64
+ ]
65
+
66
+ oc = sip.call.create(t1.id, {
67
+ from_uri: 'sip:alice@test.com',
68
+ to_uri: `sip:bob@${t2.address}:${t2.port}`,
69
+ media: client_media,
70
+ })
71
+
72
+ await z.wait([
73
+ {
74
+ event: "incoming_call",
75
+ call_id: m.collect("call_id"),
76
+ },
77
+ {
78
+ event: 'response',
79
+ call_id: oc.id,
80
+ method: 'INVITE',
81
+ msg: sip_msg({
82
+ $rs: '100',
83
+ $rr: 'Trying',
84
+ '$hdr(call-id)': m.collect('sip_call_id'),
85
+ }),
86
+ },
87
+ ], 1000)
88
+
89
+ ic = {
90
+ id: z.$call_id,
91
+ sip_call_id: z.$sip_call_id,
92
+ }
93
+
94
+ sip.call.respond(ic.id, {
95
+ code: 200,
96
+ reason: 'OK',
97
+ media: server_media,
98
+ })
99
+
100
+ await z.wait([
101
+ {
102
+ event: 'response',
103
+ call_id: oc.id,
104
+ method: 'INVITE',
105
+ msg: sip_msg({
106
+ $rs: '200',
107
+ $rr: 'OK',
108
+ '$hdr(content-type)': 'application/sdp',
109
+ $rb: sdp.jsonpath_matcher({
110
+ '$.media[?(@.desc.type=="application")].val_attrs.channel': [m.collect('mrcp_channel')],
111
+ }),
112
+ }),
113
+ },
114
+ {
115
+ event: 'media_update',
116
+ call_id: oc.id,
117
+ status: 'ok',
118
+ media: [
119
+ {
120
+ type: 'mrcp',
121
+ local: {
122
+ port: 9
123
+ },
124
+ remote: {
125
+ port: m.collect('mrcp_server_port'),
126
+ },
127
+ },
128
+ {
129
+ type: 'audio',
130
+ local: {
131
+ mode: 'recvonly'
132
+ },
133
+ remote: {
134
+ mode: 'sendonly'
135
+ }
136
+ }
137
+ ],
138
+ },
139
+ {
140
+ event: 'media_update',
141
+ call_id: ic.id,
142
+ status: 'ok',
143
+ media: [
144
+ {
145
+ type: 'mrcp',
146
+ local: {
147
+ port: m.collect('mrcp_server_port'),
148
+ },
149
+ remote: {
150
+ port: 9
151
+ }
152
+ },
153
+ {
154
+ type: 'audio',
155
+ local: {
156
+ mode: 'sendonly'
157
+ },
158
+ remote: {
159
+ mode: 'recvonly'
160
+ }
161
+ }
162
+ ],
163
+ },
164
+ ], 1000)
165
+
166
+ var mrcp_channel = z.$mrcp_channel
167
+ var request_id = 1;
168
+ var msg = mrcp.builder.build_request('SPEAK', request_id, {'channel-identifier': mrcp_channel, 'content-type': 'application/xml'}, "<root>test</root>")
169
+
170
+ sip.call.send_mrcp_msg(oc.id, {msg})
171
+
172
+ await z.wait([
173
+ {
174
+ event: 'mrcp_msg',
175
+ call_id: ic.id,
176
+ msg: mrcp_msg({
177
+ type: 'request',
178
+ version: '2.0',
179
+ method: 'SPEAK',
180
+ request_id: 1,
181
+ headers: {
182
+ 'content-type': 'application/xml',
183
+ },
184
+ body: '<root>test</root>',
185
+ }),
186
+ },
187
+ ], 1000)
188
+
189
+ msg = mrcp.builder.build_response(request_id, 200, 'IN-PROGRESS', {'channel-identifier': mrcp_channel})
190
+ sip.call.send_mrcp_msg(ic.id, {msg})
191
+
192
+ msg = mrcp.builder.build_event('SPEAK-COMPLETE', request_id, 'COMPLETE', {'channel-identifier': mrcp_channel})
193
+ sip.call.send_mrcp_msg(ic.id, {msg})
194
+
195
+ await z.wait([
196
+ {
197
+ event: 'mrcp_msg',
198
+ call_id: oc.id,
199
+ msg: mrcp_msg({
200
+ type: 'response',
201
+ version: '2.0',
202
+ request_id: 1,
203
+ status_code: 200,
204
+ request_state: 'IN-PROGRESS',
205
+ }),
206
+ },
207
+ {
208
+ event: 'mrcp_msg',
209
+ call_id: oc.id,
210
+ msg: mrcp_msg({
211
+ type: 'event',
212
+ version: '2.0',
213
+ request_id: 1,
214
+ event_name: 'SPEAK-COMPLETE',
215
+ request_state: 'COMPLETE',
216
+ }),
217
+ },
218
+ ], 1000)
219
+
220
+ sip.call.terminate(oc.id)
221
+
222
+ await z.wait([
223
+ {
224
+ event: 'call_ended',
225
+ call_id: oc.id,
226
+ },
227
+ {
228
+ event: 'call_ended',
229
+ call_id: ic.id,
230
+ },
231
+ {
232
+ event: 'response',
233
+ call_id: oc.id,
234
+ method: 'BYE',
235
+ msg: sip_msg({
236
+ $rs: '200',
237
+ $rr: 'OK',
238
+ }),
239
+ },
240
+ ], 1000)
241
+
242
+ console.log("Success")
243
+
244
+ sip.stop()
245
+ process.exit(0)
246
+ }
247
+
248
+
249
+ test()
250
+ .catch(e => {
251
+ console.error(e)
252
+ process.exit(1)
253
+ })
254
+
@@ -44,8 +44,8 @@ async function test() {
44
44
  ], 1000)
45
45
 
46
46
  ic = {
47
- id: z.store.call_id,
48
- sip_call_id: z.store.sip_call_id,
47
+ id: z.$call_id,
48
+ sip_call_id: z.$sip_call_id,
49
49
  }
50
50
 
51
51
  sip.call.respond(ic.id, {code: 200, reason: 'OK', media: 'mrcp,audio'})
@@ -62,8 +62,8 @@ async function test() {
62
62
  // Here we store data for the incoming call
63
63
  // just to organize our code (not really needed)
64
64
  const ic = {
65
- id: z.store.call_id,
66
- sip_call_id: z.store.sip_call_id,
65
+ id: z.$call_id,
66
+ sip_call_id: z.$sip_call_id,
67
67
  }
68
68
 
69
69
  // Now we answer the call at t2 side and accept all 2 streams
@@ -53,7 +53,7 @@ async function test() {
53
53
  },
54
54
  ], 1000)
55
55
 
56
- sip.request.respond(z.store.uas_req_id, {code: 200, reason: 'OK', headers: {'X-SomeHeader1': 'ccc', 'X-SomeHeader2': 'ddd'}})
56
+ sip.request.respond(z.$uas_req_id, {code: 200, reason: 'OK', headers: {'X-SomeHeader1': 'ccc', 'X-SomeHeader2': 'ddd'}})
57
57
 
58
58
  await z.wait([
59
59
  {
@@ -48,8 +48,8 @@ async function test() {
48
48
  ], 1000)
49
49
 
50
50
  ic = {
51
- id: z.store.call_id,
52
- sip_call_id: z.store.sip_call_id,
51
+ id: z.$call_id,
52
+ sip_call_id: z.$sip_call_id,
53
53
  }
54
54
 
55
55
  sip.call.respond(ic.id, {code: 200, reason: 'OK'})
package/samples/pcma.js CHANGED
@@ -48,8 +48,8 @@ async function test() {
48
48
  ], 1000)
49
49
 
50
50
  ic = {
51
- id: z.store.call_id,
52
- sip_call_id: z.store.sip_call_id,
51
+ id: z.$call_id,
52
+ sip_call_id: z.$sip_call_id,
53
53
  }
54
54
 
55
55
  sip.call.respond(ic.id, {code: 200, reason: 'OK'})
@@ -53,8 +53,8 @@ async function test() {
53
53
  ], 1000)
54
54
 
55
55
  ic = {
56
- id: z.store.call_id,
57
- sip_call_id: z.store.sip_call_id,
56
+ id: z.$call_id,
57
+ sip_call_id: z.$sip_call_id,
58
58
  }
59
59
 
60
60
  sip.call.respond(ic.id, {
package/samples/refer.js CHANGED
@@ -56,8 +56,8 @@ async function test() {
56
56
  // Here we store data for the incoming call
57
57
  // just to organize our code (not really needed)
58
58
  const ic = {
59
- id: z.store.call_id,
60
- sip_call_id: z.store.sip_call_id,
59
+ id: z.$call_id,
60
+ sip_call_id: z.$sip_call_id,
61
61
  }
62
62
 
63
63
  // Now we answer the call at t2 side
@@ -46,8 +46,8 @@ async function test() {
46
46
  ], 1000)
47
47
 
48
48
  ic = {
49
- id: z.store.call_id,
50
- sip_call_id: z.store.sip_call_id,
49
+ id: z.$call_id,
50
+ sip_call_id: z.$sip_call_id,
51
51
  }
52
52
 
53
53
  sip.call.respond(ic.id, {code: 200, reason: 'OK'})
@@ -57,7 +57,7 @@ async function test() {
57
57
  },
58
58
  ], 1000)
59
59
 
60
- sip.request.respond(z.store.req_id, {code: 200, reason: 'OK', headers: {Expires: '120'}})
60
+ sip.request.respond(z.$req_id, {code: 200, reason: 'OK', headers: {Expires: '120'}})
61
61
 
62
62
  await z.wait([
63
63
  {
@@ -57,7 +57,7 @@ async function test() {
57
57
  },
58
58
  ], 1000)
59
59
 
60
- sip.request.respond(z.store.req_id, {code: 200, reason: 'OK', headers: {Expires: '60'}})
60
+ sip.request.respond(z.$req_id, {code: 200, reason: 'OK', headers: {Expires: '60'}})
61
61
 
62
62
  await z.wait([
63
63
  {
@@ -103,7 +103,7 @@ async function test() {
103
103
  },
104
104
  ], 1000)
105
105
 
106
- var subscriber_id = z.store.subscriber_id
106
+ var subscriber_id = z.$subscriber_id
107
107
 
108
108
  await z.wait([
109
109
  {
@@ -130,7 +130,7 @@ async function test() {
130
130
  ], 1000)
131
131
 
132
132
  // Subscription-State expires will be computed by pjsip. It might not be the exact value of sub_expires due to latency so we give 2 seconds of tolerance
133
- assert(z.store.sub_expires > (sub_expires - 2))
133
+ assert(z.$sub_expires > (sub_expires - 2))
134
134
 
135
135
  sip.subscriber.notify(subscriber_id, {
136
136
  content_type: 'application/dialog-info+xml',
@@ -155,7 +155,7 @@ async function test() {
155
155
 
156
156
  await z.sleep(100)
157
157
 
158
- z.store.req_id = null
158
+ z.$req_id = null
159
159
 
160
160
  sip.account.unregister(a1)
161
161
 
@@ -174,7 +174,7 @@ async function test() {
174
174
  },
175
175
  ], 1000)
176
176
 
177
- sip.request.respond(z.store.req_id, {code: 200, reason: 'OK', headers: {Expires: '0'}})
177
+ sip.request.respond(z.$req_id, {code: 200, reason: 'OK', headers: {Expires: '0'}})
178
178
 
179
179
  await z.wait([
180
180
  {
@@ -46,8 +46,8 @@ async function test() {
46
46
  ], 1000)
47
47
 
48
48
  ic = {
49
- id: z.store.call_id,
50
- sip_call_id: z.store.sip_call_id,
49
+ id: z.$call_id,
50
+ sip_call_id: z.$sip_call_id,
51
51
  }
52
52
 
53
53
  // force answer with pcma
@@ -44,8 +44,8 @@ async function test() {
44
44
  ], 1000)
45
45
 
46
46
  ic = {
47
- id: z.store.call_id,
48
- sip_call_id: z.store.sip_call_id,
47
+ id: z.$call_id,
48
+ sip_call_id: z.$sip_call_id,
49
49
  }
50
50
 
51
51
  sip.call.respond(ic.id, {code: 200, reason: 'OK', media: 'audio,audio'})
@@ -44,8 +44,8 @@ async function test() {
44
44
  ], 1000)
45
45
 
46
46
  ic = {
47
- id: z.store.call_id,
48
- sip_call_id: z.store.sip_call_id,
47
+ id: z.$call_id,
48
+ sip_call_id: z.$sip_call_id,
49
49
  }
50
50
 
51
51
  sip.call.respond(ic.id, {code: 200, reason: 'OK'})
@@ -52,8 +52,8 @@ async function test() {
52
52
  ], 1000)
53
53
 
54
54
  const ic = {
55
- id: z.store.call_id,
56
- sip_call_id: z.store.sip_call_id,
55
+ id: z.$call_id,
56
+ sip_call_id: z.$sip_call_id,
57
57
  }
58
58
 
59
59
  sip.call.respond(ic.id, {code: 200, reason: 'OK', media: [