asyncio based library to play with asterisk
Project description
panoramisk is a library based on python’s asyncio to play with asterisk’s manager.
It use the tcp manager server to listen to events and the http server (/arawman) to send actions.
See the api for more informations: https://panoramisk.readthedocs.org/
Source: https://github.com/gawel/panoramisk/
Basic usage:
>>> from panoramisk import Manager >>> import asyncio >>> loop = asyncio.get_event_loop() >>> manager = Manager(loop=loop) >>> def handle_meetme(event, manager): ... # do stuff with the event >>> # listen to Meetme* events >>> manager.register_event('Meetme*', handle_meetme) >>> # connect >>> manager.connect() >>> # wait a few seconds while we connecting and >>> # call gawel and make him call 0299999999 on reply >>> loop.call_later(5, manager.send_action, { ... 'Action': 'Originate', ... 'Channel': 'SIP/gawel', ... 'WaitTime': 20, ... 'CallerID': 'gawel', ... 'Exten': '0299999999', ... 'Context': 'default', ... 'Priority': 1, ... })
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
panoramisk-0.4.zip
(16.7 kB
view details)
File details
Details for the file panoramisk-0.4.zip
.
File metadata
- Download URL: panoramisk-0.4.zip
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a933b30dd691e9fa91b092c644651e8ddbb87cff3cb92d06693c9ff72134276d |
|
MD5 | 9e3cf027b3ad263a907cb3b47ab77d8b |
|
BLAKE2b-256 | 9d99ffa9d0d14ed17ab904b864507f3874ad48468c86fd3dc4f25a312088d229 |