{"id":16884318,"url":"https://github.com/simolus3/asterisk.dart","last_synced_at":"2026-05-18T18:31:55.101Z","repository":{"id":236784855,"uuid":"792418776","full_name":"simolus3/asterisk.dart","owner":"simolus3","description":"Idiomatic Dart bindings to the Asterisk RESTful Interface","archived":false,"fork":false,"pushed_at":"2024-06-08T15:16:18.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T07:07:15.176Z","etag":null,"topics":["asterisk","dart","voip"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simolus3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-04-26T16:20:33.000Z","updated_at":"2024-12-22T16:09:43.000Z","dependencies_parsed_at":"2024-04-28T16:05:41.095Z","dependency_job_id":"c3c305af-9200-4ae3-8eae-35c2ce7fbe7a","html_url":"https://github.com/simolus3/asterisk.dart","commit_stats":null,"previous_names":["simolus3/asterisk.dart"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simolus3%2Fasterisk.dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simolus3%2Fasterisk.dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simolus3%2Fasterisk.dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simolus3%2Fasterisk.dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simolus3","download_url":"https://codeload.github.com/simolus3/asterisk.dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554884,"owners_count":20471316,"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":["asterisk","dart","voip"],"created_at":"2024-10-13T16:17:17.690Z","updated_at":"2026-05-18T18:31:50.079Z","avatar_url":"https://github.com/simolus3.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asterisk\n\n[Asterisk](https://www.asterisk.org/) is \"an open-source framework for building\ncommunications applications\".\n`package:asterisk` is a package for writing these communication applications in\nDart!\n\nAsterisk allows building powerful communication systems. By providing an\nabstraction over channels, bridges and endpoints and supporting a wide range of\nprotocols including VoIP (through SIP and RTP), it is a great choice for all\nkinds of applications dealing with phone calls.\nHow calls are handled in Asterisk is defined in a _dialplan_, a text file which\ncan get complex to write and maintain in growing setups. And while Asterisk\nsupports a large number of builtin applications, these are sometimes hard to\nsetup and understand, or don't support the feature you need.\n\nFortunately, Asterisk contains a [RESTful interface](https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/),\nwhich can be used to interact with calls. This enables you to write your own\ncommunication apps in a language you already know.\n\n## Features\n\n`package:asterisk` provides high-level Dart bindings to both the Asterisk REST\ninterface as well as the web-socket notification mechanism for events.\n\nHere are just some of the things you can build with this package:\n\n- An automated voicemail system.\n- [Voice-based timers](https://github.com/simolus3/asterisk.dart/blob/main/example/voice_reminder.dart).\n- [Call-Roulette](https://github.com/simolus3/asterisk.dart/blob/main/example/call_roulette.dart)!\n- Your very own telephone conference setup.\n- A customer service system, with hold queues and everything.\n\nSome of these have already been implemented in `examples/` - go check them\nout!\n\nHowever, note that this package doesn't support real-time interaction with\ncalls. You can record calls and play sounds, but this isn't a softphone.\nOf course, you could use [Flutter WebRTC](https://flutter-webrtc.org/) to write\na voice-enabled Flutter app that can be called through an Asterisk managed\nby this package.\n\n## Getting started\n\nUsing this package requires a running Asterisk server. To interact with the\nactual phone network, you need a VoIP provider that server can talk to.\n\n### Local testing\n\nFor testing, you can emulate a local phone network, placing calls in a web\nbrowser thanks to WebRTC.\nTo get started, run\n\n```\ndocker run -ti --network host europe-docker.pkg.dev/simonbinder/public/asterisk_demo:latest\n```\n\nStarting asterisk will print a lot of errors as it tries to load a lot of\nmodules we don't need - once it prints \"Asterisk Ready.\", the system is ready\nto go.\n\nVisit http://localhost:8088/. When opening the website for the first time, a\nsettings screen will be shown.\nYou need to enter a SIP username under \"Account\" - the server will accept\n`201`, `202`, `203`, `204` or `205`. They all use `demo` as their passsword and\nare reachable by dialing their account number.\n\nNext, run an example to call:\n\n```\ndart run example/main.dart\n```\n\nAll examples are reachable in the demo server by dialing `1`.\n\n## Usage\n\nThis simple Asterisk application that accepts incoming calls, announces the\ncaller id on the channel and then hangs up:\n\n```dart\nimport 'package:asterisk/asterisk.dart';\n\nvoid main() async {\n  final asterisk = Asterisk(\n    baseUri: Uri.parse('http://localhost:8088'),\n    applicationName: 'demo',\n    username: 'demoapp',\n    password: 'demo',\n  );\n  await for (final incoming in asterisk.stasisStart) {\n    _announceId(incoming.channel);\n  }\n}\n\nFuture\u003cvoid\u003e _announceId(LiveChannel channel) async {\n  print('Has incoming call from ${channel.channel.caller}');\n\n  await channel.answer();\n  await Future.delayed(const Duration(seconds: 1));\n\n  final playback = await channel\n      .play(sources: [MediaSource.digits(channel.channel.caller.number)]);\n  // Wait for the playback to finish.\n  await playback.events.where((e) =\u003e e is PlaybackFinished).first;\n\n  if (!channel.isClosed) {\n    await channel.hangUp();\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimolus3%2Fasterisk.dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimolus3%2Fasterisk.dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimolus3%2Fasterisk.dart/lists"}