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, 2018 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
13 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
58 (define-public commoncpp
64 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
67 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
70 (modify-phases %standard-phases
71 (add-before 'configure 'pre-configure
73 (substitute* "src/applog.cpp"
74 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
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
83 (license license:gpl2+) ; plus runtime exception
84 (home-page "https://www.gnu.org/software/commoncpp/")))
86 (define-public ucommon
92 (uri (string-append "mirror://gnu/commoncpp/" name "-"
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
103 (license license:gpl3+)
104 (home-page "https://www.gnu.org/software/commoncpp/")
105 (properties '((ftp-directory . "/gnu/commoncpp")))))
113 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
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/")))
137 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
138 (patches (search-patches "osip-CVE-2017-7853.patch"))
141 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
142 (build-system gnu-build-system)
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/")))
152 (define-public exosip
158 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
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
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")))
175 (define-public sipwitch
181 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
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
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")
201 "EXOSIP2_LIBS=-leXosip2"
202 ,(string-append "EXOSIP2_CFLAGS=-I"
203 (assoc-ref %build-inputs "exosip")
205 (inputs `(("ucommon" ,ucommon)
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
215 (license license:gpl3+)
216 (home-page "https://www.gnu.org/software/sipwitch/")))
218 (define-public libsrtp
224 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
226 (file-name (string-append name "-" version ".tar.gz"))
229 "02x5l5h2nq6f9gq1bmgz5v9jmnqaab51p8aldglng1z7pjbp9za4"))))
231 `(("psmisc" ,psmisc) ;some tests require 'killall'
233 (build-system gnu-build-system)
235 '(#:test-target "runtest"))
236 (synopsis "Secure RTP (SRTP) Reference Implementation")
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)))
244 (define-public bctoolbox
250 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
254 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
255 (build-system gnu-build-system)
256 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
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+)))
273 (uri (string-append "https://download.savannah.nongnu.org/"
274 "releases/linphone/ortp/sources/ortp-"
278 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
279 (build-system gnu-build-system)
281 `(("bctoolbox" ,bctoolbox)))
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+)))
290 (define-public libiax2
291 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
292 ;; This is the commit used by the Ring Project.
295 (version (string-append "0.0.0-1." (string-take commit 7)))
300 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
302 (file-name (git-file-name name version))
305 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
306 (build-system gnu-build-system)
308 `(("autoconf" ,autoconf)
309 ("automake" ,automake)
310 ("libtool" ,libtool)))
311 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
312 (synopsis "Inter-Asterisk-Protocol library")
313 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
314 Voice-over-IP (VoIP) communications.")
315 ;; The file 'src/md5.c' is released into the public domain by RSA Data
316 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
317 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
318 ;; covered under the 'GPL'.
319 ;; The package as a whole is distributed under the LGPL 2.0.
320 (license (list license:lgpl2.0
321 license:public-domain
330 (uri (string-append "http://holdenc.altervista.org/"
331 "seren/downloads/seren-" version
335 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
336 (build-system gnu-build-system)
337 (arguments '(#:tests? #f)) ; no "check" target
339 `(("alsa-lib" ,alsa-lib)
344 (synopsis "Simple VoIP program to create conferences from the terminal")
346 "Seren is a simple VoIP program based on the Opus codec that allows you
347 to create a voice conference from the terminal, with up to 10 participants,
348 without having to register accounts, exchange emails, or add people to contact
349 lists. All you need to join an existing conference is the host name or IP
350 address of one of the participants.")
351 (home-page "http://holdenc.altervista.org/seren/")
352 (license license:gpl3+)))
354 (define-public mumble
360 (uri (string-append "https://mumble.info/snapshot/"
361 name "-" version ".tar.gz"))
364 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
365 (patches (search-patches "mumble-1.2.19-abs.patch"))
366 (modules '((guix build utils)))
369 ;; Remove bundled software.
370 (for-each delete-file-recursively '("3rdparty"
375 "sbcelt-helper-build"
378 ;; TODO: Celt is still bundled. It has been merged into Opus
379 ;; and will be removed after 1.3.0.
380 ;; https://github.com/mumble-voip/mumble/issues/1999
382 (build-system gnu-build-system)
384 `(#:tests? #f ; no "check" target
386 (modify-phases %standard-phases
388 (lambda* (#:key outputs #:allow-other-keys)
389 (invoke "qmake" "main.pro" "-recursive"
390 (string-append "CONFIG+="
394 "no-embed-qt-translations"
406 (string-append "DEFINES+="
408 (assoc-ref outputs "out")
410 (add-before 'configure 'fix-libspeechd-include
412 (substitute* "src/mumble/TextToSpeech_unix.cpp"
413 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
414 (replace 'install ; install phase does not exist
415 (lambda* (#:key inputs outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (etc (string-append out "/etc/murmur"))
418 (dbus (string-append out "/etc/dbus-1/system.d/"))
419 (bin (string-append out "/bin"))
420 (services (string-append out "/share/services"))
421 (applications (string-append out "/share/applications"))
422 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
423 (man (string-append out "/share/man/man1"))
424 (lib (string-append out "/lib/mumble")))
425 (install-file "release/mumble" bin)
426 (install-file "scripts/mumble-overlay" bin)
427 (install-file "scripts/mumble.protocol" services)
428 (install-file "scripts/mumble.desktop" applications)
429 (install-file "icons/mumble.svg" icons)
430 (install-file "man/mumble-overlay.1" man)
431 (install-file "man/mumble.1" man)
432 (install-file "release/murmurd" bin)
433 (install-file "scripts/murmur.ini.system" etc)
434 (rename-file (string-append etc "/murmur.ini.system")
435 (string-append etc "/murmur.ini"))
436 (install-file "scripts/murmur.conf" dbus)
437 (install-file "man/murmurd.1" man)
438 (for-each (lambda (file) (install-file file lib))
439 (find-files "." "\\.so\\."))
440 (for-each (lambda (file) (install-file file lib))
441 (find-files "release/plugins" "\\.so$"))))))))
444 ("protobuf" ,protobuf)
446 ("libsndfile" ,libsndfile)
450 ("speexdsp" ,speexdsp)
451 ("speech-dispatcher" ,speech-dispatcher)
455 ("alsa-lib" ,alsa-lib)
456 ("pulseaudio" ,pulseaudio)))
458 `(("pkg-config" ,pkg-config)))
459 (synopsis "Low-latency, high quality voice chat software")
461 "Mumble is an low-latency, high quality voice chat
462 software primarily intended for use while gaming.
463 Mumble consists of two applications for separate usage:
464 @code{mumble} for the client, and @code{murmur} for the server.")
465 (home-page "https://wiki.mumble.info/wiki/Main_Page")
466 (license (list license:bsd-3
467 ;; The bundled celt is bsd-2. Remove after 1.3.0.
470 (define-public twinkle
471 (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f")
475 (version (git-version "1.10.1" revision commit))
479 (url "https://github.com/LubosD/twinkle")
482 (search-patches "twinkle-include-qregexpvalidator.patch"))
483 (file-name (git-file-name name version))
486 "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z"))))
487 (build-system cmake-build-system)
489 `(#:tests? #f ; no test target
490 #:configure-flags '("-DWITH_SPEEX=On")
492 (modify-phases %standard-phases
493 (add-after 'install 'wrap-executable
494 (lambda* (#:key inputs outputs #:allow-other-keys)
495 (let ((out (assoc-ref outputs "out")))
496 (wrap-program (string-append out "/bin/twinkle")
497 `("QT_PLUGIN_PATH" ":" prefix
498 ,(map (lambda (label)
499 (string-append (assoc-ref inputs label)
501 '("qtbase" "qtdeclarative")))
502 `("QML2_IMPORT_PATH" ":" prefix
503 ,(map (lambda (label)
504 (string-append (assoc-ref inputs label)
506 '("qtdeclarative" "qtquickcontrols"))))
511 ("readline" ,readline)
517 ("speexdsp" ,speexdsp)
518 ("libsndfile" ,libsndfile)
519 ("alsa-lib" ,alsa-lib)
520 ("qttools" ,qttools)))
523 ("qtdeclarative" ,qtdeclarative)
524 ("qtquickcontrols" ,qtquickcontrols)))
525 (home-page "http://twinkle.dolezel.info/")
526 (synopsis "Softphone for voice over IP and instant messaging")
527 (description "Twinkle is a softphone for your voice over IP and instant
528 messaging communcations using the SIP protocol. You can use it for direct IP
529 phone to IP phone communication or in a network using a SIP proxy to route your
531 (license license:gpl2+))))