We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var config = require('config'); var asterisk_manager = require('asterisk-manager'); var aConfig = config.get('asterisk'); var ami = new asterisk_manager( aConfig.port, aConfig.host, aConfig.username, aConfig.password, true);
When this is run and something (e.g. the password) is wrong, then the error is silently ignored (see https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L50). Only after the object creation I can do
ami.on('error', function (err) { console.log(err); });
to see the error. Is there another way I am not seeing?
The text was updated successfully, but these errors were encountered:
Hi,
the handler for errors caused by the socket connection is set here: https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L82 The errors themselves are emitted here: https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L87
To receive them, you must of course set an error listener in your code.
error
The code section you mentioned (https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L49-L51) contains only listeners internally used by the manager instance for further processing of events. An error handler is obviously not needed (yet) at this point.
Sorry, something went wrong.
No branches or pull requests
When this is run and something (e.g. the password) is wrong, then the error is silently ignored (see https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L50). Only after the object creation I can do
to see the error. Is there another way I am not seeing?
The text was updated successfully, but these errors were encountered: