GithubHelp home page GithubHelp logo

probonopd / openphone Goto Github PK

View Code? Open in Web Editor NEW
27.0 8.0 6.0 496 KB

Open source desk telephone implemented in Python and pjsua

License: MIT License

Python 97.96% HTML 2.04%
phone sip python cx300 orangepi orangepi-zero telephony telephone

openphone's Issues

pull or fork

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

OpenPhone on Raspberry Pi Compute Module 4

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 :

Enable SPI :

in /boot/config.txt add/change dtparam=spi=on
(or use the raspberry config tool)

Install dependencies.

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 :)

Python3 + PJSUA2

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.

Questions

I'm working on something that could make good use of this. Can I ask you a few questions about this project? [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.