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>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages telephony)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages avahi)
29 #:use-module (gnu packages boost)
30 #:use-module (gnu packages protobuf)
31 #:use-module (gnu packages gnupg)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages multiprecision)
34 #:use-module (gnu packages ncurses)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages pulseaudio)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages speech)
39 #:use-module (gnu packages tls)
40 #:use-module (gnu packages xiph)
41 #:use-module (gnu packages xorg)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix build-system gnu))
47 (define-public commoncpp
53 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
56 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
60 'configure 'pre-configure
62 (substitute* "src/applog.cpp"
63 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n")))
65 (build-system gnu-build-system)
66 (synopsis "(u)Common C++ framework for threaded applications")
67 (description "GNU Common C++ is an portable, optimized class framework for
68 threaded applications, supporting concurrent synchronization, inter-process
69 communications via sockets, and various methods for data handling, such as
70 serialization and XML parsing. It includes the uCommon C++ library, a smaller
72 (license license:gpl2+) ; plus runtime exception
73 (home-page "https://www.gnu.org/software/commoncpp/")))
75 (define-public ucommon
81 (uri (string-append "mirror://gnu/commoncpp/" name "-"
84 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
85 (build-system gnu-build-system)
86 (inputs `(("gnutls" ,gnutls)))
87 (synopsis "Common C++ framework for threaded applications")
88 (description "GNU uCommon C++ is meant as a very light-weight C++ library
89 to facilitate using C++ design patterns even for very deeply embedded
90 applications, such as for systems using uclibc along with posix threading
92 (license license:gpl3+)
93 (home-page "https://www.gnu.org/software/commoncpp/")
94 (properties '((ftp-directory . "/gnu/commoncpp")))))
102 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
105 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
106 (build-system gnu-build-system)
107 (inputs `(("ucommon" ,ucommon)
108 ("libgcrypt" ,libgcrypt)))
109 (native-inputs `(("pkg-config" ,pkg-config)))
110 (synopsis "Implementation of RTP (real-time transport protocol)")
111 (description "GNU ccRTP is an implementation of RTP, the real-time transport
112 protocol from the IETF. It is suitable both for high capacity servers and
113 personal client applications. It is flexible in its design, allowing it to
114 function as a framework for the framework, rather than just being a
115 packet-manipulation library.")
116 (license license:gpl2+) ; plus runtime exception
117 (home-page "https://www.gnu.org/software/ccrtp/")))
126 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
127 (patches (search-patches "osip-CVE-2017-7853.patch"))
130 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
131 (build-system gnu-build-system)
133 (synopsis "Library implementing SIP (RFC-3261)")
134 (description "GNU oSIP is an implementation of the SIP protocol. It is
135 used to provide multimedia and telecom software developers with an interface
136 to initiate and control SIP sessions.")
137 (license license:lgpl2.1+)
138 (home-page "https://www.gnu.org/software/osip/")))
141 (define-public exosip
147 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
150 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
151 (build-system gnu-build-system)
152 (inputs `(("osip" ,osip)))
153 (synopsis "Sip abstraction library")
154 (description "EXosip is a library that hides the complexity of using the
155 SIP protocol for multimedia session establishment. This protocol is mainly to
156 be used by VoIP telephony applications (endpoints or conference server) but
157 might be also useful for any application that wish to establish sessions like
159 (license license:gpl2+)
160 ;; (plus OpenSSL linking exception)
161 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
162 (home-page "http://savannah.nongnu.org/projects/exosip")))
164 (define-public sipwitch
170 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
173 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
174 (build-system gnu-build-system)
175 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
176 ;; cross-compiling. Among other issues there the program name "pkg-config"
177 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
178 ;; Fortunately we can avoid the use of pkg-config and set the dependency
180 (arguments `(#:configure-flags
181 `("--without-pkg-config"
182 ,(string-append "UCOMMON_CFLAGS=-I"
183 (assoc-ref %build-inputs "ucommon") "/include")
184 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
185 ,(string-append "LIBOSIP2_CFLAGS=-I"
186 (assoc-ref %build-inputs "osip") "/include")
187 "LIBOSIP2_LIBS=-losipparser2 -losip2"
188 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
190 "EXOSIP2_LIBS=-leXosip2"
191 ,(string-append "EXOSIP2_CFLAGS=-I"
192 (assoc-ref %build-inputs "exosip")
194 (inputs `(("ucommon" ,ucommon)
197 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
198 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
199 uses the SIP protocol. Calls can be made from behind NAT firewalls and
200 without the need for a service provider. Its peer-to-peer design ensures that
201 there is no central point for media intercept or capture and thus it can be
202 used to construct a secure telephone system that operates over the public
204 (license license:gpl3+)
205 (home-page "https://www.gnu.org/software/sipwitch/")))
207 (define-public libsrtp
213 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
215 (file-name (string-append name "-" version ".tar.gz"))
218 "1w2g623qkd7gdyydglx2hr4s2y237lg0nszjmy7z8d2iq8hvb9sn"))))
220 `(("psmisc" ,psmisc) ;some tests require 'killall'
222 (build-system gnu-build-system)
224 '(#:test-target "runtest"
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch-mips-variable-in-testsuite
228 ;; This comes from https://github.com/cisco/libsrtp/pull/151
230 (substitute* "test/srtp_driver.c"
231 (("mips ") "mips_est ")
232 (("mips\\)") "mips_est)"))
234 (add-after 'unpack 'patch-dictionary-location
235 ;; With the above changes, the rtpw_test.sh test finally runs, and fails
237 (substitute* "test/rtpw.c"
238 (("/usr/share/dict/words")
239 (string-append (assoc-ref %build-inputs "procps")
240 "/share/doc/procps-ng/FAQ"))
241 (("words.txt") "FAQ"))
243 (synopsis "Secure RTP (SRTP) Reference Implementation")
244 (description "This package provides an implementation of the Secure
245 Real-time Transport Protocol (SRTP), the Universal Security Transform (UST),
246 and a supporting cryptographic kernel.")
247 (home-page "https://github.com/cisco/libsrtp")
248 (license license:bsd-3)))
250 (define-public libiax2
251 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
252 ;; This is the commit used by the Ring Project.
255 (version (string-append "0.0.0-1." (string-take commit 7)))
261 "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
262 "repository/archive.tar.gz?ref="
264 (file-name (string-append name "-" version ".tar.gz"))
267 "0cj5293bixp3k5x3hjwyd0iq7z8w5p7yavxvvkqk5817hjq386y2"))))
268 (build-system gnu-build-system)
270 `(("autoconf" ,autoconf)
271 ("automake" ,automake)
272 ("libtool" ,libtool)))
274 `(#:phases (modify-phases %standard-phases
275 (add-after 'unpack 'autoconf
277 (zero? (system* "autoreconf" "-vfi")))))))
278 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
279 (synopsis "Inter-Asterisk-Protocol library")
280 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
281 Voice-over-IP (VoIP) communications.")
282 ;; The file 'src/md5.c' is released into the public domain by RSA Data
283 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
284 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
285 ;; covered under the 'GPL'.
286 ;; The package as a whole is distributed under the LGPL 2.0.
287 (license (list license:lgpl2.0
288 license:public-domain
297 (uri (string-append "http://holdenc.altervista.org/"
298 "seren/downloads/seren-" version
302 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
303 (build-system gnu-build-system)
304 (arguments '(#:tests? #f)) ; no "check" target
306 `(("alsa-lib" ,alsa-lib)
311 (synopsis "Simple VoIP program to create conferences from the terminal")
313 "Seren is a simple VoIP program based on the Opus codec that allows you
314 to create a voice conference from the terminal, with up to 10 participants,
315 without having to register accounts, exchange emails, or add people to contact
316 lists. All you need to join an existing conference is the host name or IP
317 address of one of the participants.")
318 (home-page "http://holdenc.altervista.org/seren/")
319 (license license:gpl3+)))
321 (define-public mumble
327 (uri (string-append "https://mumble.info/snapshot/"
328 name "-" version ".tar.gz"))
331 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
332 (modules '((guix build utils)))
335 ;; Remove bundled software.
336 (for-each delete-file-recursively '("3rdparty"
341 "sbcelt-helper-build"
344 ;; TODO: Celt is still bundled. It has been merged into Opus
345 ;; and will be removed after 1.3.0.
346 ;; https://github.com/mumble-voip/mumble/issues/1999
348 (build-system gnu-build-system)
350 `(#:tests? #f ; no "check" target
352 (modify-phases %standard-phases
354 (lambda* (#:key outputs #:allow-other-keys)
355 (zero? (system* "qmake" "main.pro" "-recursive"
356 (string-append "CONFIG+="
360 "no-embed-qt-translations"
372 (string-append "DEFINES+="
374 (assoc-ref outputs "out")
376 (add-before 'configure 'fix-libspeechd-include
378 (substitute* "src/mumble/TextToSpeech_unix.cpp"
379 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
380 (replace 'install ; install phase does not exist
381 (lambda* (#:key inputs outputs #:allow-other-keys)
382 (let* ((out (assoc-ref outputs "out"))
383 (etc (string-append out "/etc/murmur"))
384 (dbus (string-append out "/etc/dbus-1/system.d/"))
385 (bin (string-append out "/bin"))
386 (services (string-append out "/share/services"))
387 (applications (string-append out "/share/applications"))
388 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
389 (man (string-append out "/share/man/man1"))
390 (lib (string-append out "/lib/mumble")))
391 (install-file "release/mumble" bin)
392 (install-file "scripts/mumble-overlay" bin)
393 (install-file "scripts/mumble.protocol" services)
394 (install-file "scripts/mumble.desktop" applications)
395 (install-file "icons/mumble.svg" icons)
396 (install-file "man/mumble-overlay.1" man)
397 (install-file "man/mumble.1" man)
398 (install-file "release/murmurd" bin)
399 (install-file "scripts/murmur.ini.system" etc)
400 (rename-file (string-append etc "/murmur.ini.system")
401 (string-append etc "/murmur.ini"))
402 (install-file "scripts/murmur.conf" dbus)
403 (install-file "man/murmurd.1" man)
404 (for-each (lambda (file) (install-file file lib))
405 (find-files "." "\\.so\\."))
406 (for-each (lambda (file) (install-file file lib))
407 (find-files "release/plugins" "\\.so$"))))))))
410 ("protobuf" ,protobuf)
412 ("libsndfile" ,libsndfile)
416 ("speexdsp" ,speexdsp)
417 ("speech-dispatcher" ,speech-dispatcher)
421 ("alsa-lib" ,alsa-lib)
422 ("pulseaudio" ,pulseaudio)))
424 `(("pkg-config" ,pkg-config)))
425 (synopsis "Low-latency, high quality voice chat software")
427 "Mumble is an low-latency, high quality voice chat
428 software primarily intended for use while gaming.
429 Mumble consists of two applications for separate usage:
430 @code{mumble} for the client, and @code{murmur} for the server.")
431 (home-page "https://wiki.mumble.info/wiki/Main_Page")
432 (license (list license:bsd-3
433 ;; The bundled celt is bsd-2. Remove after 1.3.0.