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