Skip to content

Basic client not working #52

@timmeade

Description

@timmeade

i converted the basic client to es6 as that is what we use. Also our FS servers are not on localhost and this is just seeming to not work. Any help or thoughts are appreciated.

// const FS = require('esl');

const fsCommand = (cmd) => {
  const client = FS.client(() => {
    this.api(cmd)
      .then((res) => {
        console.log(res);
        // res contains the headers and body of FreeSwitch's response.
        // res.body.should.match(/\+OK/);
      })
      .then(() => {
        console.log('exit');
        this.exit();
      })
      .then(() => {
        console.log('end');
        client.end();
      });
  });
  // console.log(client);
  client.connect(8021, '10.2.20.21');
};

fsCommand('reloadxml');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions