bobrovskih / mango-vpbx Goto Github PK
View Code? Open in Web Editor NEWNodeJS SDK for API VPBX by MANGO OFFICE
Home Page: https://www.npmjs.com/package/mango-vpbx
License: MIT License
NodeJS SDK for API VPBX by MANGO OFFICE
Home Page: https://www.npmjs.com/package/mango-vpbx
License: MIT License
[ '[MToxMDA1OTUwNjo1NDAwMzIyMTIxOjA=]',
'1544965391',
'1544965419',
'1544965395',
'',
'79164088678',
'4',
'sip:[email protected]',
'1120',
'74951204212',
'NTQwMDMyMjEyMQ==' ],
[ '' ] ]
const {
success,
stats
} = await vpbx.stats(json)
console.log(stats)
v8.11.3
{ Error: connect ECONNREFUSED 127.0.0.1:443
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 443 }
const vpbx = new VPBX(apiKey, apiSalt);
const recordId = '...'
let ok = vpbx.recording({ recording_id: recordId, folder: '/records/' });
ok.then(({ success, file }) => {
console.log(download record: ${success} >
, file);
}, error => {
console.error(error);
});
process.on('uncaughtException', function (err) {
console.error('uncaughtException', err);
});
Версия mango-vpbx:
1.3.3
Версия NodeJS:
8.9.4
Следующий код будет выбрасывать исключение SyntaxError
если json
или data
имеют falsy-значение:
const payload = JSON.parse(json || data || {});
Он предназначен для разбора строки. Соответственно, {}
будет преобразован в '[object Object]'
и при парсинге будет выброшено исключение:
SyntaxError: Unexpected token o in JSON at position 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.