This is a Python package to distribute the ESL.py module generated by FreeSWITCH.
It's an auto-generated SWIG module and the idea is to make it easy to use the FreeSWITCH Event Socket Library without having to install it in the same box. This way you can have different servers, one running FreeSWITCH and another one running your business logic or you can also distribute your tests in a SaaS like Codeship.
$ pip install FreeSWITCH-ESL-Python
$ pip freeze | grep ESL
Should return something like FreeSWITCH-ESL-Python==1.2
.
from freeswitchESL import ESL
try:
import ESL
except ImportError:
from freeswitchESL import ESL
Redundancy could be helpful when you have FreeSWITCH running with your system in production environments, in a way you can just import default ESL package, but you also have a test environment (E.g. Codeship) without a FreeSWITCH installation.
$ cd swig
$ swig -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../include -o esl_wrap.cpp ESL.i
$ mv ESL.py ../freeswitchESL/ESL.py
- Original repository by gurteshwar
- FreeSWITCH docs: ESL and Python ESL
- SWIG docs: SWIG 3.0
- Sangoma’s Python ESL SWIG wrapper - https://github.com/sangoma/python-ESL