esl 0.0.19

  • Installing
  • Versions
  • 25


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" package[1] 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.



  • Addition of notice stream for disconnect notice
  • Added job-uuid parameter for bgapi
  • Minor bugfixes


  • Initial beta release

1. Depend on it

Add this to your package's pubspec.yaml file:

  esl: "^0.0.19"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:esl/esl.dart';
Version Uploaded Documentation Archive
0.0.19 Jun 21, 2016 failed Download esl 0.0.19 archive
0.0.19-1 Jun 21, 2016 failed Download esl 0.0.19-1 archive
0.0.16-beta Aug 8, 2015 failed Download esl 0.0.16-beta archive


We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
78 / 100
Reflects how tidy and up-to-date the package is. [more]
9 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: unsure

Error(s) prevent platform classification:

Error(s) in lib/esl.dart: Target of URI doesn't exist: 'package:logging/logging.dart'.


  • Fix platform conflicts.

    Error(s) prevent platform classification:

    Error(s) in lib/esl.dart: Target of URI doesn't exist: 'package:logging/logging.dart'.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 7 errors 15 hints.

    Make sure that the imported libraries are not in conflict. Error(s) in lib/esl.dart: Target of URI doesn't exist: 'package:logging/logging.dart'.

    Strong-mode analysis of lib/src/connection.dart failed with the following error:

    line: 32 col: 9
    Undefined class 'Logger'.

    Similar analysis of the following files failed:

    • lib/src/packet.dart (error)
    • lib/src/packet_transformer.dart (error)
  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use esl.dart.


Package Constraint Resolved Available
Dev dependencies
junitconfiguration >=1.1.1 <2.0.0
logging >=0.9.2 <1.0.0
unittest >=0.10.0 <0.12.0