englercj / node-esl

FreeSWITCH ESL implementation for Node.js; implements the full Event Socket Library specified in: http://wiki.freeswitch.org/wiki/Esl
http://englercj.github.com/node-esl/
MIT License
170 stars 111 forks source link

./bin/channels ( Error ) #65

Closed yavuzhankeles closed 6 years ago

yavuzhankeles commented 7 years ago

Hello

I am getting the following error.

Please help me with this.


root@ajenti:/var/www/fusionpbx/cti/node_modules/modesl/examples/channels# ./bin/channels

module.js:340 throw err; ^ Error: Cannot find module '../config.json' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at new exports.Api (/var/www/fusionpbx/cti/node_modules/modesl/examples/channels/lib/api.js:10:19) at Object. (/var/www/fusionpbx/cti/node_modules/modesl/examples/channels/bin/channels:4:7) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)

englercj commented 7 years ago

First copy the config.json.template file to config.json and edit it as needed. Then run the service.

yavuzhankeles commented 7 years ago

Hi Thank you.

Now I am getting such a mistake.


root@ajenti:/var/www/fusionpbx/cti/node_modules/modesl/examples/channels# ./bin/channels Option log level is not valid. Please refer to the README.

/var/www/fusionpbx/cti/node_modules/modesl/examples/channels/lib/api.js:84 socket.set('method', method, function() { ^ TypeError: Object # has no method 'set' at Socket. (/var/www/fusionpbx/cti/node_modules/modesl/examples/channels/lib/api.js:84:20) at Socket.emit (events.js:98:17) at /var/www/fusionpbx/cti/node_modules/modesl/examples/channels/node_modules/socket.io/lib/socket.js:503:12 at process._tickCallback (node.js:419:13) root@ajenti:/var/www/fusionpbx/cti/node_modules/modesl/examples/channels#

englercj commented 7 years ago

What version of socket.io do you have installed (npm ls).

yavuzhankeles commented 7 years ago

Hi

This version is installed. socket.io@1.7.4

englercj commented 7 years ago

Try installing 1.3.7 and seeing if that fixes your issue. They may have done a breaking change in a minor version.

yavuzhankeles commented 7 years ago

Hi

Now I am getting such a mistake.

Missing error handler on socket. TypeError: Object # has no method 'set' at Socket. (/root/node-esl/examples/channels/lib/api.js:84:20) at Socket.emit (events.js:98:17) at Socket.onevent (/root/node-esl/examples/channels/node_modules/socket.io/lib/socket.js:330:8) at Socket.onpacket (/root/node-esl/examples/channels/node_modules/socket.io/lib/socket.js:290:12) at Client.ondecoded (/root/node-esl/examples/channels/node_modules/socket.io/lib/client.js:193:14) at Decoder.Emitter.emit (/root/node-esl/examples/channels/node_modules/socket.io/node_modules/socket.io-parser/node_modules/component-emitter/index.js:134:20) at Decoder.add (/root/node-esl/examples/channels/node_modules/socket.io/node_modules/socket.io-parser/index.js:247:12) at Client.ondata (/root/node-esl/examples/channels/node_modules/socket.io/lib/client.js:175:18) at Socket.emit (events.js:95:17) at Socket.onPacket (/root/node-esl/examples/channels/node_modules/socket.io/node_modules/engine.io/lib/socket.js:99:14)

englercj commented 7 years ago

Ok, if you pull the latest of this repo it should fix the issue you are having. Looks like socket.io broke some APIs I used a long time ago when i originally wrote this.

englercj commented 6 years ago

Going to close this now since I believe it is fixed.