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, 2020 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 Nikita <nikita@n0.is>
9 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
12 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
13 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
15 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
16 ;;; Copyright © 2019 Ivan Vilata i Balaguer <ivan@selidor.net>
17 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
18 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
19 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
20 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
21 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages telephony)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages admin)
41 #:use-module (gnu packages aidc)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages avahi)
45 #:use-module (gnu packages audio)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages docbook)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages file)
55 #:use-module (gnu packages protobuf)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages gnupg)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages libcanberra)
64 #:use-module (gnu packages linphone)
65 #:use-module (gnu packages linux)
66 #:use-module (gnu packages multiprecision)
67 #:use-module (gnu packages ncurses)
68 #:use-module (gnu packages netpbm)
69 #:use-module (gnu packages networking)
70 #:use-module (gnu packages pcre)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages pulseaudio)
74 #:use-module (gnu packages python)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages serialization)
77 #:use-module (gnu packages speech)
78 #:use-module (gnu packages tls)
79 #:use-module (gnu packages upnp)
80 #:use-module (gnu packages video)
81 #:use-module (gnu packages webkit)
82 #:use-module (gnu packages xiph)
83 #:use-module (gnu packages xorg)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages bison)
87 #:use-module (gnu packages flex)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (guix packages)
90 #:use-module (guix download)
91 #:use-module (guix git-download)
92 #:use-module (guix build-system cmake)
93 #:use-module (guix build-system gnu)
94 #:use-module (guix build-system qt))
96 (define-public libilbc
105 (url "https://github.com/TimothyGu/libilbc")
107 (string-append "v" version))))
109 (git-file-name name version))
112 "1j1pn1w1198qvdiq2hgv9hkyq2nqcvmfnwlgppac633idkjnjrqx"))))
113 (build-system cmake-build-system)
115 `(#:tests? #f)) ; No target
117 `(("pkg-config" ,pkg-config)))
118 (synopsis "Libre iLBC codec")
119 (description "LibiLBC is a packaging friendly copy of the iLBC codec from
120 the WebRTC project. It provides a base for distribution packages and can be
121 used as drop-in replacement for the non-free code from RFC 3591.")
122 (home-page "https://github.com/TimothyGu/libilbc")
123 (license license:bsd-3)))
125 (define-public spandsp
133 ;; The original upstream has been down since the end of March 2020.
134 (string-append "https://web.archive.org/web/20180626203108/"
135 "https://www.soft-switch.org/downloads/" name "/"
136 name "-" version ".tar.gz"))
138 (base32 "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"))))
139 (build-system gnu-build-system)
140 (outputs '("out" "doc" "static")) ;doc contains HTML documentation
142 `(#:configure-flags '("--enable-doc=yes" "--enable-tests=yes")
143 #:parallel-build? #f ;non-deterministic build failures may occur otherwise
144 #:parallel-tests? #f ;fails removing the same the files twice otherwise
145 #:phases (modify-phases %standard-phases
146 (add-after 'unpack 'patch-configure.ac
148 ;; spandsp looks at hard coded locations of the FHS to
150 (substitute* "configure.ac"
151 (("AC_MSG_CHECKING\\(for libxml/xmlmemory\\.h.*" all)
153 "PKG_CHECK_MODULES(XML2, libxml-2.0)\n"
154 "CPPFLAGS+=\" $XML2_CFLAGS\"\n")))
155 ;; Force a regeneration of the autotools build system.
156 (delete-file "autogen.sh")
157 (delete-file "configure")
159 (add-after 'unpack 'do-not-install-data-files
160 ;; The .tiff images produced for tests are not
161 ;; reproducible and it is not desirable to have those
164 (substitute* '("test-data/itu/fax/Makefile.am"
165 "test-data/etsi/fax/Makefile.am")
166 (("nobase_data_DATA")
169 (add-after 'install 'install-doc
170 (lambda* (#:key outputs #:allow-other-keys)
171 (let ((doc (string-append (assoc-ref outputs "doc")
172 "/share/doc/" ,name "-" ,version)))
173 (copy-recursively "doc/t38_manual" doc)
175 (add-after 'install 'move-static-libraries
176 (lambda* (#:key outputs #:allow-other-keys)
177 (let ((out (assoc-ref outputs "out"))
178 (static (assoc-ref outputs "static")))
179 (mkdir-p (string-append static "/lib"))
180 (with-directory-excursion out
181 (for-each (lambda (file)
183 (string-append static "/"
185 (find-files "lib" "\\.a$")))
188 `(("autoconf" ,autoconf)
189 ("automake" ,automake)
191 ("pkg-config" ,pkg-config)
195 ("libsndfile" ,libsndfile)
196 ("libjpeg" ,libjpeg-turbo) ;XXX: should be propagated from libtiff
200 ;; For the documentation
201 ("docbook-xml" ,docbook-xml-4.3)
202 ("docbook-xsl" ,docbook-xsl)
205 ("libxslt" ,libxslt)))
206 (synopsis "DSP library for telephony")
207 (description "SpanDSP is a library of DSP functions for telephony, in the
208 8000 sample per second world of E1s, T1s, and higher order PCM channels. It
209 contains low level functions, such as basic filters. It also contains higher
210 level functions, such as cadenced supervisory tone detection, and a complete
211 software FAX machine.")
212 (home-page "https://web.archive.org/web/20180626203108/\
213 https://www.soft-switch.org/index.html")
214 (license (list license:lgpl2.1+ ;for the library
215 license:gpl2+)))) ;for the test suites and support programs
217 (define-public commoncpp
223 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
226 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
229 (modify-phases %standard-phases
230 (add-before 'configure 'pre-configure
232 (substitute* "src/applog.cpp"
233 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
235 (build-system gnu-build-system)
236 (synopsis "(u)Common C++ framework for threaded applications")
237 (description "GNU Common C++ is an portable, optimized class framework for
238 threaded applications, supporting concurrent synchronization, inter-process
239 communications via sockets, and various methods for data handling, such as
240 serialization and XML parsing. It includes the uCommon C++ library, a smaller
242 (license license:gpl2+) ; plus runtime exception
243 (properties '((ftp-directory . "/gnu/commoncpp")
244 (upstream-name . "commoncpp2")))
245 (home-page "https://www.gnu.org/software/commoncpp/")))
247 (define-public ucommon
253 (uri (string-append "mirror://gnu/commoncpp/" name "-"
256 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
257 (build-system gnu-build-system)
258 (inputs `(("gnutls" ,gnutls)))
259 (synopsis "Common C++ framework for threaded applications")
260 (description "GNU uCommon C++ is meant as a very light-weight C++ library
261 to facilitate using C++ design patterns even for very deeply embedded
262 applications, such as for systems using uclibc along with posix threading
264 (license license:gpl3+)
265 (home-page "https://www.gnu.org/software/commoncpp/")
266 (properties '((ftp-directory . "/gnu/commoncpp")))))
274 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
277 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
278 (build-system gnu-build-system)
279 (inputs `(("ucommon" ,ucommon)
280 ("libgcrypt" ,libgcrypt)))
281 (native-inputs `(("pkg-config" ,pkg-config)))
282 (synopsis "Implementation of RTP (real-time transport protocol)")
283 (description "GNU ccRTP is an implementation of RTP, the real-time transport
284 protocol from the IETF. It is suitable both for high capacity servers and
285 personal client applications. It is flexible in its design, allowing it to
286 function as a framework for the framework, rather than just being a
287 packet-manipulation library.")
288 (license license:gpl2+) ; plus runtime exception
289 (home-page "https://www.gnu.org/software/ccrtp/")))
291 (define-public zrtpcpp
300 (url "https://github.com/wernerd/ZRTPCPP")
302 (string-append "V" version))))
304 (git-file-name name version))
307 "06vphvh4dgi7ah5qkq53wqvswv8l273x0xwbc447qmgvamm0x1vs"))))
308 (build-system cmake-build-system)
310 `(#:tests? #f)) ; No target
312 `(("pkg-config" ,pkg-config)))
315 ("ucommon" ,ucommon)))
316 (synopsis "C++ Implementation of ZRTP protocol")
317 (description "GNU ZRTP C++ provides a library that adds ZRTP support to the
318 GNU ccRTP stack and serves as library for other RTP stacks
319 (PJSIP, GStreamer).")
320 (home-page "https://www.gnu.org/software/ccrtp/zrtp")
321 (license license:lgpl3+)))
329 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
330 (patches (search-patches "osip-CVE-2017-7853.patch"))
333 "0kgnxgzf968kbl6rx3hjsfb3jsg4ydgrsf35gzj319i1f8qjifv1"))))
334 (build-system gnu-build-system)
336 (synopsis "Library implementing SIP (RFC-3261)")
337 (description "GNU oSIP is an implementation of the SIP protocol. It is
338 used to provide multimedia and telecom software developers with an interface
339 to initiate and control SIP sessions.")
340 (license license:lgpl2.1+)
341 (properties '((ftp-directory . "/gnu/osip")
342 (upstream-name . "libosip2")))
343 (home-page "https://www.gnu.org/software/osip/")))
346 (define-public exosip
352 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
355 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
356 (build-system gnu-build-system)
357 (inputs `(("osip" ,osip)))
358 (synopsis "Sip abstraction library")
359 (description "EXosip is a library that hides the complexity of using the
360 SIP protocol for multimedia session establishment. This protocol is mainly to
361 be used by VoIP telephony applications (endpoints or conference server) but
362 might be also useful for any application that wish to establish sessions like
364 (license license:gpl2+)
365 ;; (plus OpenSSL linking exception)
366 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
367 (home-page "https://savannah.nongnu.org/projects/exosip")))
369 (define-public sipwitch
375 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
378 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
379 (build-system gnu-build-system)
380 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
381 ;; cross-compiling. Among other issues there the program name "pkg-config"
382 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
383 ;; Fortunately we can avoid the use of pkg-config and set the dependency
385 (arguments `(#:configure-flags
386 `("--without-pkg-config"
387 ,(string-append "UCOMMON_CFLAGS=-I"
388 (assoc-ref %build-inputs "ucommon") "/include")
389 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
390 ,(string-append "LIBOSIP2_CFLAGS=-I"
391 (assoc-ref %build-inputs "osip") "/include")
392 "LIBOSIP2_LIBS=-losipparser2 -losip2"
393 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
395 "EXOSIP2_LIBS=-leXosip2"
396 ,(string-append "EXOSIP2_CFLAGS=-I"
397 (assoc-ref %build-inputs "exosip")
399 (inputs `(("ucommon" ,ucommon)
402 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
403 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
404 uses the SIP protocol. Calls can be made from behind NAT firewalls and
405 without the need for a service provider. Its peer-to-peer design ensures that
406 there is no central point for media intercept or capture and thus it can be
407 used to construct a secure telephone system that operates over the public
409 (license license:gpl3+)
410 (home-page "https://www.gnu.org/software/sipwitch/")))
412 (define-public libsrtp
419 (url "https://github.com/cisco/libsrtp")
420 (commit (string-append "v" version))))
421 (file-name (git-file-name name version))
424 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
426 `(("psmisc" ,psmisc) ;some tests require 'killall'
428 (build-system gnu-build-system)
430 '(#:test-target "runtest"
431 #:phases (modify-phases %standard-phases
432 (add-after 'build 'build-shared
433 (lambda* (#:key (make-flags '()) #:allow-other-keys)
434 ;; Build the shared library separately because
435 ;; the test runner requires a static build.
436 (apply invoke "make" "shared_library" make-flags)
438 (add-after 'install 'remove-static-library
439 (lambda* (#:key outputs #:allow-other-keys)
440 (delete-file (string-append (assoc-ref outputs "out")
443 (synopsis "Secure RTP (SRTP) Reference Implementation")
445 "This package provides an implementation of the Secure Real-time Transport
446 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
447 supporting cryptographic kernel.")
448 (home-page "https://github.com/cisco/libsrtp")
449 (license license:bsd-3)))
451 (define-public libiax2
452 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
453 ;; This is the commit used by the Ring Project.
456 (version (string-append "0.0.0-1." (string-take commit 7)))
461 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
463 (file-name (git-file-name name version))
466 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
467 (build-system gnu-build-system)
469 `(("autoconf" ,autoconf)
470 ("automake" ,automake)
471 ("libtool" ,libtool)))
472 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
473 (synopsis "Inter-Asterisk-Protocol library")
474 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
475 Voice-over-IP (VoIP) communications.")
476 ;; The file 'src/md5.c' is released into the public domain by RSA Data
477 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
478 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
479 ;; covered under the 'GPL'.
480 ;; The package as a whole is distributed under the LGPL 2.0.
481 (license (list license:lgpl2.0
482 license:public-domain
491 (uri (string-append "http://holdenc.altervista.org/"
492 "seren/downloads/seren-" version
496 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
497 (build-system gnu-build-system)
498 (arguments '(#:tests? #f)) ; no "check" target
500 `(("alsa-lib" ,alsa-lib)
505 (synopsis "Simple VoIP program to create conferences from the terminal")
507 "Seren is a simple VoIP program based on the Opus codec that allows you
508 to create a voice conference from the terminal, with up to 10 participants,
509 without having to register accounts, exchange emails, or add people to contact
510 lists. All you need to join an existing conference is the host name or IP
511 address of one of the participants.")
512 (home-page "http://holdenc.altervista.org/seren/")
513 (license license:gpl3+)))
515 (define-public mumble
521 (uri (string-append "https://mumble.info/snapshot/stable/"
522 name "-" version ".tar.gz"))
525 "1q91vp3bp7xn67g9kgp1pfgxjj1hks3w60vdxcfm3373wy5db5lz"))
526 (modules '((guix build utils)))
529 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
530 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
532 delete-file-recursively
533 '("3rdparty/GL" ; in mesa
534 "3rdparty/mach-override-build" ; for macx
535 "3rdparty/mach-override-src"
536 "3rdparty/minhook-build" ; for win32
537 "3rdparty/minhook-src"
538 "3rdparty/opus-build" ; in opus
540 "3rdparty/speex-build" ; in speex
542 "3rdparty/speexdsp-src" ; in speexdsp
543 "3rdparty/xinputcheck-build" ; for win32
544 "3rdparty/xinputcheck-src"))
546 (build-system qt-build-system)
548 `(#:tests? #f ; no "check" target
550 (modify-phases %standard-phases
552 (lambda* (#:key inputs outputs #:allow-other-keys)
553 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
554 (string-append "MUMBLE_PYTHON="
555 (string-append (assoc-ref inputs "python")
557 (string-append "CONFIG+="
559 ;; Options used are listed in the same order
560 ;; as in the "INSTALL" file
561 ;; (plus the final "packaged" and "release").
562 (list "no-bundled-speex" ; in speex
563 "no-bundled-opus" ; in opus
564 "no-g15" ; not packaged
565 "no-jackaudio" ; use pulse
567 "no-alsa" ; use pulse
569 "no-embed-qt-translations"
570 "no-ice" ; not packaged
573 (string-append "DEFINES+="
575 (assoc-ref outputs "out")
577 (add-before 'configure 'fix-libspeechd-include
579 (substitute* "src/mumble/TextToSpeech_unix.cpp"
580 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
582 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
583 (add-before 'configure 'fix-statistic-gathering-default
585 (substitute* "src/mumble/Settings.cpp"
586 (("bUsage = true;") "bUsage = false;"))
588 (add-before 'configure 'fix-mumble-overlay
589 (lambda* (#:key outputs #:allow-other-keys)
590 (with-output-to-file "scripts/mumble-overlay"
592 (format #t "#!~a~%" (which "bash"))
593 (format #t "export LD_PRELOAD=\"~a $LD_PRELOAD\"~%"
594 (string-append (assoc-ref outputs "out")
595 "/lib/mumble/libmumble.so.1"))
596 (format #t "exec \"${@}\"")))
598 (add-before 'install 'disable-murmur-ice
600 (substitute* "scripts/murmur.ini.system"
603 (replace 'install ; install phase does not exist
604 (lambda* (#:key inputs outputs #:allow-other-keys)
605 (let* ((out (assoc-ref outputs "out"))
606 (etc (string-append out "/etc/murmur"))
607 (dbus (string-append out "/etc/dbus-1/system.d/"))
608 (bin (string-append out "/bin"))
609 (services (string-append out "/share/services"))
610 (applications (string-append out "/share/applications"))
611 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
612 (man (string-append out "/share/man/man1"))
613 (lib (string-append out "/lib/mumble")))
614 (install-file "release/mumble" bin)
615 (install-file "scripts/mumble-overlay" bin)
616 (install-file "scripts/mumble.protocol" services)
617 (install-file "scripts/mumble.desktop" applications)
618 (install-file "icons/mumble.svg" icons)
619 (install-file "man/mumble-overlay.1" man)
620 (install-file "man/mumble.1" man)
621 (install-file "release/murmurd" bin)
622 (install-file "scripts/murmur.ini.system" etc)
623 (rename-file (string-append etc "/murmur.ini.system")
624 (string-append etc "/murmur.ini"))
625 (install-file "scripts/murmur.conf" dbus)
626 (install-file "man/murmurd.1" man)
627 (for-each (lambda (file) (install-file file lib))
628 (find-files "." "\\.so\\."))
629 (for-each (lambda (file) (install-file file lib))
630 (find-files "release/plugins" "\\.so$"))
635 ("libsndfile" ,libsndfile)
637 ("mesa" ,mesa) ; avoid bundled
639 ("opus" ,opus) ; avoid bundled
640 ("protobuf" ,protobuf)
641 ("pulseaudio" ,pulseaudio)
644 ("speech-dispatcher" ,speech-dispatcher)
645 ("speex" ,speex) ; avoid bundled
646 ("speexdsp" ,speexdsp))) ; avoid bundled
648 `(("pkg-config" ,pkg-config)
650 ("qttools" ,qttools)))
651 (synopsis "Low-latency, high quality voice chat software")
653 "Mumble is an low-latency, high quality voice chat
654 software primarily intended for use while gaming.
655 Mumble consists of two applications for separate usage:
656 @code{mumble} for the client, and @code{murmur} for the server.")
657 (home-page "https://wiki.mumble.info/wiki/Main_Page")
658 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
659 license:bsd-2 ; celt-0.11.0
660 license:isc)))) ; arc4random
662 (define-public twinkle
671 (url "https://github.com/LubosD/twinkle")
673 (string-append "v" version))))
675 (git-file-name name version))
677 (search-patches "twinkle-bcg729.patch")) ; To support new BCG729 API.
680 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
681 (build-system qt-build-system)
683 `(#:tests? #f ; no test target
686 ;; FIX-ME: Make Twinkle compatible with libre version of iLBC.
687 ;; "-DWITH_ILBC=On" ; For iLBC Codec Support
688 "-DWITH_ZRTP=On" ; For ZRTP Support
689 "-DWITH_G729=On" ; For G729 Codec Support
690 "-DWITH_SPEEX=On"))) ; For Speex Codec Support
694 ("qttools" ,qttools)))
696 `(("alsa-lib" ,alsa-lib)
702 ("libsndfile" ,libsndfile)
705 ("qtdeclarative" ,qtdeclarative)
706 ("qtquickcontrols" ,qtquickcontrols)
707 ("readline" ,readline)
709 ("speexdsp" ,speexdsp)
710 ("ucommon" ,ucommon)))
711 (synopsis "Softphone for voice over IP and instant messaging")
712 (description "Twinkle is a softphone for your voice over IP and instant
713 messaging communcations using the SIP protocol. You can use it for direct
714 IP phone to IP phone communication or in a network using a SIP proxy to route
715 your calls and messages.")
716 (home-page "http://twinkle.dolezel.info/")
717 (license license:gpl2+)))
719 (define-public pjproject
727 (url "https://github.com/pjsip/pjproject")
729 (file-name (git-file-name name version))
732 "1aklicpgwc88578k03i5d5cm5h8mfm7hmx8vfprchbmaa2p8f4z0"))
733 (modules '((guix build utils)))
734 ;; The patches upstream status can be tracked at:
735 ;; https://github.com/pjsip/pjproject/pull/2501.
736 (patches (search-patches "pjproject-correct-the-cflags-field.patch"
737 "pjproject-fix-pkg-config-ldflags.patch"))
740 ;; Remove bundled libraries.
741 (delete-file-recursively "third_party")
742 (substitute* "aconfigure.ac"
743 (("third_party/build/os-auto.mak") ""))
744 (substitute* "Makefile"
745 (("third_party/build") ""))
747 (build-system gnu-build-system)
748 (outputs '("out" "debug"))
751 #:test-target "selftest"
753 (list "--with-external-speex"
754 "--with-external-gsm"
755 "--with-external-srtp"
757 ;; The following flag is Linux specific.
758 ,@(if (string-contains (or (%current-system)
759 (%current-target-system)) "linux")
762 "--with-gnutls" ;disable OpenSSL checks
763 "--disable-libyuv" ;TODO: add missing package
764 "--disable-silk" ;TODO: add missing package
765 "--disable-libwebrtc" ;TODO: add missing package
766 "--disable-ilbc-codec" ;cannot be unbundled
767 "--disable-g7221-codec" ;TODO: add missing package
768 "--enable-libsamplerate"
769 ;; -DNDEBUG is set to prevent pjproject from raising
770 ;; assertions that aren't critical, crashing
771 ;; applications as the result.
774 (modify-phases %standard-phases
775 (add-after 'unpack 'make-source-files-writable
776 ;; Make all the files writable to prevent the following error:
777 ;; "autom4te: cannot open aconfigure: Permission denied".
779 (for-each make-file-writable (find-files "."))
781 (add-before 'build 'build-dep
782 (lambda _ (invoke "make" "dep")))
783 (add-before 'patch-source-shebangs 'autoconf
785 (invoke "autoconf" "-v" "-f" "-i" "-o"
786 "aconfigure" "aconfigure.ac")))
787 (add-before 'autoconf 'disable-some-tests
789 (substitute* "pjlib/src/pjlib-test/test.h"
790 ;; Disable network tests which are slow and/or require an
792 (("#define GROUP_NETWORK.*")
793 "#define GROUP_NETWORK 0\n"))
794 (substitute* "self-test.mak"
795 ;; Fails with: pjlib-util-test-x86_64-unknown-linux-gnu:
796 ;; ../src/pjlib-util-test/resolver_test.c:1501: action2_1:
797 ;; Assertio n `pj_strcmp2(&pkt->q[0].name, "_sip._udp."
798 ;; "domain2.com")==0' failed.
799 ((" pjlib_util_test ") ""))
800 (substitute* "pjsip/src/test/test.h"
801 ;; Fails with: Error: unable to acquire TCP transport:
802 ;; [pj_status_t=120101] Network is unreachable.
803 (("#define INCLUDE_TCP_TEST.*")
804 "#define INCLUDE_TCP_TEST 0\n")
805 ;; The TSX tests takes a very long time to run; skip them.
806 (("#define INCLUDE_TSX_GROUP.*")
807 "#define INCLUDE_TSX_GROUP 0\n"))
808 (substitute* "pjsip/src/test/dns_test.c"
809 ;; The round_robin_test fails non-deterministically (depending
810 ;; on load); skip it (see:
811 ;; https://github.com/pjsip/pjproject/issues/2500).
812 (("round_robin_test(pool)") 0))
813 (substitute* "pjmedia/src/test/test.h"
814 ;; The following tests require a sound card.
815 (("#define HAS_MIPS_TEST.*")
816 "#define HAS_MIPS_TEST 0\n")
817 (("#define HAS_JBUF_TEST.*")
818 "#define HAS_JBUF_TEST 0\n"))
819 (substitute* "Makefile"
820 ;; Disable the pjnath and pjsua tests, which require an actual
821 ;; network and an actual sound card, respectively.
822 (("pjnath-test pjmedia-test pjsip-test pjsua-test")
823 "pjmedia-test pjsip-test"))
826 `(("autoconf" ,autoconf)
827 ("automake" ,automake)
829 ("pkg-config" ,pkg-config)))
834 ("libsamplerate" ,libsamplerate)
837 ("portaudio" ,portaudio)
839 ("speexdsp" ,speexdsp)))
840 (home-page "https://www.pjsip.org")
841 (synopsis "Session Initiation Protocol (SIP) stack")
842 (description "PJProject provides an implementation of the Session
843 Initiation Protocol (SIP) and a multimedia framework.")
844 (license license:gpl2+)))
846 (define-public libtgvoip
854 (url "https://github.com/grishka/libtgvoip")
856 (file-name (git-file-name name version))
857 ;; Fix compilation on i686-linux architecture.
858 ;; NOTE: Applying these patches is order-dependent!
859 ;; The patch for WebRTC /must/ precede the patch for SSE2.
861 (search-patches "libtgvoip-disable-webrtc.patch"
862 "libtgvoip-disable-sse2.patch"))
865 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
866 (build-system gnu-build-system)
868 `(("alsa-lib" ,alsa-lib)
869 ("libopusenc" ,libopusenc)
871 ("pulseaudio" ,pulseaudio)))
872 (synopsis "VoIP library for Telegram clients")
873 (description "A collection of libraries and header files for implementing
874 telephony functionality into custom Telegram clients.")
875 (home-page "https://github.com/zevlg/libtgvoip")
876 (license license:unlicense)))