NumminorihSF / ami-io

Use node.js or io.js to manage Asterisk through AMI
MIT License
30 stars 16 forks source link

Socket encoding #16

Closed Relz closed 6 years ago

Relz commented 6 years ago

Hello! You setted encoding for socket object to 'ascii'. But I need to set it to 'utf8'. How can I do it? https://github.com/NumminorihSF/ami-io/blob/26cd6f903f392967a273c70f9689ffafbb8016d3/lib/index.js#L108

NumminorihSF commented 6 years ago

Hi @Relz I did not work with Asterisk for a 2 years, so I can't check in real if it works with utf8, but in order to https://wiki.asterisk.org/wiki/display/AST/AMI+v2+Specification#AMIv2Specification-MessageLayout AMI use ascii. So I'm not sure if it ok to allow use utf8 for it. Upd: You may try to install ami-io from feature/allow-encoding-changes branch and check if it works for you.

Relz commented 6 years ago

Hi! I checked branch, it works. I need in utf8 because some data from ami contains cyrillic characters. Now life is perfect. Thank you! Are you going to merge feature/allow-encoding-changes branch to master?

NumminorihSF commented 6 years ago

Hi @Relz Sorry for the late, I published v1.2.1 that implements the improvement you need.