motom001 / DoorPi

OpenSource VoIP Door-Intercomstation
https://www.doorpi.org/forum/
238 stars 85 forks source link

alternativer SIP client zu linphone #184

Open lexusburn opened 5 years ago

lexusburn commented 5 years ago

Linphone wird seit Jahren nicht weiterentwickelt und hat leider einige Probleme. Ich bekomme linphone beispielsweise mit der PiCam ans laufen, jedoch nur wenn ich die PiCam direkt anspreche und nicht, wenn ich v4l2loopback oder uv4l verwende.

Wäre es möglich alternative SIP Clients, wie beispielsweise Jami/Ring (https://ring.cx/) zu unterstützen?

motom001 commented 2 years ago

weitere Möglichkeiten:

https://github.com/OpenJarbas/baresipy https://github.com/AGProjects/python-sipsimple (bzw. https://sipsimpleclient.org/) https://github.com/astoeckel/femtosip https://github.com/tayler6000/pyVoIP https://github.com/RoberWare/pytwinkle https://www.pjsip.org/docs/book-latest/html/intro_pjsua2.html

sg2710 commented 2 years ago

Möchte gerne ein paar Erfahrungen teilen. Hope it helps!

Doorpi2 mit Linphone ist ja kein Python3.x möglich, deswegen obsolet.

Bei Pjsua ist Python3.x möglich, jedoch die Doku ist mager, kein Bild und es gibt schon pjsua2- Doku ebenfalls mager. Nach dem kompilieren hatte ich ein Memory Leak bei Pjsua. Es scheint auch als hätte niemand in Forum diese Methode weiter verfolgt zu haben. https://www.doorpi.org/forum/thread/378-echo-problematik/?postID=6092&highlight=echo%2Bcancelation#post6092v

Bei Pjsua ist AEC integriert und funktioniert, aber der Client lässt keine Multicalls zu. (Doorpi1 / Doorpi2/ etc.) ...was bei Linphone funktiniert hatte....

Wurde von mir nicht getestet.... Baresip wahrscheinlich wird Pulseaudio noch nötig werden, sowie ich es im Forum von Doorio gelesen hatte. Pulseaudio muss dann für jeder PI Version neu installiert werden. https://forum.iobroker.net/topic/22746/test-adapter-doorio-v2-1-2/53 https://github.com/baresip/baresip https://github.com/baresip/baresip/wiki/Using-PulseAudio:-module-echo-cancel

Ich sehe als Goal...

@motom001:

Ich hoffe die Zusammenfassung hilft ein wenig.

motom001 commented 2 years ago

Ich hatte gestern noch was im Standard-Python gefunden: https://docs.python.org/3.10/library/audioop.html#audioop.findfactor

The find*() routines might look a bit funny at first sight. They are primarily meant to do echo cancellation. A reasonably fast way to do this is to pick the most energetic piece of the output sample, locate that in the input sample and subtract the whole output sample from the input sample:

def echocancel(outputdata, inputdata):
pos = audioop.findmax(outputdata, 800)    # one tenth second
out_test = outputdata[pos*2:]
in_test = inputdata[pos*2:]
ipos, factor = audioop.findfit(in_test, out_test)
# Optional (for better cancellation):
# factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],
#              out_test)
prefill = '\0'*(pos+ipos)*2
postfill = '\0'*(len(inputdata)-len(prefill)-len(outputdata))
outputdata = prefill + audioop.mul(outputdata, 2, -factor) + postfill
return audioop.add(inputdata, outputdata, 2)

Das Echo-Thema sehe ich bisher losgelöst vom sipphone. Viele Nutzer haben das Problem gar nicht. Wenn ein sipphone diese Möglichkeit hat, dann um so besser.

sg2710 commented 2 years ago

Ich kann es mit Linphone an meinem Doorpi testen. An welcher Stelle müsse ich es einfügen?

sg2710 commented 2 years ago

Bin gerade im Forum die "kompletten Projekte" durchgegangen. Mir schein der größte Teil hatte Probleme mit dem Echo. Lösungen waren:

Wenn das neue Sipphone AEC hätte könnte man eine HW-Empfehlung aussprechen und einen einheitlichen Weg einschlagen.

Was ist dein neuer Sipphone Favorit?