probonopd / OpenPhone

Open source desk telephone implemented in Python and pjsua
MIT License
28 stars 6 forks source link

Python3 + PJSUA2 #7

Open emielvanberlo opened 11 months ago

emielvanberlo commented 11 months ago

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.

probonopd commented 11 months ago

Hi, I didn't notice bad sound quality but it's been quite a while since I was working on this project.