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