probonopd / openphone Goto Github PK
View Code? Open in Web Editor NEWOpen source desk telephone implemented in Python and pjsua
License: MIT License
Open source desk telephone implemented in Python and pjsua
License: MIT License
Hi, I was browsing a bit and I read that the PJSUA python module has been superseded by a new PJSUA2 module.
https://www.pjsip.org/docs/book-latest/html/intro_pjsua2.html
Any idea how much work it would be to upgrade this in this project?
Hi,
Just clicked on Fork, but was wondering if a Pull request might be better.
I want to try to use this project on a new Rasberry Pi Compute Module 4 with IO Board to restore phone functions on an old Dutch Payphone. (Landis & Gyr manufactured early-mid 199x) These phones were all over the world in different configurations.
(https://gathering.tweakers.net/forum/list_messages/1812719 is in dutch but with google translate you get a pretty good understanding what me and a couple of others have tried)
First we tried if we could let the phone work as is, but the phone depends on a central management system which (of course) is out of service. My plan was to create a new voip phone and emulate the way it acted when it was in service.
Regards,
Emiel
Hi, I wanted to try OpenPhone on a Raspberry Pi 4.
Current status : I can call from the USB phone to another phone.
When I try to pickup an incoming call the phone keeps ringing.....
Just wanted to write this what I have done so far to make this work on a Raspberry Pi 4:)
Installed Raspberry Pi OS (Legacy) Buster 2022-04-04 (so we have python2 as default)
With Compute Module IO Board, USB ports are disable by default!
(you can find a lot on the internet for this, but you need to add dtoverlay=dwc2,dr_mode=host to the /boot/config.txt to enable)
Then I followed the OpenPhone installation with these modifications :
in /boot/config.txt add/change dtparam=spi=on
(or use the raspberry config tool)
libttspico-utils is in buster non-free : so add buster non-free to the repo list.
wget -q https://ftp-master.debian.org/keys/release-10.asc -O- | apt-key add -
echo "deb http://deb.debian.org/debian buster non-free" >> /etc/apt/sources.list
apt-get update
apt -y install git libttspico-utils python-dev python-lxml python-requests python-flask python-pyaudio mpd python-mpd python-configparser python-pip python-setuptools libhidapi-libusb0
sudo pip install wheel
sudo pip install flask-bootstrap
Then "sudo pip install hid" will install the wrong python usb hid component.
sudo pip install cython
sudo pip install hidapi==0.9.0
(latest hidapi version doesn't support python2 anymore)
Then follow the rest of the installation but before you start openphone.py make these additional changes.
search openphone.py for spi.open(1,0) # For Neopixels
The raspberry has /dev/spidev0.0 and /dev/spidev0.1 but not 1.0
I changed this in 0,1 but I don't know if this should be 0.0 and if this only means some lights are not working.
search openphone.py for "os.path.dirname(file)" (I got 6 occurrences)
This is used to get the current path but I received an empty string and then files and folders can't be found.
I changed it in : os.path.dirname(os.path.abspath(file))
(on some lines you need to delete a ")" at the end but I assume people reading this know a bit of python to solve such an error :)
Hi,
So I have a raspberry pi 4 with pi os 10 (buster) and I am able to make and receive calls with OpenPhone.
OpenPhone uses python 2.7 and I want to use python 3.
Buster also has python3 so I downloaded the latest pjsip from https://github.com/pjsip/pjproject and I was able to build the Python SWIG Module.
Took a little trial and error because at first no sound card was detected because ALSA was not working/installed. You need to install the libasound2-dev package before you build pjsip and the python SWIG module.
Then I found this example application in : pjproject-2.13.1/pjsip-apps/src/pygui/application.py and when I try this I am able to receive calls. I use the Polycom CX300 as the USB Audio device and this works but the sound quality is terrible.
Maybe an audio codec mismatch or this new SWIG module just needs more CPU power.....
Was curious if you also had bad sound quality with the development with OpenPhone or maybe someone had the same and can set me on the right track.
Regards,
Emiel.
Just wondering if this is still in development.
Also, possible to change the code so one can connect a keypad to it instead of a keyboard?
I'm working on something that could make good use of this. Can I ask you a few questions about this project? [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.