All Projects → VoIPGRID → Cacofonisk

VoIPGRID / Cacofonisk

Licence: mit
Who's calling?

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Cacofonisk

Katari
Katari - Python Session Initiated Protocol Framework
Stars: ✭ 29 (+70.59%)
Mutual labels:  asterisk
astlinux
AstLinux is a "Network Appliance for Communications" x86_64 Linux distribution
Stars: ✭ 23 (+35.29%)
Mutual labels:  asterisk
Soup
☎️ Original open source call flooder using Twilio's API.
Stars: ✭ 267 (+1470.59%)
Mutual labels:  asterisk
Astergazer
Combined dialplan and FastAGI services with a visual dialplan constructor for Asterisk PBX
Stars: ✭ 28 (+64.71%)
Mutual labels:  asterisk
odoo asterisk
Odoo based Asterisk IP-PBX
Stars: ✭ 38 (+123.53%)
Mutual labels:  asterisk
AmiClient
Modern .NET Standard client for accessing the Asterisk AMI protocol using async/await and Reactive Extensions (Rx)
Stars: ✭ 30 (+76.47%)
Mutual labels:  asterisk
callme
No description or website provided.
Stars: ✭ 45 (+164.71%)
Mutual labels:  asterisk
Pami
PHP Asterisk Manager Interface ( AMI ) supports synchronous command ( action )/ responses and asynchronous events using the pattern observer-listener. Supports commands with responses with multiple events. Very suitable for development of operator consoles and / or asterisk / channels / peers monitoring through SOA, etc
Stars: ✭ 351 (+1964.71%)
Mutual labels:  asterisk
asterisk
Scripts for asterisk
Stars: ✭ 14 (-17.65%)
Mutual labels:  asterisk
ari
Golang Asterisk REST Interface (ARI) library
Stars: ✭ 121 (+611.76%)
Mutual labels:  asterisk
magnusbilling7
MagnusBilling is a fast, secure, efficient, high availability, VOIP Billing.
Stars: ✭ 136 (+700%)
Mutual labels:  asterisk
caller-lookup
Reverse Caller Id using TrueCaller
Stars: ✭ 55 (+223.53%)
Mutual labels:  asterisk
ya-node-asterisk
node.js client library for Asterisk Manager Interface
Stars: ✭ 18 (+5.88%)
Mutual labels:  asterisk
docker-freepbx
Docker Image with Asterisk 13, Freepbx 13, Ubuntu 14.04
Stars: ✭ 15 (-11.76%)
Mutual labels:  asterisk
Ggsignif
Easily add significance brackets to your ggplots
Stars: ✭ 322 (+1794.12%)
Mutual labels:  asterisk
amiws
Asterisk Management Interface (AMI) to Web-socket proxy
Stars: ✭ 60 (+252.94%)
Mutual labels:  asterisk
panel gen
Auto call generator for telephone switches at Connections Museum, Seattle.
Stars: ✭ 13 (-23.53%)
Mutual labels:  asterisk
Routr
Routr: Next-generation SIP Server
Stars: ✭ 788 (+4535.29%)
Mutual labels:  asterisk
Docker Freepbx
Dockerized FreePBX 15 w/Asterisk 17, Seperate MySQL Database support, and Data Persistence and UCP
Stars: ✭ 331 (+1847.06%)
Mutual labels:  asterisk
suite-crm-click-to-call
SuiteCRM Click to Call (Asterisk)
Stars: ✭ 17 (+0%)
Mutual labels:  asterisk

Cacofonisk

Cacofonisk is a framework that connects to the Asterisk PBX, listens to events on the Asterisk Management Interface (AMI) and tracks the status of calls currently in progress in Asterisk.

Cacofonisk takes a stream of AMI events as input and uses these to keep track of the channels currently active in Asterisk and how they are related. When something interesting happens to one of the channels, it will call a method on a call state Reporter with interesting information about the call, like who is in the call, and a unique identifier.

This data can then be used to send webhooks regarding a call, to notify a person who is being called, or to log calls being performed.

Status

This product is actively being developed and used at VoIPGRID.

Usage

Requirements

  • Python >= 3.4
  • Panoramisk 1.x
  • Asterisk >= 12

Installation

Cacofonisk is available on Pypi so you can easily install it with pip:

$ pip install cacofonisk

To install the dependencies from source:

$ python3 setup.py install

Running

To run Cacofonisk, you will need two things: a Runner and a Reporter.

A Runner is a class which is responsible for passing AMI events to the Cacofonisk. Two runners are included: an AmiRunner (which connects to the Asterisk Management Interface) and a FileRunner (which imports AMI events from a JSON file).

A Reporter is a class which takes the interesting data from Cacofonisk and does awesome things with it. You can find various Reporters in the examples folder.

To create your own reporter, you can extend the BaseReporter class and implement your own event handlers, like so:

from cacofonisk import AmiRunner, BaseReporter


class ReportAllTheThings(BaseReporter):

    def on_b_dial(self, caller, targets):
        target_channels = [target.name for target in targets]
        caller_number = caller.caller_id.num
        print("{} is now calling {}".format(
            caller_number, ', '.join(target_channels),
        ))

    def on_up(self, caller, target):
        target_number = target.caller_id.num
        caller_number = caller.caller_id.num
        print("{} is now in conversation with {}".format(caller_number, target_number))

    def on_hangup(self, caller, reason):
        caller_number = caller.caller_id.num
        print("{} is no longer calling (reason: {})".format(caller_number, reason))


reporter = ReportAllTheThings()
runner = AmiRunner(['tcp://username:[email protected]:5038'], reporter)
runner.run()

This reporter can then be passed to a Runner of your choice to process AMI events.

For more information about the parameters of the reporter, please see the docs in BaseReporter.

You can also listen for UserEvents using the on_user_event function. This can be used to pass additional data from Asterisk to your Cacofonisk application.

Running the tests

To run the test suite:

$ python3 -m unittest

Contributing

See the CONTRIBUTING.md file on how to contribute to this project.

Contributors

See the CONTRIBUTORS.md file for a list of contributors to the project.

Roadmap

Changelog

The changelog can be found in the CHANGELOG.md file.

In progress

No features are currently in progress.

Future

No features are currently scheduled. Have great ideas? Please don't hesitate to share them!

Get in touch with a developer

If you want to report an issue see the CONTRIBUTING.md file for more info.

We will be happy to answer your other questions at [email protected].

License

Cacofonisk is made available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].