{"id":20427591,"url":"https://github.com/rohitbh09/modesl","last_synced_at":"2025-12-06T01:01:57.036Z","repository":{"id":88729296,"uuid":"250524126","full_name":"rohitbh09/modesl","owner":"rohitbh09","description":"modesl with auto reconnect","archived":false,"fork":false,"pushed_at":"2020-03-27T18:50:46.000Z","size":185,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-15T15:55:04.778Z","etag":null,"topics":["esl","freeswitch","freeswitch-esl","freeswitch-event-socket","freeswitch-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohitbh09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-27T12:05:17.000Z","updated_at":"2023-10-01T10:00:18.000Z","dependencies_parsed_at":"2023-04-07T03:04:55.103Z","dependency_job_id":null,"html_url":"https://github.com/rohitbh09/modesl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitbh09%2Fmodesl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitbh09%2Fmodesl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitbh09%2Fmodesl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitbh09%2Fmodesl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohitbh09","download_url":"https://codeload.github.com/rohitbh09/modesl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241969075,"owners_count":20050448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esl","freeswitch","freeswitch-esl","freeswitch-event-socket","freeswitch-plugin"],"created_at":"2024-11-15T07:21:28.922Z","updated_at":"2025-12-06T01:01:51.977Z","avatar_url":"https://github.com/rohitbh09.png","language":"JavaScript","readme":"## FreeSWITCH ESL Bindings for Node.js [![Build Status](https://travis-ci.org/englercj/node-esl.svg?branch=master)](https://travis-ci.org/englercj/node-esl)\n\nA Library for handling low-level FreeSWITCH ESLconnections, and associated ESLevents.\n\n[Documentation](https://github.com/englercj/node-esl/wiki) - [Event Socket Library Spec](http://wiki.freeswitch.org/wiki/Esl)\n\n### Purpose\n\nThough there is already a Node.js \"library\" for this [on github](https://github.com/shimaore/esl),\nit does not actually implement the [Event Socket Library](http://wiki.freeswitch.org/wiki/Event_Socket_Library)\ninterface, and instead has it's own thing. This library was written to implement the full Event\nSocket Library interface, and provide a meaningful semantic when dealing with FreeSWITCH in Node.js.\n\nThis library supports both \"Inbound\" (connection going _into_ FreeSWITCH) and \"Outbound\" (connections\ncoming _out_ of FreeSWITCH). Also included is a helper `esl.Server` object that manages multiple\n`esl.Connection` objects; making it trivial to have multiple \"Outbound\" connections from FreeSWITCH.\n\n### Installation\n\nThe easiest way to install is via npm:\n\n```shell\nnpm install modesl\n```\n\nAs in \"Mod ESL\".\n\n### Usage\n\nThe most basic usage example is to open a connection, and send a status command:\n\n```javascript\nvar esl = require('modesl'),\nconn = new esl.Connection('127.0.0.1', 8021, 'ClueCon', function() {\n    conn.api('status', function(res) {\n        //res is an esl.Event instance\n        console.log(res.getBody());\n    });\n});\n```\n\nSomething to be aware of is that _all_ functions that interact with FreeSWITCH are asynchronous on the Library side.\nHowever, there are many functions (`api`, `execute`, etc) that are synchronous on the FreeSWITCH side. Because of this\nthe event you will get back in your callback on, for example, `api` and the same command on `bgapi` will be different.\n\nThe `api` command's callback will be executed immediately when the `command/reply` message is received, with all the\nreturned data. However, that same command using `bgapi` will _not_ call the callback when the `command/reply` message\nis received, this is because FreeSWITCH returns the `command/reply` message immediately for background commands __before\nthe command is run__. The Library will automatically track the command, and call the callback on the `BACKGROUND_JOB`\nmessage that denotes a completed Background Job.\n\nThe body for the same command issued with `api` and `bgapi` should be the same; even when the headers, event type, and\ntime it takes for the callback to execute are different. The Library attempts to smooth these differences out by providing\na common interface, even though behind the scenes things are quite different.\n\n### Tests\n\nTo run the tests included with the module simply run the following in the root of the `modesl` folder:\n\n```shell\nnpm test\n```\n\n### TODO\n\n - Add tests for\n  * `esl.Connection`\n - Add more examples for\n  * IVR App\n  * Faxing App\n - Add more abstraction/sugar functions\n - Better error messages on `error` event\n\n### License\n\nThis module is distributed under the [Mozilla Public License 2.0](http://www.mozilla.org/MPL/2.0/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitbh09%2Fmodesl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohitbh09%2Fmodesl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitbh09%2Fmodesl/lists"}