
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@jambonz/time-series
Advanced tools
Read and write call detail records and alerts to an influxdb database.
Import a function and invoke it with the ip address of the influxdb database and a pino logger.
const {
writeCdrs,
queryCdrs,
writeAlerts,
queryAlerts,
AlertType
} = require('@jambonz/time-series')(pinoLogger, '172.32.10.44');
await writeCdrs([{
from: 'me',
to: 'you',
sip_callid: 'foo@127.0.0.1',
answered: true,
duration: 22,
attempted_at: new Date(Date.now() - (3600 * 1000)),
answered_at: Date.now() - (3590 * 1000),
terminated_at: Date.now(),
termination_reason: 'caller hungup',
direction: 'inbound',
host: '10.10.100.1',
remote_host: '10.10.100.8',
trunk: 'device',
account_sid: 'xxxx',
call_sid: 'foo'
}]);
Reading is pagination-based: request a page of data, providing the page number and count of records (i.e page size).
Begin by querying page 1 and a count of records >= 25 and <= 500. The response will include a "total" property indicating the total number of records meeting the supplied criteria; based on this you can calculate the total number of page and then provide pagination.
result = await queryCdrs({account_sid: 'yyyy', page: 1, page_size:50});
{
"total": 1,
"page_size": 50,
"page": 1,
"data": [{cdr 1}, {cdr 2}, .. {cdr 50}]
}
CDR data has these tags, of which you must provide at least account_sid in your query, and you may optionally filter the data further by providing any of the other tags and associated values to filter on:
result = await queryCdrs({account_sid: 'yyyy', direction: 'inbound', page: 1, page_size:50});
await writeAlerts([{
alert_type: AlertType.WEBHOOK_STATUS_FAILURE,
account_sid: 'yyyy',
url: 'http://foo.bar',
status: 404
},
{
alert_type: AlertType.TTS_NOT_PROVISIONED,
account_sid: 'yyyy',
vendor: 'google'
},
{
alert_type: AlertType.CARRIER_NOT_PROVISIONED,
account_sid: 'yyyy',
},
{
alert_type: AlertType.CALL_LIMIT,
account_sid: 'yyyy',
count: 50,
}
]);
result = await queryAlerts({account_sid: 'yyyy', page: 1, page_size:50});
{
"total": 1,
"page_size": 50,
"page": 1,
"data": [{alert 1}, {alert 2}, .. {alert 50}]
}
Alert data has these tags, of which you must provide at least account_sid in your query, and you may optionally filter the data further by providing any of the other tags and associated values to filter on:
result = await queryAlerts({account_sid: 'yyyy', alert_type: AlertType.CARRIER_NOT_PROVISIONED, page: 1, page_size:50});
FAQs
write and query data to time series daetabase
The npm package @jambonz/time-series receives a total of 728 weekly downloads. As such, @jambonz/time-series popularity was classified as not popular.
We found that @jambonz/time-series demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.