Hello people !
I writing a program to connect to our IP PBX like a telnet session !
My code is :
var net = require('net');
var port = 2300;
var host = '192.168.1.101';
var user = 'smdr';
var passwd = 'PCCSMDR';
function connectionListener(conn) {
console.log('Conexão feita !');
}
var conn = net.createConnection(port, host, connectionListener);
conn.on('data', processdata);
function processdata(data){
console.log(data);
conn.write(user);
conn.write('/n/r');
};
conn.setEncoding('utf8');
I need to send two commands and after that only receive data from PBX, but
it's not working.
If I do the same by DOS command it's work, but I want to automatize this
process.
Anyone can help me ?
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.