FreeSwitch Event Handler based in Flask.
Project description
Jaspion
Python module developed to work with ESL (FreeSwitch).
Installation Instructions
You can install the package in two ways:
$ pip install jaspion # From pypi
$ pip install https://github.com/Otoru/jaspion # From source code
Example
This is a simple example:
from jaspion import Jaspion
app = Jaspion(__name__)
@app.handle('sofia::register')
def register(event):
domain = event['from-host']
username = event['from-user']
date = event['Event-Date-Local']
print(f'[{date}] {username}@{domain} - Registred.')
@app.handle('sofia::unregister')
def unregister(event):
domain = event['from-host']
username = event['from-user']
date = event['Event-Date-Local']
print(f'[{date}] {username}@{domain} - Unregistred.')
if __name__ == "__main__":
app.run('127.0.0.1', 8021, 'ClueCon')
To-Do List
- Create the decorator to handle events.
- Create a CLI to run projects.
- Create filter to request only the marked events.
- Create the Documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Jaspion-0.1.8.tar.gz
(3.9 kB
view hashes)