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, 2021 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>
23 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
24 ;;; Copyright © 2021 Demis Balbach <db@minikn.xyz>
26 ;;; This file is part of GNU Guix.
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41 (define-module (gnu packages telephony)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages admin)
44 #:use-module (gnu packages aidc)
45 #:use-module (gnu packages algebra)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages avahi)
48 #:use-module (gnu packages audio)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages check)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages cpp)
54 #:use-module (gnu packages crypto)
55 #:use-module (gnu packages databases)
56 #:use-module (gnu packages docbook)
57 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages file)
59 #:use-module (gnu packages protobuf)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages gl)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages gnupg)
65 #:use-module (gnu packages gtk)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages libcanberra)
68 #:use-module (gnu packages linphone)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages multiprecision)
71 #:use-module (gnu packages ncurses)
72 #:use-module (gnu packages netpbm)
73 #:use-module (gnu packages networking)
74 #:use-module (gnu packages pcre)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages pulseaudio)
78 #:use-module (gnu packages python)
79 #:use-module (gnu packages qt)
80 #:use-module (gnu packages serialization)
81 #:use-module (gnu packages speech)
82 #:use-module (gnu packages tls)
83 #:use-module (gnu packages upnp)
84 #:use-module (gnu packages video)
85 #:use-module (gnu packages webkit)
86 #:use-module (gnu packages xiph)
87 #:use-module (gnu packages xorg)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages readline)
90 #:use-module (gnu packages bison)
91 #:use-module (gnu packages flex)
92 #:use-module ((guix licenses) #:prefix license:)
93 #:use-module (guix utils)
94 #:use-module (guix packages)
95 #:use-module (guix gexp)
96 #:use-module (guix download)
97 #:use-module (guix git-download)
98 #:use-module (guix build-system cmake)
99 #:use-module (guix build-system gnu)
100 #:use-module (guix build-system qt))
102 (define-public phonesim
110 (url "https://git.kernel.org/pub/scm/network/ofono/phonesim")
111 (commit "a7c844d45b047b2dae5b0877816c346fce4c47b9")))
112 (file-name (git-file-name name version))
114 (base32 "0rc1c2vr03dmi1dr3skj57v77ga9c22g29xs1qiphqms4isby9cq"))))
115 (build-system gnu-build-system)
118 (list "--enable-maintainer-mode"
119 "CC=" ,(cc-for-target))))
121 (list automake autoconf pkg-config))
123 (list qtbase-5 qtdeclarative-5))
124 (synopsis "Phone Simulator for modem testing")
126 "Phonesim is a modem emulator that oFono uses for development and
127 testing. This allows oFono to be used by any host without requiring special
128 GSM (or other) hardware.")
129 (home-page "https://git.kernel.org/pub/scm/network/ofono/phonesim")
130 (license license:gpl2+)))
132 (define-public libilbc
141 (url "https://github.com/TimothyGu/libilbc")
143 (string-append "v" version))))
145 (git-file-name name version))
148 "1j1pn1w1198qvdiq2hgv9hkyq2nqcvmfnwlgppac633idkjnjrqx"))))
149 (build-system cmake-build-system)
151 `(#:tests? #f)) ; No target
154 (synopsis "Libre iLBC codec")
155 (description "LibiLBC is a packaging friendly copy of the iLBC codec from
156 the WebRTC project. It provides a base for distribution packages and can be
157 used as drop-in replacement for the non-free code from RFC 3591.")
158 (home-page "https://github.com/TimothyGu/libilbc")
159 (license license:bsd-3)))
161 (define-public spandsp
169 ;; The original upstream has been down since the end of March 2020.
170 (string-append "https://web.archive.org/web/20180626203108/"
171 "https://www.soft-switch.org/downloads/" name "/"
172 name "-" version ".tar.gz"))
174 (base32 "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"))))
175 (build-system gnu-build-system)
176 (outputs '("out" "doc" "static")) ;doc contains HTML documentation
178 `(#:configure-flags '("--enable-doc=yes" "--enable-tests=yes")
179 #:parallel-build? #f ;non-deterministic build failures may occur otherwise
180 #:parallel-tests? #f ;fails removing the same the files twice otherwise
181 #:phases (modify-phases %standard-phases
182 (add-after 'unpack 'patch-configure.ac
184 ;; spandsp looks at hard coded locations of the FHS to
186 (substitute* "configure.ac"
187 (("AC_MSG_CHECKING\\(for libxml/xmlmemory\\.h.*" all)
189 "PKG_CHECK_MODULES(XML2, libxml-2.0)\n"
190 "CPPFLAGS+=\" $XML2_CFLAGS\"\n")))
191 ;; Force a regeneration of the autotools build system.
192 (delete-file "autogen.sh")
193 (delete-file "configure")
195 (add-after 'unpack 'do-not-install-data-files
196 ;; The .tiff images produced for tests are not
197 ;; reproducible and it is not desirable to have those
200 (substitute* '("test-data/itu/fax/Makefile.am"
201 "test-data/etsi/fax/Makefile.am")
202 (("nobase_data_DATA")
205 (add-after 'install 'install-doc
206 (lambda* (#:key outputs #:allow-other-keys)
207 (let ((doc (string-append (assoc-ref outputs "doc")
208 "/share/doc/" ,name "-" ,version)))
209 (copy-recursively "doc/t38_manual" doc)
211 (add-after 'install 'move-static-libraries
212 (lambda* (#:key outputs #:allow-other-keys)
213 (let ((out (assoc-ref outputs "out"))
214 (static (assoc-ref outputs "static")))
215 (mkdir-p (string-append static "/lib"))
216 (with-directory-excursion out
217 (for-each (lambda (file)
219 (string-append static "/"
221 (find-files "lib" "\\.a$")))
224 `(("autoconf" ,autoconf)
225 ("automake" ,automake)
227 ("pkg-config" ,pkg-config)
231 ("libsndfile" ,libsndfile)
232 ("libjpeg" ,libjpeg-turbo) ;XXX: should be propagated from libtiff
236 ;; For the documentation
237 ("docbook-xml" ,docbook-xml-4.3)
238 ("docbook-xsl" ,docbook-xsl)
241 ("libxslt" ,libxslt)))
242 (synopsis "DSP library for telephony")
243 (description "SpanDSP is a library of DSP functions for telephony, in the
244 8000 sample per second world of E1s, T1s, and higher order PCM channels. It
245 contains low level functions, such as basic filters. It also contains higher
246 level functions, such as cadenced supervisory tone detection, and a complete
247 software FAX machine.")
248 (home-page "https://web.archive.org/web/20180626203108/\
249 https://www.soft-switch.org/index.html")
250 (license (list license:lgpl2.1+ ;for the library
251 license:gpl2+)))) ;for the test suites and support programs
253 (define-public commoncpp
259 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
262 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
265 (modify-phases %standard-phases
266 (add-before 'configure 'pre-configure
268 (substitute* "src/applog.cpp"
269 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
271 (build-system gnu-build-system)
272 (synopsis "(u)Common C++ framework for threaded applications")
273 (description "GNU Common C++ is an portable, optimized class framework for
274 threaded applications, supporting concurrent synchronization, inter-process
275 communications via sockets, and various methods for data handling, such as
276 serialization and XML parsing. It includes the uCommon C++ library, a smaller
278 (license license:gpl2+) ; plus runtime exception
279 (properties '((ftp-directory . "/gnu/commoncpp")
280 (upstream-name . "commoncpp2")))
281 (home-page "https://www.gnu.org/software/commoncpp/")))
283 (define-public ucommon
289 (uri (string-append "mirror://gnu/commoncpp/" name "-"
292 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
293 (build-system gnu-build-system)
294 (inputs (list gnutls))
295 (synopsis "Common C++ framework for threaded applications")
296 (description "GNU uCommon C++ is meant as a very light-weight C++ library
297 to facilitate using C++ design patterns even for very deeply embedded
298 applications, such as for systems using uclibc along with posix threading
300 (license license:gpl3+)
301 (home-page "https://www.gnu.org/software/commoncpp/")
302 (properties '((ftp-directory . "/gnu/commoncpp")))))
310 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
313 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
314 (build-system gnu-build-system)
315 (inputs (list ucommon libgcrypt))
316 (native-inputs (list pkg-config))
317 (synopsis "Implementation of RTP (real-time transport protocol)")
318 (description "GNU ccRTP is an implementation of RTP, the real-time transport
319 protocol from the IETF. It is suitable both for high capacity servers and
320 personal client applications. It is flexible in its design, allowing it to
321 function as a framework for the framework, rather than just being a
322 packet-manipulation library.")
323 (license license:gpl2+) ; plus runtime exception
324 (home-page "https://www.gnu.org/software/ccrtp/")))
326 (define-public zrtpcpp
335 (url "https://github.com/wernerd/ZRTPCPP")
337 (string-append "V" version))))
339 (git-file-name name version))
342 "06vphvh4dgi7ah5qkq53wqvswv8l273x0xwbc447qmgvamm0x1vs"))))
343 (build-system cmake-build-system)
345 `(#:tests? #f)) ; No target
349 (list ccrtp ucommon))
350 (synopsis "C++ Implementation of ZRTP protocol")
351 (description "GNU ZRTP C++ provides a library that adds ZRTP support to the
352 GNU ccRTP stack and serves as library for other RTP stacks
353 (PJSIP, GStreamer).")
354 (home-page "https://www.gnu.org/software/ccrtp/zrtp")
355 (license license:lgpl3+)))
363 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
364 (patches (search-patches "osip-CVE-2017-7853.patch"))
367 "1wibs2zs035ay7qvl5ai8drv6f0xw7iscb0frmpgax3pisy88dzf"))))
368 (build-system gnu-build-system)
370 (synopsis "Library implementing SIP (RFC-3261)")
371 (description "GNU oSIP is an implementation of the SIP protocol. It is
372 used to provide multimedia and telecom software developers with an interface
373 to initiate and control SIP sessions.")
374 (license license:lgpl2.1+)
375 (properties '((ftp-directory . "/gnu/osip")
376 (upstream-name . "libosip2")))
377 (home-page "https://www.gnu.org/software/osip/")))
380 (define-public exosip
386 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
389 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
390 (build-system gnu-build-system)
392 (synopsis "Sip abstraction library")
393 (description "EXosip is a library that hides the complexity of using the
394 SIP protocol for multimedia session establishment. This protocol is mainly to
395 be used by VoIP telephony applications (endpoints or conference server) but
396 might be also useful for any application that wish to establish sessions like
398 (license license:gpl2+)
399 ;; (plus OpenSSL linking exception)
400 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
401 (home-page "https://savannah.nongnu.org/projects/exosip")))
403 (define-public sipwitch
409 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
412 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
413 (build-system gnu-build-system)
414 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
415 ;; cross-compiling. Among other issues there the program name "pkg-config"
416 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
417 ;; Fortunately we can avoid the use of pkg-config and set the dependency
419 (arguments `(#:configure-flags
420 `("--without-pkg-config"
421 ,(string-append "UCOMMON_CFLAGS=-I"
422 (assoc-ref %build-inputs "ucommon") "/include")
423 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
424 ,(string-append "LIBOSIP2_CFLAGS=-I"
425 (assoc-ref %build-inputs "osip") "/include")
426 "LIBOSIP2_LIBS=-losipparser2 -losip2"
427 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
429 "EXOSIP2_LIBS=-leXosip2"
430 ,(string-append "EXOSIP2_CFLAGS=-I"
431 (assoc-ref %build-inputs "exosip")
433 (inputs (list ucommon exosip osip))
434 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
435 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
436 uses the SIP protocol. Calls can be made from behind NAT firewalls and
437 without the need for a service provider. Its peer-to-peer design ensures that
438 there is no central point for media intercept or capture and thus it can be
439 used to construct a secure telephone system that operates over the public
441 (license license:gpl3+)
442 (home-page "https://www.gnu.org/software/sipwitch/")))
444 (define-public libsrtp
451 (url "https://github.com/cisco/libsrtp")
452 (commit (string-append "v" version))))
453 (file-name (git-file-name name version))
456 "1gswpjm4jacfxmgglbf8hxi3yzsag4drk4q943p0wkmv21zj8l78"))))
458 (list psmisc ;some tests require 'killall'
460 (build-system gnu-build-system)
462 '(#:test-target "runtest"
463 #:phases (modify-phases %standard-phases
464 (add-after 'build 'build-shared
465 (lambda* (#:key (make-flags '()) #:allow-other-keys)
466 ;; Build the shared library separately because
467 ;; the test runner requires a static build.
468 (apply invoke "make" "shared_library" make-flags)
470 (add-after 'install 'remove-static-library
471 (lambda* (#:key outputs #:allow-other-keys)
472 (delete-file (string-append (assoc-ref outputs "out")
475 (synopsis "Secure RTP (SRTP) Reference Implementation")
477 "This package provides an implementation of the Secure Real-time Transport
478 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
479 supporting cryptographic kernel.")
480 (home-page "https://github.com/cisco/libsrtp")
481 (license license:bsd-3)))
483 (define-public libiax2
484 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
485 ;; This is the commit used by the Ring Project.
488 (version (string-append "0.0.0-1." (string-take commit 7)))
493 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
495 (file-name (git-file-name name version))
498 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
499 (build-system gnu-build-system)
501 (list autoconf automake libtool))
502 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
503 (synopsis "Inter-Asterisk-Protocol library")
504 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
505 Voice-over-IP (VoIP) communications.")
506 ;; The file 'src/md5.c' is released into the public domain by RSA Data
507 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
508 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
509 ;; covered under the 'GPL'.
510 ;; The package as a whole is distributed under the LGPL 2.0.
511 (license (list license:lgpl2.0
512 license:public-domain
521 (uri (string-append "http://holdenc.altervista.org/"
522 "seren/downloads/seren-" version
526 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
527 (build-system gnu-build-system)
528 (arguments '(#:tests? #f)) ; no "check" target
530 (list alsa-lib gmp libogg ncurses opus))
531 (synopsis "Simple VoIP program to create conferences from the terminal")
533 "Seren is a simple VoIP program based on the Opus codec that allows you
534 to create a voice conference from the terminal, with up to 10 participants,
535 without having to register accounts, exchange emails, or add people to contact
536 lists. All you need to join an existing conference is the host name or IP
537 address of one of the participants.")
538 (home-page "http://holdenc.altervista.org/seren/")
539 (license license:gpl3+)))
541 (define find-python-interpreter-cmake-modules
542 (let ((commit "bb4d3ea8434eebef40df35434a9b6ef410fce0b2")
547 (url "https://github.com/Krzmbrzl/FindPythonInterpreter")
549 (file-name (git-file-name "find-python-interpreter"
550 (git-version "0" revision commit)))
553 "1ryhda2yqgrhnwndfg52mscdsclg1ivv746hvalcay5m1wy2h5bm")))))
555 (define-public mumble
563 "https://github.com/mumble-voip/mumble/releases/download/v"
564 version "/" name "-" version ".tar.gz"))
567 "1c1lwj0cpyawr74adpdrsnxk8ra5kqrjbg65cnwk8n6cwss84zdn"))
568 (modules '((guix build utils)
583 (with-directory-excursion "3rdparty"
584 (for-each delete-file-recursively
585 (lset-difference string=?
587 (cons* "." ".." keep))))
589 (build-system qt-build-system)
593 #~(list "-Dbundled-speex=off"
595 ;; "-Dbundled-rnnoise=off" ; XXX: not yet in release
596 "-Dalsa=off" ; use pulse
597 "-Dcoreaudio=off" ; use pulse
598 "-Dice=off" ; not packaged
599 "-Djackaudio=off" ; use pulse
600 "-Doss=off" ; use pulse
602 "-Dportaudio=off" ; use pulse
603 "-Dpipewire=off" ; use pulse
604 "-Doverlay-xcompile=off"
605 "-Dupdate=off" ; don't phone home
607 "-Dbundle-qt-translations=off")
609 #~(modify-phases %standard-phases
610 (add-after 'unpack 'unpack-submodules
612 (copy-recursively #$find-python-interpreter-cmake-modules
613 "3rdparty/FindPythonInterpreter")))
614 (add-after 'unpack 'disable-murmur-ice
616 (substitute* "scripts/murmur.ini"
617 (("^ice=") ";ice="))))
618 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
619 (add-after 'unpack 'fix-statistic-gathering-default
621 (substitute* "src/mumble/Settings.h"
622 (("bUsage *= true;") "bUsage = false;"))))
623 (add-after 'unpack 'fix-mumble-overlay
624 (lambda* (#:key inputs outputs #:allow-other-keys)
625 (with-output-to-file "scripts/mumble-overlay"
627 (format #t "#!~a~%" (search-input-file inputs "/bin/bash"))
628 (format #t "export LD_PRELOAD=\"~a $LD_PRELOAD\"~%"
629 (string-append (assoc-ref outputs "out")
630 "/lib/mumble/libmumbleoverlay.so"))
631 (format #t "exec \"${@}\"")))))
632 (add-after 'unpack 'hardcode-pulseaudio
633 (lambda* (#:key inputs #:allow-other-keys)
634 (substitute* "src/mumble/PulseAudio.cpp"
635 (("libpulse.so") (search-input-file inputs "/lib/libpulse.so"))))))))
639 glib ; for speech-dispatcher
651 speex ; avoid bundled
652 speexdsp ; avoid bundled
653 ;; xiph-rnnoise ; TODO: unbundle rnnoise
656 (list pkg-config python qttools))
657 (synopsis "Low-latency, high quality voice chat software")
659 "Mumble is an low-latency, high quality voice chat
660 software primarily intended for use while gaming.
661 Mumble consists of two applications for separate usage:
662 @code{mumble} for the client, and @code{murmur} for the server.")
663 (home-page "https://wiki.mumble.info/wiki/Main_Page")
664 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
665 license:bsd-2 ; celt-0.11.0
666 license:isc)))) ; arc4random
668 (define-public twinkle
677 (url "https://github.com/LubosD/twinkle")
679 (string-append "v" version))))
681 (git-file-name name version))
683 (search-patches "twinkle-bcg729.patch")) ; To support new BCG729 API.
686 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
687 (build-system qt-build-system)
689 `(#:tests? #f ; no test target
692 ;; FIX-ME: Make Twinkle compatible with libre version of iLBC.
693 ;; "-DWITH_ILBC=On" ; For iLBC Codec Support
694 "-DWITH_ZRTP=On" ; For ZRTP Support
695 "-DWITH_G729=On" ; For G729 Codec Support
696 "-DWITH_SPEEX=On"))) ; For Speex Codec Support
698 (list bison flex qttools))
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 "04s4bgr2d22ym2ajjk6q507hyqss1p59yp8avyyyf5f8032nbaws"))
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 (patches (search-patches "pjproject-install-libpjsua2.patch"))))
747 (build-system gnu-build-system)
748 (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-before 'build 'build-dep
780 (lambda _ (invoke "make" "dep")))
781 ;; The check phases is moved after the install phase so to
782 ;; use the installed shared libraries for the tests.
784 (add-after 'install 'move-static-libraries
785 (lambda* (#:key outputs #:allow-other-keys)
786 (let ((out (assoc-ref outputs "out"))
787 (s (string-append (assoc-ref outputs "static") "/lib")))
789 (with-directory-excursion out
790 (for-each (lambda (f)
791 (rename-file f (string-append s "/" (basename f))))
792 (find-files "." "\\.a$"))))))
793 (add-after 'install 'check
794 (assoc-ref %standard-phases 'check))
795 (add-before 'patch-source-shebangs 'autoconf
797 (invoke "autoconf" "-v" "-f" "-i" "-o"
798 "aconfigure" "aconfigure.ac")))
799 (add-before 'autoconf 'disable-some-tests
801 (substitute* "pjlib/src/pjlib-test/test.h"
802 ;; Disable network tests which are slow and/or require an
804 (("#define GROUP_NETWORK.*")
805 "#define GROUP_NETWORK 0\n"))
806 (substitute* "self-test.mak"
807 ;; Fails with: pjlib-util-test-x86_64-unknown-linux-gnu:
808 ;; ../src/pjlib-util-test/resolver_test.c:1501: action2_1:
809 ;; Assertio n `pj_strcmp2(&pkt->q[0].name, "_sip._udp."
810 ;; "domain2.com")==0' failed.
811 ((" pjlib_util_test ") ""))
812 (substitute* "pjsip/src/test/test.h"
813 ;; Fails with: Error: unable to acquire TCP transport:
814 ;; [pj_status_t=120101] Network is unreachable.
815 (("#define INCLUDE_TCP_TEST.*")
816 "#define INCLUDE_TCP_TEST 0\n")
817 ;; The TSX tests takes a very long time to run; skip them.
818 (("#define INCLUDE_TSX_GROUP.*")
819 "#define INCLUDE_TSX_GROUP 0\n"))
820 (substitute* "pjsip/src/test/dns_test.c"
821 ;; The round_robin_test fails non-deterministically (depending
822 ;; on load); skip it (see:
823 ;; https://github.com/pjsip/pjproject/issues/2500).
824 (("round_robin_test(pool)") 0))
825 (substitute* "pjmedia/src/test/test.h"
826 ;; The following tests require a sound card.
827 (("#define HAS_MIPS_TEST.*")
828 "#define HAS_MIPS_TEST 0\n")
829 (("#define HAS_JBUF_TEST.*")
830 "#define HAS_JBUF_TEST 0\n"))
831 (substitute* "Makefile"
832 ;; Disable the pjnath and pjsua tests, which require an actual
833 ;; network and an actual sound card, respectively.
834 (("pjnath-test pjmedia-test pjsip-test pjsua-test")
835 "pjmedia-test pjsip-test")))))))
837 (list autoconf automake libtool pkg-config))
848 (home-page "https://www.pjsip.org")
849 (synopsis "Session Initiation Protocol (SIP) stack")
850 (description "PJProject provides an implementation of the Session
851 Initiation Protocol (SIP) and a multimedia framework.")
852 (license license:gpl2+)))
854 (define-public libtgvoip
862 (url "https://github.com/grishka/libtgvoip")
864 (file-name (git-file-name name version))
865 ;; Fix compilation on i686-linux architecture.
866 ;; NOTE: Applying these patches is order-dependent!
867 ;; The patch for WebRTC /must/ precede the patch for SSE2.
869 (search-patches "libtgvoip-disable-webrtc.patch"
870 "libtgvoip-disable-sse2.patch"))
873 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
874 (build-system gnu-build-system)
876 (list alsa-lib openssl opus pulseaudio))
879 (modify-phases %standard-phases
880 ;; libtgvoip wants to dlopen libpulse and libasound, so tell it where
882 (add-after 'unpack 'patch-dlopen
883 (lambda* (#:key inputs #:allow-other-keys)
884 (substitute* "os/linux/AudioPulse.cpp"
886 (search-input-file inputs "/lib/libpulse.so")))
887 (substitute* '("os/linux/AudioInputALSA.cpp"
888 "os/linux/AudioOutputALSA.cpp")
890 (search-input-file inputs "/lib/libasound.so"))))))))
891 (synopsis "VoIP library for Telegram clients")
892 (description "A collection of libraries and header files for implementing
893 telephony functionality into custom Telegram clients.")
894 (home-page "https://github.com/zevlg/libtgvoip")
895 (license license:unlicense)))