esl 0.0.19

  • Installing
  • Versions
  • 4


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

Use this package as a library

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 Go to the documentation of esl 0.0.19 Download esl 0.0.19 archive
0.0.19-1 Jun 21, 2016 Go to the documentation of esl 0.0.19-1 Download esl 0.0.19-1 archive
0.0.16-beta Aug 8, 2015 Go to the documentation of esl 0.0.16-beta Download esl 0.0.16-beta archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.11.8


Detected platforms: unsure

Error(s) prevent platform classification:

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

Issues and suggestions

Fix lib/src/packet.dart.

Analysis of lib/src/packet.dart failed with 3 errors, 13 hints, including:

line 58 col 16: Undefined class 'Logger'.

line 58 col 33: Undefined class 'Logger'.

line 94 col 24: Undefined name 'JSON'.

line 45 col 5: 'Text_Event_JSON' is deprecated and shouldn't be used.

line 46 col 5: 'Text_Event_Plain' is deprecated and shouldn't be used.

Fix lib/src/connection.dart.

Analysis of lib/src/connection.dart failed with 2 errors, 1 hint:

line 32 col 9: Undefined class 'Logger'.

line 32 col 26: Undefined class 'Logger'.

line 25 col 43: 'Json' is deprecated and shouldn't be used.

Fix lib/src/packet_transformer.dart.

Analysis of lib/src/packet_transformer.dart failed with 1 error:

line 16 col 7: Missing concrete implementation of 'StreamTransformer.cast'.

Fix lib/esl.dart.

Analysis of lib/esl.dart failed with 1 error, 1 hint:

line 14 col 8: Target of URI doesn't exist: 'package:logging/logging.dart'.

line 12 col 8: Unused import: 'dart:convert'.

Fix platform conflicts.

Error(s) prevent platform classification:

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

Running dartdoc failed.

Make sure dartdoc runs without any issues.

Add SDK constraint in pubspec.yaml.

For information about setting SDK constraint, please see

Package is too old.

The package was released more than two years ago.

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 of the 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