SIP provider
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 !270 (comment 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.
Merge request reports
Activity
- Edited by Evangelos Ribeiro Tzaras
mentioned in issue #229 (closed)
added 28 commits
-
f4c3bcee...0af0d48e - 6 commits from branch
Librem5:master
- 1dafd7c2 - sip: Initial provider
- 90c660a4 - sip: Origin needs account credentials
- ab150912 - sip: sipify provider with sofia
- 0463c033 - sip: Add media manager and sipify origin
- fcfd3cb7 - meson: add sip_testing option (hack for number handling)
- 552490f3 - sip: initial call handling
- d5f233d5 - sip: origin: fix oper_t reference in sip_callback
- e8081f4a - sip: origin: get address on incoming call
- a9c3cb62 - sip: origin: fix direct connection case
- 2151c9fb - sip: call: rework call state changes
- 418bba8a - sip: origin: emit message on DNS error
- 506fb9b0 - sip: origin: do not use hardcoded ports for RTP
- 37b03db8 - sip: pipeline: bind sockets for RTP
- 2bd8797f - sip: origin: register with SIP server
- 35f5fa04 - sip: go offline when disposing CallsSipOrigin
- 36ab0379 - sip: rework setting SDP
- 21a38768 - sip: allow specifying local port and use IPv6
- 5c3ec84e - sip: Use app name and vcs tag in the user agent
- 6b494059 - sip: media: change default codec to PCMA
- c5a4a88f - sip: pipeline: Add debugging information for used sockets
- 3c721686 - sip: hang up call when contact can't be found (404)
- ed3e7149 - sip: media: improve SDP offer/answer handling
Toggle commit list-
f4c3bcee...0af0d48e - 6 commits from branch
- Resolved by Evangelos Ribeiro Tzaras
pipeline fails due to use of deprecated function: https://source.puri.sm/evangelos.tzaras/calls/-/jobs/331722#L2301
added 28 commits
- 45dd165c - flatpak: remove libhandy as it is part of the SDK
- 35f45d83 - meson: bump required libhandy-1 version >1.1.90
- ffc3f095 - contact-row: remove deprecated function
- e2870f46 - sip: Initial provider
- ba429203 - sip: Origin needs account credentials
- fcb1380a - sip: sipify provider with sofia
- 00a10027 - sip: Add media manager and sipify origin
- 003946cf - meson: add sip_testing option (hack for number handling)
- ea558df2 - sip: initial call handling
- 1212aeef - sip: origin: fix oper_t reference in sip_callback
- 46515f06 - sip: origin: get address on incoming call
- 630be4b1 - sip: origin: fix direct connection case
- 2225e48c - sip: call: rework call state changes
- 4d329040 - sip: origin: emit message on DNS error
- e1d16f01 - sip: origin: do not use hardcoded ports for RTP
- 32e1fcf5 - sip: pipeline: bind sockets for RTP
- df46c3fd - sip: origin: register with SIP server
- 7c110cdd - sip: go offline when disposing CallsSipOrigin
- 621732d1 - sip: rework setting SDP
- ef916a84 - sip: allow specifying local port and use IPv6
- 14c3e36e - sip: Use app name and vcs tag in the user agent
- 6490f793 - sip: media: change default codec to PCMA
- cbc50136 - sip: pipeline: Add debugging information for used sockets
- 0baf9aaf - sip: handle i_outbound 404 errors
- 6856b2b7 - sip: media: improve SDP offer/answer handling
- 80deac6d - sip: use ipv4 exclusively for now
- 4869543c - sip: improve connection handling by using relevant sofia tags
- 6e007272 - application: open sip uri
Toggle commit listv2: rebased on !270 (merged) currently testing if i can get rid of the nasty hacks..
added 26 commits
- 3aebfcc6 - contact-row: remove deprecated function
- 53603dba - sip: Initial provider
- 89680d10 - sip: Origin needs account credentials
- 8d584efe - sip: sipify provider with sofia
- 785f6f1d - sip: Add media manager and sipify origin
- d56839d7 - meson: add sip_testing option (hack for number handling)
- a404a49d - sip: initial call handling
- dad6f04d - sip: origin: fix oper_t reference in sip_callback
- 3f479180 - sip: origin: get address on incoming call
- d3f07839 - sip: origin: fix direct connection case
- 65dc7020 - sip: call: rework call state changes
- 367334e6 - sip: origin: emit message on DNS error
- b5a7d684 - sip: origin: do not use hardcoded ports for RTP
- 2f0b0ff3 - sip: pipeline: bind sockets for RTP
- 2744ac12 - sip: origin: register with SIP server
- e4197e07 - sip: go offline when disposing CallsSipOrigin
- c9702d08 - sip: rework setting SDP
- 0c0bb884 - sip: allow specifying local port and use IPv6
- bb8a39a2 - sip: Use app name and vcs tag in the user agent
- 792c9139 - sip: media: change default codec to PCMA
- da14d341 - sip: pipeline: Add debugging information for used sockets
- 533581f2 - sip: handle i_outbound 404 errors
- 34db4239 - sip: media: improve SDP offer/answer handling
- 131f3fc5 - sip: use ipv4 exclusively for now
- 0e786101 - sip: improve connection handling by using relevant sofia tags
- 26ac4d89 - application: open sip uri
Toggle commit listadded 20 commits
- c5cbe0bc - sip: initial call handling
- 9346fd68 - sip: origin: fix oper_t reference in sip_callback
- f28d059a - sip: origin: get address on incoming call
- e4d65a4a - sip: origin: fix direct connection case
- 1f5f0e99 - sip: call: rework call state changes
- 09b51fe6 - sip: origin: emit message on DNS error
- d7b767d0 - sip: origin: do not use hardcoded ports for RTP
- 81f2b216 - sip: pipeline: bind sockets for RTP
- f9ae597e - sip: origin: register with SIP server
- 75d6ca59 - sip: go offline when disposing CallsSipOrigin
- 8ae2edbd - sip: rework setting SDP
- b401d571 - sip: allow specifying local port and use IPv6
- c6876b7d - sip: Use app name and vcs tag in the user agent
- 4a99ed0e - sip: media: change default codec to PCMA
- 554f3248 - sip: pipeline: Add debugging information for used sockets
- 70085c68 - sip: handle i_outbound 404 errors
- 6768f113 - sip: media: improve SDP offer/answer handling
- a670d1c2 - sip: use ipv4 exclusively for now
- e87c8a52 - sip: improve connection handling by using relevant sofia tags
- 7b8a3343 - application: open sip uri
Toggle commit listadded 8 commits
- 5f426c17 - sip: Use app name in the user agent
- d274aa4b - sip: media: change default codec to PCMA
- f19a85f5 - sip: pipeline: Add debugging information for used sockets
- 5ceaa03a - sip: handle i_outbound 404 errors
- 9d7848ef - sip: media: improve SDP offer/answer handling
- 436f2ec9 - sip: use ipv4 exclusively for now
- 0b8cc88a - sip: improve connection handling by using relevant sofia tags
- fdfce59a - application: open sip uri
Toggle commit listadded 22 commits
- a01af6dd - sip: Add media manager and sipify origin
- 613c59ee - sip: initial call handling
- 9ab31f99 - sip: origin: fix oper_t reference in sip_callback
- 45b3efd9 - sip: origin: get address on incoming call
- 0b407f3f - sip: origin: fix direct connection case
- 17149db5 - sip: call: rework call state changes
- 11945a00 - sip: origin: emit message on DNS error
- 3eae2dff - sip: origin: do not use hardcoded ports for RTP
- 652c7772 - sip: pipeline: bind sockets for RTP
- cfd80afd - sip: origin: register with SIP server
- 847e576b - sip: go offline when disposing CallsSipOrigin
- 3e9b1397 - sip: rework setting SDP
- 5bd41c92 - sip: allow specifying local port and use IPv6
- 5e84dbe4 - sip: Use app name in the user agent
- 253a1068 - sip: media: change default codec to PCMA
- 533f2c03 - sip: pipeline: Add debugging information for used sockets
- 123009dd - sip: handle i_outbound 404 errors
- f9552eec - sip: media: improve SDP offer/answer handling
- c3e6151d - sip: use ipv4 exclusively for now
- 5f2a210f - sip: improve connection handling by using relevant sofia tags
- f2150f80 - application: open sip uri
- 0eb9dbb3 - sip: use g_return_if_fail and friends only for public functions
Toggle commit listadded 1 commit
- b6c9be06 - sip: use g_return_if_fail and friends only for public functions
added 1 commit
- 626c8310 - sip: use g_return_if_fail and friends only for public functions
added 13 commits
- 2398470e - sip: origin: register with SIP server
- 56a28ff1 - sip: go offline when disposing CallsSipOrigin
- 0fe7bda1 - sip: rework setting SDP
- ff6e41c8 - sip: allow specifying local port and use IPv6
- 0ab45973 - sip: Use app name in the user agent
- 038e2c07 - sip: media: change default codec to PCMA
- 1cf85cf5 - sip: pipeline: Add debugging information for used sockets
- 03afab5f - sip: handle i_outbound 404 errors
- ca7b81ce - sip: media: improve SDP offer/answer handling
- 35aaa5f9 - sip: use ipv4 exclusively for now
- 534dbd08 - sip: improve connection handling by using relevant sofia tags
- 989ad51d - application: open sip uri
- aa12d440 - sip: use g_return_if_fail and friends only for public functions
Toggle commit listadded 23 commits
- aba1bd76 - sip: Add media manager and sipify origin
- 8930ae52 - sip: initial call handling
- 0f4b78ca - sip: origin: fix oper_t reference in sip_callback
- 0a9f6615 - sip: origin: get address on incoming call
- 0bef5037 - sip: origin: fix direct connection case
- 8ee4813d - sip: call: rework call state changes
- 662d1ee3 - sip: origin: emit message on DNS error
- 032e62b0 - sip: origin: do not use hardcoded ports for RTP
- 2612c5f6 - sip: pipeline: bind sockets for RTP
- a08485f4 - sip: origin: register with SIP server
- 5bf479d1 - sip: go offline when disposing CallsSipOrigin
- 9a8e16a1 - sip: rework setting SDP
- 2301c3f6 - sip: allow specifying local port and use IPv6
- 0df2155e - sip: Use app name in the user agent
- 1425795d - sip: media: change default codec to PCMA
- 5ee96305 - sip: pipeline: Add debugging information for used sockets
- da225252 - sip: handle i_outbound 404 errors
- 89cc0de3 - sip: media: improve SDP offer/answer handling
- 9291b8aa - sip: use ipv4 exclusively for now
- c138ec0d - sip: improve connection handling by using relevant sofia tags
- 2ac0a32b - application: open sip uri
- cc97469f - sip: use g_return_if_fail and friends only for public functions
- bc36047b - sip: improved authentication (maybe)
Toggle commit listmentioned in issue #238 (closed)
added 28 commits
-
03d960cc - 1 commit from branch
Librem5:master
- 2f7953aa - sip: Initial provider
- 72aa2703 - sip: Origin needs account credentials
- cd74cf46 - sip: sipify provider with sofia
- 8f735a82 - sip: Add media manager and sipify origin
- 8bc440de - sip: initial call handling
- 1e6144cf - sip: origin: fix oper_t reference in sip_callback
- 6622ba6c - sip: origin: get address on incoming call
- 6c7b0b45 - sip: origin: fix direct connection case
- 01cfbf5f - sip: call: rework call state changes
- 779495a4 - sip: origin: emit message on DNS error
- c70ce392 - sip: origin: do not use hardcoded ports for RTP
- aa8a938c - sip: pipeline: bind sockets for RTP
- 75cb08ac - sip: origin: register with SIP server
- 5a5857fb - sip: go offline when disposing CallsSipOrigin
- 551dccf1 - sip: rework setting SDP
- db255663 - sip: allow specifying local port and use IPv6
- 7c360395 - sip: Use app name in the user agent
- 98721785 - sip: media: change default codec to PCMA
- a765a807 - sip: pipeline: Add debugging information for used sockets
- 4b97007e - sip: handle i_outbound 404 errors
- 2feca066 - sip: media: improve SDP offer/answer handling
- aaab5618 - sip: use ipv4 exclusively for now
- 36402111 - sip: improve connection handling by using relevant sofia tags
- e177bca3 - application: open sip uri
- b6c69168 - sip: use g_return_if_fail and friends only for public functions
- d49cf7de - sip: slightly improved authentication
- ec855f8f - sip: fix infinite ringtone loop
Toggle commit list-
03d960cc - 1 commit from branch
v5: found and fixed #238 (closed) which was also impacting incoming SIP calls (ringtone would only stop playing when you accept an incoming call - in every other case it would happily continue ringing ;) )
missing still: flatpak does not like me
Edited by Evangelos Ribeiro Tzarasadded 12 commits
- 815b0236 - sip: allow specifying local port and use IPv6
- e60388fc - sip: Use app name in the user agent
- bf4b95cd - sip: media: change default codec to PCMA
- 62271d18 - sip: pipeline: Add debugging information for used sockets
- 9488e3cf - sip: handle i_outbound 404 errors
- 732c34ca - sip: media: improve SDP offer/answer handling
- 28799a28 - sip: use ipv4 exclusively for now
- 9b1a5c5b - sip: improve connection handling by using relevant sofia tags
- e83e8ebe - application: open sip uri
- d2f521df - sip: use g_return_if_fail and friends only for public functions
- a048524b - sip: slightly improved authentication
- a3f82f22 - sip: fix infinite ringtone loop
Toggle commit listadded 28 commits
- 0e02c5e2 - sip: Initial provider
- ddb70ba3 - sip: Origin needs account credentials
- f61235a4 - sip: sipify provider with sofia
- 35676da0 - sip: Add media manager and sipify origin
- 11075529 - sip: initial call handling
- e4ab52c8 - sip: origin: fix oper_t reference in sip_callback
- f2c05a0f - sip: origin: get address on incoming call
- 404740e8 - sip: origin: fix direct connection case
- de68b250 - sip: call: rework call state changes
- ba877961 - sip: origin: emit message on DNS error
- 22cdf920 - sip: origin: do not use hardcoded ports for RTP
- f16de836 - sip: pipeline: bind sockets for RTP
- 30b779de - sip: origin: register with SIP server
- a35ac7e7 - sip: go offline when disposing CallsSipOrigin
- 2eca7250 - sip: rework setting SDP
- 7242c2c6 - sip: allow specifying local port and use IPv6
- da876f11 - sip: Use app name in the user agent
- 61159e90 - sip: media: change default codec to PCMA
- efed90f7 - sip: pipeline: Add debugging information for used sockets
- b8d42f68 - sip: handle i_outbound 404 errors
- 859270e6 - sip: media: improve SDP offer/answer handling
- 764b12b4 - sip: use ipv4 exclusively for now
- 1afedeaa - sip: improve connection handling by using relevant sofia tags
- 4db81fb5 - application: open sip uri
- 45dab113 - sip: use g_return_if_fail and friends only for public functions
- fe60d841 - sip: slightly improved authentication
- 2d0c924a - sip: fix infinite ringtone loop
- f3eb13e9 - sip-media: enable echo cancellation
Toggle commit list