https://github.com/tigregotico/baresipy
baresip python wrapper
https://github.com/tigregotico/baresipy
baresip python python-wrapper sip sip-client voip voip-application
Last synced: 9 days ago
JSON representation
baresip python wrapper
- Host: GitHub
- URL: https://github.com/tigregotico/baresipy
- Owner: TigreGotico
- License: apache-2.0
- Created: 2020-04-23T15:50:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2026-07-15T22:21:37.000Z (9 days ago)
- Last Synced: 2026-07-15T22:27:00.639Z (9 days ago)
- Topics: baresip, python, python-wrapper, sip, sip-client, voip, voip-application
- Language: Python
- Size: 176 KB
- Stars: 61
- Watchers: 3
- Forks: 33
- Open Issues: 19
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Baresipy
A python wrapper around [baresip](https://github.com/alfredh/baresip)
Make voip calls/bots from python!

# install
```bash
sudo apt-get install baresip
sudo apt-get install ffmpeg
pip install baresipy
```
# usage
scripted calls
```python
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
```python
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](https://ezuce.com/)