FreeSWITCH event socket client library written in Dart

The project is in an early state and contributions/bug reports are very welcome. See the examples directory for usage.

Basic usage


ESL.Connection conn = new ESL.Connection();
conn.connect('', 8021);


The first thing you will need to do after having connected, is authenticate. Libesl-dart is fully asynchronous and uses streams for the events, responses and requests coming from the FreeSWITCH server.

This means that the way you handle authentication, is that you setup a listener for auth/request requests coming from the server.

Example code

ESL.Connection conn = new ESL.Connection();
conn.requestStream.listen((ESL.Packet packet) {
  switch (packet.contentType) {
    case (ESL.ContentType.Auth_Request):

conn.connect('', 8021);

Log trace

Every ESL connection object has its own logger object that is muted by default. It uses the "logging" package1 from, so you may need to include this package in your project.

In order to tap into the log trace you need to set an onRecord handler. This can be done at any time, but makes most sense doing at instantiation.

Example code

ESL.Connection conn = new ESL.Connection()

This makes every log entry go to the root Logger, and inherit its loglevel.


Features and bugs

Please file feature requests and bugs at the issue tracker.



The esl library.