@jambonz/time-series 0.2.9 → 0.2.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.
@@ -12,6 +12,11 @@ jobs:
12
12
  - uses: actions/setup-node@v1
13
13
  with:
14
14
  node-version: 12
15
+ - name: Install Docker Compose
16
+ run: |
17
+ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
18
+ sudo chmod +x /usr/local/bin/docker-compose
19
+ docker-compose --version
15
20
  - run: npm install
16
21
  - run: npm run jslint
17
22
  - run: npm test
package/index.js CHANGED
@@ -29,6 +29,7 @@ const schemas = {
29
29
  from: Influx.FieldType.STRING,
30
30
  to: Influx.FieldType.STRING,
31
31
  sip_callid: Influx.FieldType.STRING,
32
+ sip_parent_callid: Influx.FieldType.STRING,
32
33
  sip_status: Influx.FieldType.INTEGER,
33
34
  duration: Influx.FieldType.INTEGER,
34
35
  terminated_at: Influx.FieldType.INTEGER,
@@ -734,7 +735,7 @@ module.exports = (logger, opts) => {
734
735
  if (typeof opts === 'string') opts = {host: opts};
735
736
  assert(opts.host);
736
737
 
737
- const cdrClient = new Influx.InfluxDB({database: 'cdrs', schemas: schemas.cdr, ...opts});
738
+ const cdrClient = new Influx.InfluxDB({database: 'cdrs', schemas: schemas.cdrs, ...opts});
738
739
  const alertClient = new Influx.InfluxDB({database: 'alerts', schemas: schemas.alerts, ...opts});
739
740
  const callCountClient = new Influx.InfluxDB({database: 'call_counts', schemas: schemas.call_counts, ...opts});
740
741
  const callCountSPClient = new Influx.InfluxDB({database: 'sp_call_counts', schemas: schemas.sp_call_counts, ...opts});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/time-series",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "write and query data to time series daetabase",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,6 +23,7 @@ test('write timeseries data', async(t) => {
23
23
  from: 'me',
24
24
  to: 'you',
25
25
  sip_callid: 'foo@127.0.0.1',
26
+ sip_parent_callid: 'foo2@127.0.0.1',
26
27
  answered: true,
27
28
  duration: 22,
28
29
  attempted_at: new Date(Date.now() - (3600 * 1000)),
@@ -41,6 +42,7 @@ test('write timeseries data', async(t) => {
41
42
  from: 'me2',
42
43
  to: 'you2',
43
44
  sip_callid: 'foo@127.0.0.1',
45
+ sip_parent_callid: 'foo2@127.0.0.1',
44
46
  answered: false,
45
47
  duration: 20,
46
48
  attempted_at: new Date(Date.now() - (7200 * 1000)),
@@ -61,6 +63,7 @@ test('write timeseries data', async(t) => {
61
63
  result = await queryCdrs({account_sid: 'xxxx', page: 1, page_size:25});
62
64
  //console.log(JSON.stringify(result));
63
65
  t.ok(result.data.length === 1, 'queried cdrs by account sid');
66
+ t.ok(result.data[0].sip_parent_callid === 'foo2@127.0.0.1', 'sip_parent_callid successfully added');
64
67
 
65
68
  result = await queryCdrs({account_sid: 'xxxx', filter: 'a', page: 1, page_size:25});
66
69
  t.ok(result.data.length === 0, 'queried cdrs by from');