gnu: Add python-user-agents.
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
7 ;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
8 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
9 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages telephony)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages avahi)
32 #:use-module (gnu packages boost)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages file)
35 #:use-module (gnu packages protobuf)
36 #:use-module (gnu packages gnupg)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages multiprecision)
39 #:use-module (gnu packages ncurses)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages pulseaudio)
42 #:use-module (gnu packages qt)
43 #:use-module (gnu packages speech)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages xiph)
46 #:use-module (gnu packages xorg)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages flex)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (guix packages)
53 #:use-module (guix download)
54 #:use-module (guix git-download)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu))
57
58 (define-public commoncpp
59 (package
60 (name "commoncpp")
61 (version "1.8.1")
62 (source (origin
63 (method url-fetch)
64 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
65 version ".tar.gz"))
66 (sha256 (base32
67 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
68 (arguments
69 `(#:phases
70 (modify-phases %standard-phases
71 (add-before 'configure 'pre-configure
72 (lambda _
73 (substitute* "src/applog.cpp"
74 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
75 #t)))))
76 (build-system gnu-build-system)
77 (synopsis "(u)Common C++ framework for threaded applications")
78 (description "GNU Common C++ is an portable, optimized class framework for
79 threaded applications, supporting concurrent synchronization, inter-process
80 communications via sockets, and various methods for data handling, such as
81 serialization and XML parsing. It includes the uCommon C++ library, a smaller
82 reimplementation.")
83 (license license:gpl2+) ; plus runtime exception
84 (home-page "https://www.gnu.org/software/commoncpp/")))
85
86 (define-public ucommon
87 (package
88 (name "ucommon")
89 (version "7.0.0")
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "mirror://gnu/commoncpp/" name "-"
93 version ".tar.gz"))
94 (sha256 (base32
95 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
96 (build-system gnu-build-system)
97 (inputs `(("gnutls" ,gnutls)))
98 (synopsis "Common C++ framework for threaded applications")
99 (description "GNU uCommon C++ is meant as a very light-weight C++ library
100 to facilitate using C++ design patterns even for very deeply embedded
101 applications, such as for systems using uclibc along with posix threading
102 support.")
103 (license license:gpl3+)
104 (home-page "https://www.gnu.org/software/commoncpp/")
105 (properties '((ftp-directory . "/gnu/commoncpp")))))
106
107 (define-public ccrtp
108 (package
109 (name "ccrtp")
110 (version "2.1.2")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
114 version ".tar.gz"))
115 (sha256 (base32
116 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
117 (build-system gnu-build-system)
118 (inputs `(("ucommon" ,ucommon)
119 ("libgcrypt" ,libgcrypt)))
120 (native-inputs `(("pkg-config" ,pkg-config)))
121 (synopsis "Implementation of RTP (real-time transport protocol)")
122 (description "GNU ccRTP is an implementation of RTP, the real-time transport
123 protocol from the IETF. It is suitable both for high capacity servers and
124 personal client applications. It is flexible in its design, allowing it to
125 function as a framework for the framework, rather than just being a
126 packet-manipulation library.")
127 (license license:gpl2+) ; plus runtime exception
128 (home-page "https://www.gnu.org/software/ccrtp/")))
129
130
131 (define-public osip
132 (package
133 (name "osip")
134 (version "5.0.0")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
138 (patches (search-patches "osip-CVE-2017-7853.patch"))
139 (sha256
140 (base32
141 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
142 (build-system gnu-build-system)
143
144 (synopsis "Library implementing SIP (RFC-3261)")
145 (description "GNU oSIP is an implementation of the SIP protocol. It is
146 used to provide multimedia and telecom software developers with an interface
147 to initiate and control SIP sessions.")
148 (license license:lgpl2.1+)
149 (home-page "https://www.gnu.org/software/osip/")))
150
151
152 (define-public exosip
153 (package
154 (name "exosip")
155 (version "4.1.0")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
159 version ".tar.gz"))
160 (sha256 (base32
161 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
162 (build-system gnu-build-system)
163 (inputs `(("osip" ,osip)))
164 (synopsis "Sip abstraction library")
165 (description "EXosip is a library that hides the complexity of using the
166 SIP protocol for multimedia session establishment. This protocol is mainly to
167 be used by VoIP telephony applications (endpoints or conference server) but
168 might be also useful for any application that wish to establish sessions like
169 multiplayer games.")
170 (license license:gpl2+)
171 ;; (plus OpenSSL linking exception)
172 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
173 (home-page "https://savannah.nongnu.org/projects/exosip")))
174
175 (define-public sipwitch
176 (package
177 (name "sipwitch")
178 (version "1.9.15")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
182 version ".tar.gz"))
183 (sha256 (base32
184 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
185 (build-system gnu-build-system)
186 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
187 ;; cross-compiling. Among other issues there the program name "pkg-config"
188 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
189 ;; Fortunately we can avoid the use of pkg-config and set the dependency
190 ;; flags ourselves.
191 (arguments `(#:configure-flags
192 `("--without-pkg-config"
193 ,(string-append "UCOMMON_CFLAGS=-I"
194 (assoc-ref %build-inputs "ucommon") "/include")
195 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
196 ,(string-append "LIBOSIP2_CFLAGS=-I"
197 (assoc-ref %build-inputs "osip") "/include")
198 "LIBOSIP2_LIBS=-losipparser2 -losip2"
199 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
200 "/etc")
201 "EXOSIP2_LIBS=-leXosip2"
202 ,(string-append "EXOSIP2_CFLAGS=-I"
203 (assoc-ref %build-inputs "exosip")
204 "/include"))))
205 (inputs `(("ucommon" ,ucommon)
206 ("exosip" ,exosip)
207 ("osip" ,osip)))
208 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
209 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
210 uses the SIP protocol. Calls can be made from behind NAT firewalls and
211 without the need for a service provider. Its peer-to-peer design ensures that
212 there is no central point for media intercept or capture and thus it can be
213 used to construct a secure telephone system that operates over the public
214 internet.")
215 (license license:gpl3+)
216 (home-page "https://www.gnu.org/software/sipwitch/")))
217
218 (define-public libsrtp
219 (package
220 (name "libsrtp")
221 (version "2.2.0")
222 (source (origin
223 (method url-fetch)
224 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
225 version ".tar.gz"))
226 (file-name (string-append name "-" version ".tar.gz"))
227 (sha256
228 (base32
229 "02x5l5h2nq6f9gq1bmgz5v9jmnqaab51p8aldglng1z7pjbp9za4"))))
230 (native-inputs
231 `(("psmisc" ,psmisc) ;some tests require 'killall'
232 ("procps" ,procps)))
233 (build-system gnu-build-system)
234 (arguments
235 '(#:test-target "runtest"))
236 (synopsis "Secure RTP (SRTP) Reference Implementation")
237 (description
238 "This package provides an implementation of the Secure Real-time Transport
239 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
240 supporting cryptographic kernel.")
241 (home-page "https://github.com/cisco/libsrtp")
242 (license license:bsd-3)))
243
244 (define-public bctoolbox
245 (package
246 (name "bctoolbox")
247 (version "0.2.0")
248 (source (origin
249 (method url-fetch)
250 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
251 version ".tar.gz"))
252 (sha256
253 (base32
254 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
255 (build-system gnu-build-system)
256 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
257 (native-inputs
258 `(("cunit" ,cunit)))
259 (inputs
260 `(("mbedtls" ,mbedtls-apache)))
261 (home-page "https://www.linphone.org")
262 (synopsis "Utilities library for linphone software")
263 (description "BCtoolbox is a utilities library used by Belledonne
264 Communications softwares like linphone.")
265 (license license:gpl2+)))
266
267 (define-public ortp
268 (package
269 (name "ortp")
270 (version "0.27.0")
271 (source (origin
272 (method url-fetch)
273 (uri (string-append "https://download.savannah.nongnu.org/"
274 "releases/linphone/ortp/sources/ortp-"
275 version ".tar.gz"))
276 (sha256
277 (base32
278 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
279 (build-system gnu-build-system)
280 (inputs
281 `(("bctoolbox" ,bctoolbox)))
282 (native-inputs
283 `(("pkg-config" ,pkg-config)))
284 (home-page "https://linphone.org/")
285 (synopsis "Implementation of the Real-time transport protocol")
286 (description "oRTP is a library implementing the Real-time transport
287 protocol (RFC 3550).")
288 (license license:lgpl2.1+)))
289
290 (define-public libiax2
291 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
292 ;; This is the commit used by the Ring Project.
293 (package
294 (name "libiax2")
295 (version (string-append "0.0.0-1." (string-take commit 7)))
296 (source
297 (origin
298 (method url-fetch)
299 (uri
300 (string-append
301 "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
302 "repository/archive.tar.gz?ref="
303 commit))
304 (file-name (string-append name "-" version ".tar.gz"))
305 (sha256
306 (base32
307 "0cj5293bixp3k5x3hjwyd0iq7z8w5p7yavxvvkqk5817hjq386y2"))))
308 (build-system gnu-build-system)
309 (native-inputs
310 `(("autoconf" ,autoconf)
311 ("automake" ,automake)
312 ("libtool" ,libtool)))
313 (arguments
314 `(#:phases (modify-phases %standard-phases
315 (add-after 'unpack 'autoconf
316 (lambda _
317 (zero? (system* "autoreconf" "-vfi")))))))
318 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
319 (synopsis "Inter-Asterisk-Protocol library")
320 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
321 Voice-over-IP (VoIP) communications.")
322 ;; The file 'src/md5.c' is released into the public domain by RSA Data
323 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
324 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
325 ;; covered under the 'GPL'.
326 ;; The package as a whole is distributed under the LGPL 2.0.
327 (license (list license:lgpl2.0
328 license:public-domain
329 license:gpl2+)))))
330
331 (define-public seren
332 (package
333 (name "seren")
334 (version "0.0.21")
335 (source (origin
336 (method url-fetch)
337 (uri (string-append "http://holdenc.altervista.org/"
338 "seren/downloads/seren-" version
339 ".tar.gz"))
340 (sha256
341 (base32
342 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
343 (build-system gnu-build-system)
344 (arguments '(#:tests? #f)) ; no "check" target
345 (inputs
346 `(("alsa-lib" ,alsa-lib)
347 ("gmp" ,gmp)
348 ("libogg" ,libogg)
349 ("ncurses" ,ncurses)
350 ("opus" ,opus)))
351 (synopsis "Simple VoIP program to create conferences from the terminal")
352 (description
353 "Seren is a simple VoIP program based on the Opus codec that allows you
354 to create a voice conference from the terminal, with up to 10 participants,
355 without having to register accounts, exchange emails, or add people to contact
356 lists. All you need to join an existing conference is the host name or IP
357 address of one of the participants.")
358 (home-page "http://holdenc.altervista.org/seren/")
359 (license license:gpl3+)))
360
361 (define-public mumble
362 (package
363 (name "mumble")
364 (version "1.2.19")
365 (source (origin
366 (method url-fetch)
367 (uri (string-append "https://mumble.info/snapshot/"
368 name "-" version ".tar.gz"))
369 (sha256
370 (base32
371 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
372 (patches (search-patches "mumble-1.2.19-abs.patch"))
373 (modules '((guix build utils)))
374 (snippet
375 `(begin
376 ;; Remove bundled software.
377 (for-each delete-file-recursively '("3rdparty"
378 "speex"
379 "speexbuild"
380 "opus-build"
381 "opus-src"
382 "sbcelt-helper-build"
383 "sbcelt-lib-build"
384 "sbcelt-src"))
385 ;; TODO: Celt is still bundled. It has been merged into Opus
386 ;; and will be removed after 1.3.0.
387 ;; https://github.com/mumble-voip/mumble/issues/1999
388 #t))))
389 (build-system gnu-build-system)
390 (arguments
391 `(#:tests? #f ; no "check" target
392 #:phases
393 (modify-phases %standard-phases
394 (replace 'configure
395 (lambda* (#:key outputs #:allow-other-keys)
396 (zero? (system* "qmake" "main.pro" "-recursive"
397 (string-append "CONFIG+="
398 (string-join
399 (list "no-update"
400 "no-ice"
401 "no-embed-qt-translations"
402 "no-bundled-speex"
403 "pch"
404 "no-bundled-opus"
405 "no-celt"
406 "no-alsa"
407 "no-oss"
408 "no-portaudio"
409 "speechd"
410 "no-g15"
411 "no-bonjour"
412 "release")))
413 (string-append "DEFINES+="
414 "PLUGIN_PATH="
415 (assoc-ref outputs "out")
416 "/lib/mumble")))))
417 (add-before 'configure 'fix-libspeechd-include
418 (lambda _
419 (substitute* "src/mumble/TextToSpeech_unix.cpp"
420 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
421 (replace 'install ; install phase does not exist
422 (lambda* (#:key inputs outputs #:allow-other-keys)
423 (let* ((out (assoc-ref outputs "out"))
424 (etc (string-append out "/etc/murmur"))
425 (dbus (string-append out "/etc/dbus-1/system.d/"))
426 (bin (string-append out "/bin"))
427 (services (string-append out "/share/services"))
428 (applications (string-append out "/share/applications"))
429 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
430 (man (string-append out "/share/man/man1"))
431 (lib (string-append out "/lib/mumble")))
432 (install-file "release/mumble" bin)
433 (install-file "scripts/mumble-overlay" bin)
434 (install-file "scripts/mumble.protocol" services)
435 (install-file "scripts/mumble.desktop" applications)
436 (install-file "icons/mumble.svg" icons)
437 (install-file "man/mumble-overlay.1" man)
438 (install-file "man/mumble.1" man)
439 (install-file "release/murmurd" bin)
440 (install-file "scripts/murmur.ini.system" etc)
441 (rename-file (string-append etc "/murmur.ini.system")
442 (string-append etc "/murmur.ini"))
443 (install-file "scripts/murmur.conf" dbus)
444 (install-file "man/murmurd.1" man)
445 (for-each (lambda (file) (install-file file lib))
446 (find-files "." "\\.so\\."))
447 (for-each (lambda (file) (install-file file lib))
448 (find-files "release/plugins" "\\.so$"))))))))
449 (inputs
450 `(("avahi" ,avahi)
451 ("protobuf" ,protobuf)
452 ("openssl" ,openssl)
453 ("libsndfile" ,libsndfile)
454 ("boost" ,boost)
455 ("opus" ,opus)
456 ("speex" ,speex)
457 ("speexdsp" ,speexdsp)
458 ("speech-dispatcher" ,speech-dispatcher)
459 ("libx11" ,libx11)
460 ("libxi" ,libxi)
461 ("qt-4" ,qt-4)
462 ("alsa-lib" ,alsa-lib)
463 ("pulseaudio" ,pulseaudio)))
464 (native-inputs
465 `(("pkg-config" ,pkg-config)))
466 (synopsis "Low-latency, high quality voice chat software")
467 (description
468 "Mumble is an low-latency, high quality voice chat
469 software primarily intended for use while gaming.
470 Mumble consists of two applications for separate usage:
471 @code{mumble} for the client, and @code{murmur} for the server.")
472 (home-page "https://wiki.mumble.info/wiki/Main_Page")
473 (license (list license:bsd-3
474 ;; The bundled celt is bsd-2. Remove after 1.3.0.
475 license:bsd-2))))
476
477 (define-public twinkle
478 (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f")
479 (revision "1"))
480 (package
481 (name "twinkle")
482 (version (git-version "1.10.1" revision commit))
483 (source (origin
484 (method git-fetch)
485 (uri (git-reference
486 (url "https://github.com/LubosD/twinkle")
487 (commit commit)))
488 (patches
489 (search-patches "twinkle-include-qregexpvalidator.patch"))
490 (file-name (git-file-name name version))
491 (sha256
492 (base32
493 "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z"))))
494 (build-system cmake-build-system)
495 (arguments
496 `(#:tests? #f ; no test target
497 #:configure-flags '("-DWITH_SPEEX=On")
498 #:phases
499 (modify-phases %standard-phases
500 (add-after 'install 'wrap-executable
501 (lambda* (#:key inputs outputs #:allow-other-keys)
502 (let ((out (assoc-ref outputs "out")))
503 (wrap-program (string-append out "/bin/twinkle")
504 `("QT_PLUGIN_PATH" ":" prefix
505 ,(map (lambda (label)
506 (string-append (assoc-ref inputs label)
507 "/lib/qt5/plugins"))
508 '("qtbase" "qtdeclarative")))
509 `("QML2_IMPORT_PATH" ":" prefix
510 ,(map (lambda (label)
511 (string-append (assoc-ref inputs label)
512 "/lib/qt5/qml"))
513 '("qtdeclarative" "qtquickcontrols"))))
514 #t))))))
515 (native-inputs
516 `(("bison" ,bison)
517 ("flex" ,flex)
518 ("readline" ,readline)
519 ("file" ,file)
520 ("ucommon" ,ucommon)
521 ("ccrtp" ,ccrtp)
522 ("libxml2" ,libxml2)
523 ("speex" ,speex)
524 ("speexdsp" ,speexdsp)
525 ("libsndfile" ,libsndfile)
526 ("alsa-lib" ,alsa-lib)
527 ("qttools" ,qttools)))
528 (inputs
529 `(("qtbase" ,qtbase)
530 ("qtdeclarative" ,qtdeclarative)
531 ("qtquickcontrols" ,qtquickcontrols)))
532 (home-page "http://twinkle.dolezel.info/")
533 (synopsis "Softphone for voice over IP and instant messaging")
534 (description "Twinkle is a softphone for your voice over IP and instant
535 messaging communcations using the SIP protocol. You can use it for direct IP
536 phone to IP phone communication or in a network using a SIP proxy to route your
537 calls and messages")
538 (license license:gpl2+))))