Baresipy
A python wrapper around baresip
Make voip calls/bots from python!
install
sudo apt-get install baresip
sudo apt-get install ffmpeg
pip install baresipy
usage
scripted calls
from baresipy import BareSIP
from time import sleep
to = "jarbas_laptop@sipx.mattkeys.net"
gateway = "sipx.xxxxx.net"
user = "xxxxx"
pswd = "xxxxxx"
b = BareSIP(user, pswd, gateway)
b.call(to)
while b.running:
sleep(0.5)
if b.call_established:
b.send_dtmf("123")
b.speak("this is jarbas personal assistant speaking. this was a test")
b.speak("Goodbye")
b.hang()
b.quit()
handling events
from baresipy import BareSIP
from time import sleep
from pyjokes import get_joke
class JokeBOT(BareSIP):
def handle_incoming_call(self, number):
self.accept_call()
def handle_call_established(self):
self.speak("Welcome to the jokes bot")
self.speak(get_joke())
self.speak("Goodbye")
self.hang()
gateway = "sipx.xxxxx.net"
user = "xxxxxx"
pswd = "xxxx"
b = JokeBOT(user, pswd, gateway)
while b.running:
sleep(1)
Credits
This work as been sponsored by Matt Keys, eZuce Inc
Metadata
Release files for baresipy 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| baresipy-0.1.5.tar.gz | 15.0 kB | Without provenance | Details for baresipy-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baresipy-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for baresipy-0.1.5-py3-none-any.whl |
Total release size: 31.4 kB
Release files / baresipy-0.1.5.tar.gz
| Download URL | baresipy-0.1.5.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1666c1a7d87e9a2d2b244cc75013284f4c8f0688b06ae1bde1b5efaa4988726
|
|
BLAKE2b-256 checksum How to use checksums |
78f3c360733b29f1628a363ad9e9f94b339af481af2b31bf5c628857a1ed4d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / baresipy-0.1.5-py3-none-any.whl
| Download URL | baresipy-0.1.5-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
500f72df081f7ecd3c2615adab868bf931525f163d9fa9f5148e3f6b7cc7656a
|
|
BLAKE2b-256 checksum How to use checksums |
1cc19d087e596589c27ddf29447a9c8e2d7586f3030cc59f08dde42d914db344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for baresipy 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.