Skip to content

SIP provider

Andrea Veri requested to merge wip/sip-provider into master

This commit brings basic SIP integration as a calls plugin. I could probably keep on adding and refining in my private branch but as it's a larger change and should provide a solid basis to build on why not just have it. This will also make reviewing the upcoming improvements/bugfixes easier in separate MRs.

Current issues/things missing (off the top of my head):

  • weird issue with no incoming calls on sip.linphone.org I can place outgoing calls fine-ish (404 answer in registration probe)
  • still can't be reached on sip.linphone.org ;(
  • Remove a macro hack around call string handling and automatically registering with the server
  • Should probably unregister from the server when going into suspend
  • Echo cancellation? See https://source.puri.sm/Librem5/calls/-/merge_requests/270#note_145241
  • No test cases yet (need to think what exactly i want to test anyway - something like creating/tearing down the CallsSipProvider/CallsSipOrigin, maybe something like using one of the sip test servers like https://sip5060.net/test-calls/
  • Deps in flatpak are missing
  • incoming call: ringtone keeps playing after rejecting/the other side hangs up

Trying it out

So if you're feeling adventurous you can give these patches a spin.

SIP config

You will need to create a config ~/.config/calls/sip-account.cfg with either

[Debug]
Direct=1

for direct connections (f.e. 2 Librem5's in the same network) or

[MyAccount]
User=MyUser
Password=SuperSecretPassword123
Host=mysipserver.org
# Port can be omitted, defaults to 5060 for SIP and 5061 for SIPS
Port=5060
# Protocol must be one of UDP,TCP,TLS
Protocol=UDP

I usually have only 1 account active at a time (uncomment the other ones) but there is nothing in the code preventing having multiple accounts.

Startup

Invoke calls with -p sip parameter.

Calling

Invoke calls with sip:user@host parameter.

Edited by Andrea Veri

Merge request reports