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, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
21 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
22 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages telephony)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages admin)
42 #:use-module (gnu packages aidc)
43 #:use-module (gnu packages algebra)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages avahi)
46 #:use-module (gnu packages audio)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages boost)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages crypto)
52 #:use-module (gnu packages databases)
53 #:use-module (gnu packages docbook)
54 #:use-module (gnu packages documentation)
55 #:use-module (gnu packages file)
56 #:use-module (gnu packages protobuf)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gnupg)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages image)
64 #:use-module (gnu packages libcanberra)
65 #:use-module (gnu packages linphone)
66 #:use-module (gnu packages linux)
67 #:use-module (gnu packages multiprecision)
68 #:use-module (gnu packages ncurses)
69 #:use-module (gnu packages netpbm)
70 #:use-module (gnu packages networking)
71 #:use-module (gnu packages pcre)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages pulseaudio)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages qt)
77 #:use-module (gnu packages serialization)
78 #:use-module (gnu packages speech)
79 #:use-module (gnu packages tls)
80 #:use-module (gnu packages upnp)
81 #:use-module (gnu packages video)
82 #:use-module (gnu packages webkit)
83 #:use-module (gnu packages xiph)
84 #:use-module (gnu packages xorg)
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages readline)
87 #:use-module (gnu packages bison)
88 #:use-module (gnu packages flex)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (guix packages)
91 #:use-module (guix download)
92 #:use-module (guix git-download)
93 #:use-module (guix build-system cmake)
94 #:use-module (guix build-system gnu)
95 #:use-module (guix build-system qt))
97 (define-public libilbc
106 (url "https://github.com/TimothyGu/libilbc")
108 (string-append "v" version))))
110 (git-file-name name version))
113 "1j1pn1w1198qvdiq2hgv9hkyq2nqcvmfnwlgppac633idkjnjrqx"))))
114 (build-system cmake-build-system)
116 `(#:tests? #f)) ; No target
118 `(("pkg-config" ,pkg-config)))
119 (synopsis "Libre iLBC codec")
120 (description "LibiLBC is a packaging friendly copy of the iLBC codec from
121 the WebRTC project. It provides a base for distribution packages and can be
122 used as drop-in replacement for the non-free code from RFC 3591.")
123 (home-page "https://github.com/TimothyGu/libilbc")
124 (license license:bsd-3)))
126 (define-public spandsp
134 ;; The original upstream has been down since the end of March 2020.
135 (string-append "https://web.archive.org/web/20180626203108/"
136 "https://www.soft-switch.org/downloads/" name "/"
137 name "-" version ".tar.gz"))
139 (base32 "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"))))
140 (build-system gnu-build-system)
141 (outputs '("out" "doc" "static")) ;doc contains HTML documentation
143 `(#:configure-flags '("--enable-doc=yes" "--enable-tests=yes")
144 #:parallel-build? #f ;non-deterministic build failures may occur otherwise
145 #:parallel-tests? #f ;fails removing the same the files twice otherwise
146 #:phases (modify-phases %standard-phases
147 (add-after 'unpack 'patch-configure.ac
149 ;; spandsp looks at hard coded locations of the FHS to
151 (substitute* "configure.ac"
152 (("AC_MSG_CHECKING\\(for libxml/xmlmemory\\.h.*" all)
154 "PKG_CHECK_MODULES(XML2, libxml-2.0)\n"
155 "CPPFLAGS+=\" $XML2_CFLAGS\"\n")))
156 ;; Force a regeneration of the autotools build system.
157 (delete-file "autogen.sh")
158 (delete-file "configure")
160 (add-after 'unpack 'do-not-install-data-files
161 ;; The .tiff images produced for tests are not
162 ;; reproducible and it is not desirable to have those
165 (substitute* '("test-data/itu/fax/Makefile.am"
166 "test-data/etsi/fax/Makefile.am")
167 (("nobase_data_DATA")
170 (add-after 'install 'install-doc
171 (lambda* (#:key outputs #:allow-other-keys)
172 (let ((doc (string-append (assoc-ref outputs "doc")
173 "/share/doc/" ,name "-" ,version)))
174 (copy-recursively "doc/t38_manual" doc)
176 (add-after 'install 'move-static-libraries
177 (lambda* (#:key outputs #:allow-other-keys)
178 (let ((out (assoc-ref outputs "out"))
179 (static (assoc-ref outputs "static")))
180 (mkdir-p (string-append static "/lib"))
181 (with-directory-excursion out
182 (for-each (lambda (file)
184 (string-append static "/"
186 (find-files "lib" "\\.a$")))
189 `(("autoconf" ,autoconf)
190 ("automake" ,automake)
192 ("pkg-config" ,pkg-config)
196 ("libsndfile" ,libsndfile)
197 ("libjpeg" ,libjpeg-turbo) ;XXX: should be propagated from libtiff
201 ;; For the documentation
202 ("docbook-xml" ,docbook-xml-4.3)
203 ("docbook-xsl" ,docbook-xsl)
206 ("libxslt" ,libxslt)))
207 (synopsis "DSP library for telephony")
208 (description "SpanDSP is a library of DSP functions for telephony, in the
209 8000 sample per second world of E1s, T1s, and higher order PCM channels. It
210 contains low level functions, such as basic filters. It also contains higher
211 level functions, such as cadenced supervisory tone detection, and a complete
212 software FAX machine.")
213 (home-page "https://web.archive.org/web/20180626203108/\
214 https://www.soft-switch.org/index.html")
215 (license (list license:lgpl2.1+ ;for the library
216 license:gpl2+)))) ;for the test suites and support programs
218 (define-public commoncpp
224 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
227 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
230 (modify-phases %standard-phases
231 (add-before 'configure 'pre-configure
233 (substitute* "src/applog.cpp"
234 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
236 (build-system gnu-build-system)
237 (synopsis "(u)Common C++ framework for threaded applications")
238 (description "GNU Common C++ is an portable, optimized class framework for
239 threaded applications, supporting concurrent synchronization, inter-process
240 communications via sockets, and various methods for data handling, such as
241 serialization and XML parsing. It includes the uCommon C++ library, a smaller
243 (license license:gpl2+) ; plus runtime exception
244 (properties '((ftp-directory . "/gnu/commoncpp")
245 (upstream-name . "commoncpp2")))
246 (home-page "https://www.gnu.org/software/commoncpp/")))
248 (define-public ucommon
254 (uri (string-append "mirror://gnu/commoncpp/" name "-"
257 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
258 (build-system gnu-build-system)
259 (inputs `(("gnutls" ,gnutls)))
260 (synopsis "Common C++ framework for threaded applications")
261 (description "GNU uCommon C++ is meant as a very light-weight C++ library
262 to facilitate using C++ design patterns even for very deeply embedded
263 applications, such as for systems using uclibc along with posix threading
265 (license license:gpl3+)
266 (home-page "https://www.gnu.org/software/commoncpp/")
267 (properties '((ftp-directory . "/gnu/commoncpp")))))
275 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
278 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
279 (build-system gnu-build-system)
280 (inputs `(("ucommon" ,ucommon)
281 ("libgcrypt" ,libgcrypt)))
282 (native-inputs `(("pkg-config" ,pkg-config)))
283 (synopsis "Implementation of RTP (real-time transport protocol)")
284 (description "GNU ccRTP is an implementation of RTP, the real-time transport
285 protocol from the IETF. It is suitable both for high capacity servers and
286 personal client applications. It is flexible in its design, allowing it to
287 function as a framework for the framework, rather than just being a
288 packet-manipulation library.")
289 (license license:gpl2+) ; plus runtime exception
290 (home-page "https://www.gnu.org/software/ccrtp/")))
292 (define-public zrtpcpp
301 (url "https://github.com/wernerd/ZRTPCPP")
303 (string-append "V" version))))
305 (git-file-name name version))
308 "06vphvh4dgi7ah5qkq53wqvswv8l273x0xwbc447qmgvamm0x1vs"))))
309 (build-system cmake-build-system)
311 `(#:tests? #f)) ; No target
313 `(("pkg-config" ,pkg-config)))
316 ("ucommon" ,ucommon)))
317 (synopsis "C++ Implementation of ZRTP protocol")
318 (description "GNU ZRTP C++ provides a library that adds ZRTP support to the
319 GNU ccRTP stack and serves as library for other RTP stacks
320 (PJSIP, GStreamer).")
321 (home-page "https://www.gnu.org/software/ccrtp/zrtp")
322 (license license:lgpl3+)))
330 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
331 (patches (search-patches "osip-CVE-2017-7853.patch"))
334 "0xdk3cszkzb8nb757gl47slrr13mf6xz43ab4k343fv8llp8pd2g"))))
335 (build-system gnu-build-system)
337 (synopsis "Library implementing SIP (RFC-3261)")
338 (description "GNU oSIP is an implementation of the SIP protocol. It is
339 used to provide multimedia and telecom software developers with an interface
340 to initiate and control SIP sessions.")
341 (license license:lgpl2.1+)
342 (properties '((ftp-directory . "/gnu/osip")
343 (upstream-name . "libosip2")))
344 (home-page "https://www.gnu.org/software/osip/")))
347 (define-public exosip
353 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
356 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
357 (build-system gnu-build-system)
358 (inputs `(("osip" ,osip)))
359 (synopsis "Sip abstraction library")
360 (description "EXosip is a library that hides the complexity of using the
361 SIP protocol for multimedia session establishment. This protocol is mainly to
362 be used by VoIP telephony applications (endpoints or conference server) but
363 might be also useful for any application that wish to establish sessions like
365 (license license:gpl2+)
366 ;; (plus OpenSSL linking exception)
367 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
368 (home-page "https://savannah.nongnu.org/projects/exosip")))
370 (define-public sipwitch
376 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
379 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
380 (build-system gnu-build-system)
381 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
382 ;; cross-compiling. Among other issues there the program name "pkg-config"
383 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
384 ;; Fortunately we can avoid the use of pkg-config and set the dependency
386 (arguments `(#:configure-flags
387 `("--without-pkg-config"
388 ,(string-append "UCOMMON_CFLAGS=-I"
389 (assoc-ref %build-inputs "ucommon") "/include")
390 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
391 ,(string-append "LIBOSIP2_CFLAGS=-I"
392 (assoc-ref %build-inputs "osip") "/include")
393 "LIBOSIP2_LIBS=-losipparser2 -losip2"
394 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
396 "EXOSIP2_LIBS=-leXosip2"
397 ,(string-append "EXOSIP2_CFLAGS=-I"
398 (assoc-ref %build-inputs "exosip")
400 (inputs `(("ucommon" ,ucommon)
403 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
404 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
405 uses the SIP protocol. Calls can be made from behind NAT firewalls and
406 without the need for a service provider. Its peer-to-peer design ensures that
407 there is no central point for media intercept or capture and thus it can be
408 used to construct a secure telephone system that operates over the public
410 (license license:gpl3+)
411 (home-page "https://www.gnu.org/software/sipwitch/")))
413 (define-public libsrtp
420 (url "https://github.com/cisco/libsrtp")
421 (commit (string-append "v" version))))
422 (file-name (git-file-name name version))
425 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
427 `(("psmisc" ,psmisc) ;some tests require 'killall'
429 (build-system gnu-build-system)
431 '(#:test-target "runtest"
432 #:phases (modify-phases %standard-phases
433 (add-after 'build 'build-shared
434 (lambda* (#:key (make-flags '()) #:allow-other-keys)
435 ;; Build the shared library separately because
436 ;; the test runner requires a static build.
437 (apply invoke "make" "shared_library" make-flags)
439 (add-after 'install 'remove-static-library
440 (lambda* (#:key outputs #:allow-other-keys)
441 (delete-file (string-append (assoc-ref outputs "out")
444 (synopsis "Secure RTP (SRTP) Reference Implementation")
446 "This package provides an implementation of the Secure Real-time Transport
447 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
448 supporting cryptographic kernel.")
449 (home-page "https://github.com/cisco/libsrtp")
450 (license license:bsd-3)))
452 (define-public libiax2
453 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
454 ;; This is the commit used by the Ring Project.
457 (version (string-append "0.0.0-1." (string-take commit 7)))
462 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
464 (file-name (git-file-name name version))
467 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
468 (build-system gnu-build-system)
470 `(("autoconf" ,autoconf)
471 ("automake" ,automake)
472 ("libtool" ,libtool)))
473 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
474 (synopsis "Inter-Asterisk-Protocol library")
475 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
476 Voice-over-IP (VoIP) communications.")
477 ;; The file 'src/md5.c' is released into the public domain by RSA Data
478 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
479 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
480 ;; covered under the 'GPL'.
481 ;; The package as a whole is distributed under the LGPL 2.0.
482 (license (list license:lgpl2.0
483 license:public-domain
492 (uri (string-append "http://holdenc.altervista.org/"
493 "seren/downloads/seren-" version
497 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
498 (build-system gnu-build-system)
499 (arguments '(#:tests? #f)) ; no "check" target
501 `(("alsa-lib" ,alsa-lib)
506 (synopsis "Simple VoIP program to create conferences from the terminal")
508 "Seren is a simple VoIP program based on the Opus codec that allows you
509 to create a voice conference from the terminal, with up to 10 participants,
510 without having to register accounts, exchange emails, or add people to contact
511 lists. All you need to join an existing conference is the host name or IP
512 address of one of the participants.")
513 (home-page "http://holdenc.altervista.org/seren/")
514 (license license:gpl3+)))
516 (define-public mumble
524 "https://github.com/mumble-voip/mumble/releases/download/"
525 version "/" name "-" version ".tar.gz"))
528 "14v0rgy1a5alxmz7ly95y38bdj0hx79yysgkcd8r8p9qqfzlwpv1"))
529 (modules '((guix build utils)
544 (with-directory-excursion "3rdparty"
545 (for-each delete-file-recursively
546 (lset-difference string=?
548 (cons* "." ".." keep))))
550 (build-system qt-build-system)
552 `(#:tests? #f ; no "check" target
554 (modify-phases %standard-phases
556 (lambda* (#:key inputs outputs #:allow-other-keys)
557 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
558 (string-append "MUMBLE_PYTHON="
559 (string-append (assoc-ref inputs "python")
561 (string-append "CONFIG+="
563 ;; Options used are listed in the same order
564 ;; as in the "INSTALL" file
565 ;; (plus the final "packaged" and "release").
566 (list "no-bundled-speex" ; in speex
567 "no-bundled-opus" ; in opus
568 "no-g15" ; not packaged
569 "no-jackaudio" ; use pulse
571 "no-alsa" ; use pulse
573 "no-embed-qt-translations"
574 "no-ice" ; not packaged
577 (string-append "DEFINES+="
579 (assoc-ref outputs "out")
581 (add-before 'configure 'fix-libspeechd-include
583 (substitute* "src/mumble/TextToSpeech_unix.cpp"
584 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
586 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
587 (add-before 'configure 'fix-statistic-gathering-default
589 (substitute* "src/mumble/Settings.cpp"
590 (("bUsage = true;") "bUsage = false;"))
592 (add-before 'configure 'fix-mumble-overlay
593 (lambda* (#:key outputs #:allow-other-keys)
594 (with-output-to-file "scripts/mumble-overlay"
596 (format #t "#!~a~%" (which "bash"))
597 (format #t "export LD_PRELOAD=\"~a $LD_PRELOAD\"~%"
598 (string-append (assoc-ref outputs "out")
599 "/lib/mumble/libmumble.so.1"))
600 (format #t "exec \"${@}\"")))
602 (add-before 'install 'disable-murmur-ice
604 (substitute* "scripts/murmur.ini.system"
607 (replace 'install ; install phase does not exist
608 (lambda* (#:key inputs outputs #:allow-other-keys)
609 (let* ((out (assoc-ref outputs "out"))
610 (etc (string-append out "/etc/murmur"))
611 (dbus (string-append out "/etc/dbus-1/system.d/"))
612 (bin (string-append out "/bin"))
613 (services (string-append out "/share/services"))
614 (applications (string-append out "/share/applications"))
615 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
616 (man (string-append out "/share/man/man1"))
617 (lib (string-append out "/lib/mumble")))
618 (install-file "release/mumble" bin)
619 (install-file "scripts/mumble-overlay" bin)
620 (install-file "scripts/mumble.protocol" services)
621 (install-file "scripts/mumble.desktop" applications)
622 (install-file "icons/mumble.svg" icons)
623 (install-file "man/mumble-overlay.1" man)
624 (install-file "man/mumble.1" man)
625 (install-file "release/murmurd" bin)
626 (install-file "scripts/murmur.ini.system" etc)
627 (rename-file (string-append etc "/murmur.ini.system")
628 (string-append etc "/murmur.ini"))
629 (install-file "scripts/murmur.conf" dbus)
630 (install-file "man/murmurd.1" man)
631 (for-each (lambda (file) (install-file file lib))
632 (find-files "." "\\.so\\."))
633 (for-each (lambda (file) (install-file file lib))
634 (find-files "release/plugins" "\\.so$"))
639 ("libsndfile" ,libsndfile)
641 ("mesa" ,mesa) ; avoid bundled
643 ("opus" ,opus) ; avoid bundled
644 ("protobuf" ,protobuf)
645 ("pulseaudio" ,pulseaudio)
648 ("speech-dispatcher" ,speech-dispatcher)
649 ("speex" ,speex) ; avoid bundled
650 ("speexdsp" ,speexdsp))) ; avoid bundled
652 `(("pkg-config" ,pkg-config)
654 ("qttools" ,qttools)))
655 (synopsis "Low-latency, high quality voice chat software")
657 "Mumble is an low-latency, high quality voice chat
658 software primarily intended for use while gaming.
659 Mumble consists of two applications for separate usage:
660 @code{mumble} for the client, and @code{murmur} for the server.")
661 (home-page "https://wiki.mumble.info/wiki/Main_Page")
662 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
663 license:bsd-2 ; celt-0.11.0
664 license:isc)))) ; arc4random
666 (define-public twinkle
675 (url "https://github.com/LubosD/twinkle")
677 (string-append "v" version))))
679 (git-file-name name version))
681 (search-patches "twinkle-bcg729.patch")) ; To support new BCG729 API.
684 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
685 (build-system qt-build-system)
687 `(#:tests? #f ; no test target
690 ;; FIX-ME: Make Twinkle compatible with libre version of iLBC.
691 ;; "-DWITH_ILBC=On" ; For iLBC Codec Support
692 "-DWITH_ZRTP=On" ; For ZRTP Support
693 "-DWITH_G729=On" ; For G729 Codec Support
694 "-DWITH_SPEEX=On"))) ; For Speex Codec Support
698 ("qttools" ,qttools)))
700 `(("alsa-lib" ,alsa-lib)
706 ("libsndfile" ,libsndfile)
709 ("qtdeclarative" ,qtdeclarative)
710 ("qtquickcontrols" ,qtquickcontrols)
711 ("readline" ,readline)
713 ("speexdsp" ,speexdsp)
714 ("ucommon" ,ucommon)))
715 (synopsis "Softphone for voice over IP and instant messaging")
716 (description "Twinkle is a softphone for your voice over IP and instant
717 messaging communcations using the SIP protocol. You can use it for direct
718 IP phone to IP phone communication or in a network using a SIP proxy to route
719 your calls and messages.")
720 (home-page "http://twinkle.dolezel.info/")
721 (license license:gpl2+)))
723 (define-public pjproject
731 (url "https://github.com/pjsip/pjproject")
733 (file-name (git-file-name name version))
736 "1kn9g1x1vmh4130ghph8mldz5m89gsjs4vpdzlzm98m3808gk5an"))
737 (modules '((guix build utils)))
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") ""))))))
746 (build-system gnu-build-system)
747 (outputs '("out" "debug" "static"))
750 #:test-target "selftest"
752 (list "--enable-shared"
753 "--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.
773 ;; Specify a runpath reference to itself, which is missing and
774 ;; causes the validate-runpath phase to fail.
775 (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
778 (modify-phases %standard-phases
779 (add-after 'unpack 'make-source-files-writable
780 ;; Make all the files writable to prevent the following error:
781 ;; "autom4te: cannot open aconfigure: Permission denied".
783 (for-each make-file-writable (find-files "."))))
784 (add-before 'build 'build-dep
785 (lambda _ (invoke "make" "dep")))
786 ;; The check phases is moved after the install phase so to
787 ;; use the installed shared libraries for the tests.
789 (add-after 'install 'move-static-libraries
790 (lambda* (#:key outputs #:allow-other-keys)
791 (let ((out (assoc-ref outputs "out"))
792 (s (string-append (assoc-ref outputs "static") "/lib")))
794 (with-directory-excursion out
795 (for-each (lambda (f)
796 (rename-file f (string-append s "/" (basename f))))
797 (find-files "." "\\.a$"))))))
798 (add-after 'install 'check
799 (assoc-ref %standard-phases 'check))
800 (add-before 'patch-source-shebangs 'autoconf
802 (invoke "autoconf" "-v" "-f" "-i" "-o"
803 "aconfigure" "aconfigure.ac")))
804 (add-before 'autoconf 'disable-some-tests
806 (substitute* "pjlib/src/pjlib-test/test.h"
807 ;; Disable network tests which are slow and/or require an
809 (("#define GROUP_NETWORK.*")
810 "#define GROUP_NETWORK 0\n"))
811 (substitute* "self-test.mak"
812 ;; Fails with: pjlib-util-test-x86_64-unknown-linux-gnu:
813 ;; ../src/pjlib-util-test/resolver_test.c:1501: action2_1:
814 ;; Assertio n `pj_strcmp2(&pkt->q[0].name, "_sip._udp."
815 ;; "domain2.com")==0' failed.
816 ((" pjlib_util_test ") ""))
817 (substitute* "pjsip/src/test/test.h"
818 ;; Fails with: Error: unable to acquire TCP transport:
819 ;; [pj_status_t=120101] Network is unreachable.
820 (("#define INCLUDE_TCP_TEST.*")
821 "#define INCLUDE_TCP_TEST 0\n")
822 ;; The TSX tests takes a very long time to run; skip them.
823 (("#define INCLUDE_TSX_GROUP.*")
824 "#define INCLUDE_TSX_GROUP 0\n"))
825 (substitute* "pjsip/src/test/dns_test.c"
826 ;; The round_robin_test fails non-deterministically (depending
827 ;; on load); skip it (see:
828 ;; https://github.com/pjsip/pjproject/issues/2500).
829 (("round_robin_test(pool)") 0))
830 (substitute* "pjmedia/src/test/test.h"
831 ;; The following tests require a sound card.
832 (("#define HAS_MIPS_TEST.*")
833 "#define HAS_MIPS_TEST 0\n")
834 (("#define HAS_JBUF_TEST.*")
835 "#define HAS_JBUF_TEST 0\n"))
836 (substitute* "Makefile"
837 ;; Disable the pjnath and pjsua tests, which require an actual
838 ;; network and an actual sound card, respectively.
839 (("pjnath-test pjmedia-test pjsip-test pjsua-test")
840 "pjmedia-test pjsip-test")))))))
842 `(("autoconf" ,autoconf)
843 ("automake" ,automake)
845 ("pkg-config" ,pkg-config)))
850 ("libsamplerate" ,libsamplerate)
853 ("portaudio" ,portaudio)
855 ("speexdsp" ,speexdsp)))
856 (home-page "https://www.pjsip.org")
857 (synopsis "Session Initiation Protocol (SIP) stack")
858 (description "PJProject provides an implementation of the Session
859 Initiation Protocol (SIP) and a multimedia framework.")
860 (license license:gpl2+)))
862 (define-public libtgvoip
870 (url "https://github.com/grishka/libtgvoip")
872 (file-name (git-file-name name version))
873 ;; Fix compilation on i686-linux architecture.
874 ;; NOTE: Applying these patches is order-dependent!
875 ;; The patch for WebRTC /must/ precede the patch for SSE2.
877 (search-patches "libtgvoip-disable-webrtc.patch"
878 "libtgvoip-disable-sse2.patch"))
881 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
882 (build-system gnu-build-system)
884 `(("alsa-lib" ,alsa-lib)
887 ("pulseaudio" ,pulseaudio)))
890 (modify-phases %standard-phases
891 ;; libtgvoip wants to dlopen libpulse and libasound, so tell it where
893 (add-after 'unpack 'patch-dlopen
894 (lambda* (#:key inputs #:allow-other-keys)
895 (substitute* "os/linux/AudioPulse.cpp"
897 (string-append (assoc-ref inputs "pulseaudio")
898 "/lib/libpulse.so")))
899 (substitute* '("os/linux/AudioInputALSA.cpp"
900 "os/linux/AudioOutputALSA.cpp")
902 (string-append (assoc-ref inputs "alsa-lib")
903 "/lib/libasound.so")))
905 (synopsis "VoIP library for Telegram clients")
906 (description "A collection of libraries and header files for implementing
907 telephony functionality into custom Telegram clients.")
908 (home-page "https://github.com/zevlg/libtgvoip")
909 (license license:unlicense)))