gnu: libdvdcss: Update to 1.4.3.
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
CommitLineData
8fd3de0b 1;;; GNU Guix --- Functional package management for GNU
63af948f
AE
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3c9e35cc 4;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
6439c340 5;;; Copyright © 2015, 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
4ff20605 6;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
319ac02b 7;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
3c986a7d 8;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
5a103bb8 9;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
7616d75f 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
bd4b6f41 11;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
b61cb244 12;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
bd4b6f41
PN
13;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
fbcd60dd 15;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
a21d9b8d 16;;; Copyright © 2019 Ivan Vilata i Balaguer <ivan@selidor.net>
494135d5 17;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
ba726ebc 18;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
d82539d3 19;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
45136b36 20;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
28c0a2d4 21;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
3b2d7ada 22;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
8fd3de0b
JD
23;;;
24;;; This file is part of GNU Guix.
25;;;
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.
30;;;
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.
35;;;
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/>.
38
39(define-module (gnu packages telephony)
40 #:use-module (gnu packages)
d82539d3 41 #:use-module (gnu packages admin)
c771b799 42 #:use-module (gnu packages aidc)
d82539d3 43 #:use-module (gnu packages algebra)
4ff20605 44 #:use-module (gnu packages autotools)
faa29e4b 45 #:use-module (gnu packages avahi)
bd4b6f41
PN
46 #:use-module (gnu packages audio)
47 #:use-module (gnu packages base)
faa29e4b 48 #:use-module (gnu packages boost)
80e2524c 49 #:use-module (gnu packages check)
bd4b6f41
PN
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages crypto)
266ad5d7 52 #:use-module (gnu packages databases)
d82539d3 53 #:use-module (gnu packages docbook)
c771b799 54 #:use-module (gnu packages documentation)
b61cb244 55 #:use-module (gnu packages file)
faa29e4b 56 #:use-module (gnu packages protobuf)
c771b799 57 #:use-module (gnu packages gettext)
a21d9b8d 58 #:use-module (gnu packages gl)
bd4b6f41 59 #:use-module (gnu packages glib)
c771b799 60 #:use-module (gnu packages gnome)
8fd3de0b 61 #:use-module (gnu packages gnupg)
c771b799 62 #:use-module (gnu packages gtk)
d82539d3 63 #:use-module (gnu packages image)
c771b799 64 #:use-module (gnu packages libcanberra)
e5463baf 65 #:use-module (gnu packages linphone)
3c9e35cc 66 #:use-module (gnu packages linux)
319ac02b
FF
67 #:use-module (gnu packages multiprecision)
68 #:use-module (gnu packages ncurses)
d82539d3 69 #:use-module (gnu packages netpbm)
bd4b6f41
PN
70 #:use-module (gnu packages networking)
71 #:use-module (gnu packages pcre)
72 #:use-module (gnu packages perl)
8fd3de0b 73 #:use-module (gnu packages pkg-config)
faa29e4b 74 #:use-module (gnu packages pulseaudio)
bd4b6f41 75 #:use-module (gnu packages python)
faa29e4b 76 #:use-module (gnu packages qt)
bd4b6f41 77 #:use-module (gnu packages serialization)
faa29e4b 78 #:use-module (gnu packages speech)
99e6f9c8 79 #:use-module (gnu packages tls)
bd4b6f41
PN
80 #:use-module (gnu packages upnp)
81 #:use-module (gnu packages video)
c771b799 82 #:use-module (gnu packages webkit)
319ac02b 83 #:use-module (gnu packages xiph)
faa29e4b 84 #:use-module (gnu packages xorg)
b61cb244
JL
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages readline)
87 #:use-module (gnu packages bison)
88 #:use-module (gnu packages flex)
974aaf71 89 #:use-module ((guix licenses) #:prefix license:)
8fd3de0b
JD
90 #:use-module (guix packages)
91 #:use-module (guix download)
b61cb244
JL
92 #:use-module (guix git-download)
93 #:use-module (guix build-system cmake)
a21d9b8d
IVB
94 #:use-module (guix build-system gnu)
95 #:use-module (guix build-system qt))
8fd3de0b 96
82058bf3
RG
97(define-public libilbc
98 (package
99 (name "libilbc")
100 (version "2.0.2")
101 (source
102 (origin
103 (method git-fetch)
104 (uri
105 (git-reference
b0e7b699 106 (url "https://github.com/TimothyGu/libilbc")
82058bf3
RG
107 (commit
108 (string-append "v" version))))
109 (file-name
110 (git-file-name name version))
111 (sha256
112 (base32
113 "1j1pn1w1198qvdiq2hgv9hkyq2nqcvmfnwlgppac633idkjnjrqx"))))
114 (build-system cmake-build-system)
115 (arguments
116 `(#:tests? #f)) ; No target
117 (native-inputs
118 `(("pkg-config" ,pkg-config)))
119 (synopsis "Libre iLBC codec")
120 (description "LibiLBC is a packaging friendly copy of the iLBC codec from
121the WebRTC project. It provides a base for distribution packages and can be
122used 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)))
125
d82539d3
RG
126(define-public spandsp
127 (package
128 (name "spandsp")
129 (version "0.0.6")
130 (source
131 (origin
132 (method url-fetch)
133 (uri
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"))
138 (sha256
139 (base32 "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"))))
140 (build-system gnu-build-system)
141 (outputs '("out" "doc" "static")) ;doc contains HTML documentation
142 (arguments
143 `(#:configure-flags '("--enable-doc=yes" "--enable-tests=yes")
e8a1c5af 144 #:parallel-build? #f ;non-deterministic build failures may occur otherwise
d82539d3
RG
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
148 (lambda _
149 ;; spandsp looks at hard coded locations of the FHS to
150 ;; find libxml2.
151 (substitute* "configure.ac"
152 (("AC_MSG_CHECKING\\(for libxml/xmlmemory\\.h.*" all)
153 (string-append 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")
159 #t))
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
163 ;; distributed.
164 (lambda _
165 (substitute* '("test-data/itu/fax/Makefile.am"
166 "test-data/etsi/fax/Makefile.am")
167 (("nobase_data_DATA")
168 "noinst_DATA"))
169 #t))
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)
175 #t)))
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)
183 (rename-file file
184 (string-append static "/"
185 file)))
186 (find-files "lib" "\\.a$")))
187 #t))))))
188 (native-inputs
189 `(("autoconf" ,autoconf)
190 ("automake" ,automake)
191 ("libtool" ,libtool)
192 ("pkg-config" ,pkg-config)
193 ;; For the tests
194 ("fftw" ,fftw)
195 ("libpcap" ,libpcap)
196 ("libsndfile" ,libsndfile)
e66d5d6e 197 ("libjpeg" ,libjpeg-turbo) ;XXX: should be propagated from libtiff
d82539d3
RG
198 ("libtiff" ,libtiff)
199 ("netpbm" ,netpbm)
200 ("sox" ,sox)
201 ;; For the documentation
202 ("docbook-xml" ,docbook-xml-4.3)
203 ("docbook-xsl" ,docbook-xsl)
204 ("doxygen" ,doxygen)
205 ("libxml2" ,libxml2)
206 ("libxslt" ,libxslt)))
207 (synopsis "DSP library for telephony")
208 (description "SpanDSP is a library of DSP functions for telephony, in the
2098000 sample per second world of E1s, T1s, and higher order PCM channels. It
210contains low level functions, such as basic filters. It also contains higher
211level functions, such as cadenced supervisory tone detection, and a complete
212software FAX machine.")
213 (home-page "https://web.archive.org/web/20180626203108/\
214https://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
217
8fd3de0b
JD
218(define-public commoncpp
219 (package
220 (name "commoncpp")
221 (version "1.8.1")
222 (source (origin
223 (method url-fetch)
224 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
225 version ".tar.gz"))
226 (sha256 (base32
227 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
228 (arguments
229 `(#:phases
dc1d3cde
KK
230 (modify-phases %standard-phases
231 (add-before 'configure 'pre-configure
232 (lambda _
233 (substitute* "src/applog.cpp"
234 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
235 #t)))))
8fd3de0b 236 (build-system gnu-build-system)
12bcf94a 237 (synopsis "(u)Common C++ framework for threaded applications")
8fd3de0b
JD
238 (description "GNU Common C++ is an portable, optimized class framework for
239threaded applications, supporting concurrent synchronization, inter-process
240communications via sockets, and various methods for data handling, such as
241serialization and XML parsing. It includes the uCommon C++ library, a smaller
242reimplementation.")
974aaf71 243 (license license:gpl2+) ; plus runtime exception
c9508c43
EF
244 (properties '((ftp-directory . "/gnu/commoncpp")
245 (upstream-name . "commoncpp2")))
6fd52309 246 (home-page "https://www.gnu.org/software/commoncpp/")))
8fd3de0b
JD
247
248(define-public ucommon
249 (package
250 (name "ucommon")
99e6f9c8 251 (version "7.0.0")
8fd3de0b
JD
252 (source (origin
253 (method url-fetch)
254 (uri (string-append "mirror://gnu/commoncpp/" name "-"
255 version ".tar.gz"))
256 (sha256 (base32
99e6f9c8 257 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
8fd3de0b 258 (build-system gnu-build-system)
99e6f9c8 259 (inputs `(("gnutls" ,gnutls)))
35b9e423
EB
260 (synopsis "Common C++ framework for threaded applications")
261 (description "GNU uCommon C++ is meant as a very light-weight C++ library
262to facilitate using C++ design patterns even for very deeply embedded
263applications, such as for systems using uclibc along with posix threading
264support.")
974aaf71 265 (license license:gpl3+)
6fd52309 266 (home-page "https://www.gnu.org/software/commoncpp/")
63e8bb12 267 (properties '((ftp-directory . "/gnu/commoncpp")))))
8fd3de0b
JD
268
269(define-public ccrtp
270 (package
271 (name "ccrtp")
9dc9053f 272 (version "2.1.2")
8fd3de0b
JD
273 (source (origin
274 (method url-fetch)
275 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
276 version ".tar.gz"))
277 (sha256 (base32
9dc9053f 278 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
8fd3de0b
JD
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
285protocol from the IETF. It is suitable both for high capacity servers and
286personal client applications. It is flexible in its design, allowing it to
287function as a framework for the framework, rather than just being a
288packet-manipulation library.")
974aaf71 289 (license license:gpl2+) ; plus runtime exception
6fd52309 290 (home-page "https://www.gnu.org/software/ccrtp/")))
8fd3de0b 291
266ad5d7
RG
292(define-public zrtpcpp
293 (package
294 (name "zrtpcpp")
295 (version "4.6.6")
296 (source
297 (origin
298 (method git-fetch)
299 (uri
300 (git-reference
b0e7b699 301 (url "https://github.com/wernerd/ZRTPCPP")
266ad5d7
RG
302 (commit
303 (string-append "V" version))))
304 (file-name
305 (git-file-name name version))
306 (sha256
307 (base32
308 "06vphvh4dgi7ah5qkq53wqvswv8l273x0xwbc447qmgvamm0x1vs"))))
309 (build-system cmake-build-system)
310 (arguments
311 `(#:tests? #f)) ; No target
312 (native-inputs
313 `(("pkg-config" ,pkg-config)))
314 (inputs
315 `(("ccrtp" ,ccrtp)
316 ("ucommon" ,ucommon)))
317 (synopsis "C++ Implementation of ZRTP protocol")
318 (description "GNU ZRTP C++ provides a library that adds ZRTP support to the
319GNU 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+)))
8fd3de0b
JD
323
324(define-public osip
325 (package
326 (name "osip")
4bb9bb78 327 (version "5.2.0")
8fd3de0b
JD
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
75072795 331 (patches (search-patches "osip-CVE-2017-7853.patch"))
6dfbbd2c
LF
332 (sha256
333 (base32
4bb9bb78 334 "0xdk3cszkzb8nb757gl47slrr13mf6xz43ab4k343fv8llp8pd2g"))))
8fd3de0b
JD
335 (build-system gnu-build-system)
336
337 (synopsis "Library implementing SIP (RFC-3261)")
338 (description "GNU oSIP is an implementation of the SIP protocol. It is
339used to provide multimedia and telecom software developers with an interface
340to initiate and control SIP sessions.")
974aaf71 341 (license license:lgpl2.1+)
6439c340
EF
342 (properties '((ftp-directory . "/gnu/osip")
343 (upstream-name . "libosip2")))
6fd52309 344 (home-page "https://www.gnu.org/software/osip/")))
8fd3de0b
JD
345
346
347(define-public exosip
348 (package
349 (name "exosip")
350 (version "4.1.0")
351 (source (origin
352 (method url-fetch)
966a543b
LC
353 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
354 version ".tar.gz"))
8fd3de0b
JD
355 (sha256 (base32
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
e881752c 361SIP protocol for multimedia session establishment. This protocol is mainly to
8fd3de0b 362be used by VoIP telephony applications (endpoints or conference server) but
e881752c 363might be also useful for any application that wish to establish sessions like
8fd3de0b 364multiplayer games.")
974aaf71 365 (license license:gpl2+)
8fd3de0b
JD
366 ;; (plus OpenSSL linking exception)
367 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
340978d7 368 (home-page "https://savannah.nongnu.org/projects/exosip")))
8fd3de0b
JD
369
370(define-public sipwitch
371 (package
372 (name "sipwitch")
419fa59b 373 (version "1.9.15")
8fd3de0b
JD
374 (source (origin
375 (method url-fetch)
376 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
377 version ".tar.gz"))
378 (sha256 (base32
419fa59b 379 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
8fd3de0b 380 (build-system gnu-build-system)
e881752c 381 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
8fd3de0b
JD
382 ;; cross-compiling. Among other issues there the program name "pkg-config"
383 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
e881752c
AK
384 ;; Fortunately we can avoid the use of pkg-config and set the dependency
385 ;; flags ourselves.
386 (arguments `(#:configure-flags
8fd3de0b 387 `("--without-pkg-config"
e881752c 388 ,(string-append "UCOMMON_CFLAGS=-I"
8fd3de0b
JD
389 (assoc-ref %build-inputs "ucommon") "/include")
390 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
e881752c 391 ,(string-append "LIBOSIP2_CFLAGS=-I"
8fd3de0b
JD
392 (assoc-ref %build-inputs "osip") "/include")
393 "LIBOSIP2_LIBS=-losipparser2 -losip2"
e881752c 394 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
8fd3de0b
JD
395 "/etc")
396 "EXOSIP2_LIBS=-leXosip2"
e881752c 397 ,(string-append "EXOSIP2_CFLAGS=-I"
8fd3de0b
JD
398 (assoc-ref %build-inputs "exosip")
399 "/include"))))
400 (inputs `(("ucommon" ,ucommon)
401 ("exosip" ,exosip)
402 ("osip" ,osip)))
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
405uses the SIP protocol. Calls can be made from behind NAT firewalls and
406without the need for a service provider. Its peer-to-peer design ensures that
407there is no central point for media intercept or capture and thus it can be
408used to construct a secure telephone system that operates over the public
409internet.")
974aaf71 410 (license license:gpl3+)
6fd52309 411 (home-page "https://www.gnu.org/software/sipwitch/")))
8fd3de0b 412
3c9e35cc
DH
413(define-public libsrtp
414 (package
415 (name "libsrtp")
80af75ab 416 (version "2.3.0")
3c9e35cc 417 (source (origin
1c956faa
EF
418 (method git-fetch)
419 (uri (git-reference
420 (url "https://github.com/cisco/libsrtp")
421 (commit (string-append "v" version))))
422 (file-name (git-file-name name version))
b0c7e053
TGR
423 (sha256
424 (base32
80af75ab 425 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
3c9e35cc 426 (native-inputs
b0c7e053 427 `(("psmisc" ,psmisc) ;some tests require 'killall'
340f9b9f 428 ("procps" ,procps)))
3c9e35cc
DH
429 (build-system gnu-build-system)
430 (arguments
d18116d9
MB
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)
438 #t))
439 (add-after 'install 'remove-static-library
440 (lambda* (#:key outputs #:allow-other-keys)
441 (delete-file (string-append (assoc-ref outputs "out")
442 "/lib/libsrtp2.a"))
443 #t)))))
3c9e35cc 444 (synopsis "Secure RTP (SRTP) Reference Implementation")
6c0b0887
TGR
445 (description
446 "This package provides an implementation of the Secure Real-time Transport
447Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
448supporting cryptographic kernel.")
3c9e35cc 449 (home-page "https://github.com/cisco/libsrtp")
974aaf71 450 (license license:bsd-3)))
4ff20605
LG
451
452(define-public libiax2
453 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
454 ;; This is the commit used by the Ring Project.
455 (package
456 (name "libiax2")
457 (version (string-append "0.0.0-1." (string-take commit 7)))
458 (source
459 (origin
cd1f661e
RW
460 (method git-fetch)
461 (uri (git-reference
462 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
463 (commit commit)))
464 (file-name (git-file-name name version))
4ff20605
LG
465 (sha256
466 (base32
cd1f661e 467 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
4ff20605
LG
468 (build-system gnu-build-system)
469 (native-inputs
470 `(("autoconf" ,autoconf)
471 ("automake" ,automake)
472 ("libtool" ,libtool)))
4ff20605
LG
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
476Voice-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.
974aaf71
LG
482 (license (list license:lgpl2.0
483 license:public-domain
484 license:gpl2+)))))
319ac02b
FF
485
486(define-public seren
487 (package
488 (name "seren")
489 (version "0.0.21")
490 (source (origin
491 (method url-fetch)
492 (uri (string-append "http://holdenc.altervista.org/"
493 "seren/downloads/seren-" version
494 ".tar.gz"))
495 (sha256
496 (base32
497 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
498 (build-system gnu-build-system)
499 (arguments '(#:tests? #f)) ; no "check" target
500 (inputs
501 `(("alsa-lib" ,alsa-lib)
502 ("gmp" ,gmp)
503 ("libogg" ,libogg)
504 ("ncurses" ,ncurses)
505 ("opus" ,opus)))
506 (synopsis "Simple VoIP program to create conferences from the terminal")
507 (description
508 "Seren is a simple VoIP program based on the Opus codec that allows you
509to create a voice conference from the terminal, with up to 10 participants,
510without having to register accounts, exchange emails, or add people to contact
511lists. All you need to join an existing conference is the host name or IP
512address of one of the participants.")
513 (home-page "http://holdenc.altervista.org/seren/")
974aaf71 514 (license license:gpl3+)))
faa29e4b 515
516(define-public mumble
517 (package
518 (name "mumble")
ea13b3a1 519 (version "1.3.4")
faa29e4b 520 (source (origin
521 (method url-fetch)
ea13b3a1
LLB
522 (uri
523 (string-append
524 "https://github.com/mumble-voip/mumble/releases/download/"
525 version "/" name "-" version ".tar.gz"))
faa29e4b 526 (sha256
527 (base32
ea13b3a1 528 "14v0rgy1a5alxmz7ly95y38bdj0hx79yysgkcd8r8p9qqfzlwpv1"))
3b2d7ada
L
529 (modules '((guix build utils)
530 (ice-9 ftw)
531 (srfi srfi-1)))
faa29e4b 532 (snippet
533 `(begin
3b2d7ada
L
534 (let ((keep
535 '("arc4random-src"
536 "celt-0.7.0-build"
537 "celt-0.7.0-src"
538 "celt-0.11.0-build"
539 "celt-0.11.0-src"
540 "qqbonjour-src"
541 "rnnoise-build"
542 "rnnoise-src"
543 "smallft-src")))
544 (with-directory-excursion "3rdparty"
545 (for-each delete-file-recursively
546 (lset-difference string=?
547 (scandir ".")
548 (cons* "." ".." keep))))
549 #t)))))
a21d9b8d 550 (build-system qt-build-system)
faa29e4b 551 (arguments
552 `(#:tests? #f ; no "check" target
553 #:phases
2b583cdd 554 (modify-phases %standard-phases
faa29e4b 555 (replace 'configure
a21d9b8d
IVB
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")
560 "/bin/python3"))
7616d75f
TGR
561 (string-append "CONFIG+="
562 (string-join
a21d9b8d
IVB
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
570 "no-oss" ; use pulse
571 "no-alsa" ; use pulse
572 "no-update"
7616d75f 573 "no-embed-qt-translations"
a21d9b8d
IVB
574 "no-ice" ; not packaged
575 "packaged"
7616d75f
TGR
576 "release")))
577 (string-append "DEFINES+="
578 "PLUGIN_PATH="
579 (assoc-ref outputs "out")
580 "/lib/mumble"))))
faa29e4b 581 (add-before 'configure 'fix-libspeechd-include
582 (lambda _
583 (substitute* "src/mumble/TextToSpeech_unix.cpp"
a21d9b8d
IVB
584 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
585 #t))
ba726ebc
MR
586 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
587 (add-before 'configure 'fix-statistic-gathering-default
588 (lambda _
589 (substitute* "src/mumble/Settings.cpp"
590 (("bUsage = true;") "bUsage = false;"))
591 #t))
22ec8997
LP
592 (add-before 'configure 'fix-mumble-overlay
593 (lambda* (#:key outputs #:allow-other-keys)
594 (with-output-to-file "scripts/mumble-overlay"
595 (lambda ()
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 \"${@}\"")))
601 #t))
a21d9b8d
IVB
602 (add-before 'install 'disable-murmur-ice
603 (lambda _
604 (substitute* "scripts/murmur.ini.system"
605 (("^ice=") ";ice="))
606 #t))
faa29e4b 607 (replace 'install ; install phase does not exist
608 (lambda* (#:key inputs outputs #:allow-other-keys)
609 (let* ((out (assoc-ref outputs "out"))
bd9f8869 610 (etc (string-append out "/etc/murmur"))
611 (dbus (string-append out "/etc/dbus-1/system.d/"))
faa29e4b 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)
bd9f8869 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)
faa29e4b 631 (for-each (lambda (file) (install-file file lib))
632 (find-files "." "\\.so\\."))
633 (for-each (lambda (file) (install-file file lib))
69a745b7
BH
634 (find-files "release/plugins" "\\.so$"))
635 #t))))))
faa29e4b 636 (inputs
637 `(("avahi" ,avahi)
faa29e4b 638 ("boost" ,boost)
a21d9b8d 639 ("libsndfile" ,libsndfile)
faa29e4b 640 ("libxi" ,libxi)
a21d9b8d
IVB
641 ("mesa" ,mesa) ; avoid bundled
642 ("openssl" ,openssl)
643 ("opus" ,opus) ; avoid bundled
644 ("protobuf" ,protobuf)
645 ("pulseaudio" ,pulseaudio)
646 ("qtbase" ,qtbase)
647 ("qtsvg" ,qtsvg)
648 ("speech-dispatcher" ,speech-dispatcher)
649 ("speex" ,speex) ; avoid bundled
650 ("speexdsp" ,speexdsp))) ; avoid bundled
faa29e4b 651 (native-inputs
a21d9b8d
IVB
652 `(("pkg-config" ,pkg-config)
653 ("python" ,python)
654 ("qttools" ,qttools)))
faa29e4b 655 (synopsis "Low-latency, high quality voice chat software")
656 (description
657 "Mumble is an low-latency, high quality voice chat
bd9f8869 658software primarily intended for use while gaming.
659Mumble consists of two applications for separate usage:
660@code{mumble} for the client, and @code{murmur} for the server.")
faa29e4b 661 (home-page "https://wiki.mumble.info/wiki/Main_Page")
a21d9b8d
IVB
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
b61cb244
JL
665
666(define-public twinkle
b61cb244 667 (package
f1371daa
JL
668 (name "twinkle")
669 (version "1.10.2")
e5463baf
RG
670 (source
671 (origin
672 (method git-fetch)
673 (uri
674 (git-reference
675 (url "https://github.com/LubosD/twinkle")
676 (commit
677 (string-append "v" version))))
678 (file-name
679 (git-file-name name version))
680 (patches
681 (search-patches "twinkle-bcg729.patch")) ; To support new BCG729 API.
682 (sha256
683 (base32
684 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
685 (build-system qt-build-system)
f1371daa 686 (arguments
e5463baf
RG
687 `(#:tests? #f ; no test target
688 #:configure-flags
689 (list
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
f1371daa
JL
695 (native-inputs
696 `(("bison" ,bison)
697 ("flex" ,flex)
e5463baf
RG
698 ("qttools" ,qttools)))
699 (inputs
700 `(("alsa-lib" ,alsa-lib)
701 ("bcg729" ,bcg729)
702 ("zrtpcpp" ,zrtpcpp)
f1371daa 703 ("ccrtp" ,ccrtp)
e5463baf
RG
704 ("file" ,file)
705 ("libilbc" ,libilbc)
706 ("libsndfile" ,libsndfile)
f1371daa 707 ("libxml2" ,libxml2)
e5463baf
RG
708 ("qtbase" ,qtbase)
709 ("qtdeclarative" ,qtdeclarative)
710 ("qtquickcontrols" ,qtquickcontrols)
711 ("readline" ,readline)
f1371daa
JL
712 ("speex" ,speex)
713 ("speexdsp" ,speexdsp)
e5463baf 714 ("ucommon" ,ucommon)))
f1371daa
JL
715 (synopsis "Softphone for voice over IP and instant messaging")
716 (description "Twinkle is a softphone for your voice over IP and instant
e5463baf
RG
717messaging communcations using the SIP protocol. You can use it for direct
718IP phone to IP phone communication or in a network using a SIP proxy to route
719your calls and messages.")
720 (home-page "http://twinkle.dolezel.info/")
f1371daa 721 (license license:gpl2+)))
bd4b6f41
PN
722
723(define-public pjproject
724 (package
725 (name "pjproject")
45136b36 726 (version "2.11")
bd4b6f41
PN
727 (source
728 (origin
5dc8cad5
PN
729 (method git-fetch)
730 (uri (git-reference
b0e7b699 731 (url "https://github.com/pjsip/pjproject")
2ff4e549
JW
732 (commit version)))
733 (file-name (git-file-name name version))
734 (sha256
735 (base32
45136b36 736 "1kn9g1x1vmh4130ghph8mldz5m89gsjs4vpdzlzm98m3808gk5an"))
bd4b6f41
PN
737 (modules '((guix build utils)))
738 (snippet
739 '(begin
742c49ba
MC
740 ;; Remove bundled libraries.
741 (delete-file-recursively "third_party")
742 (substitute* "aconfigure.ac"
743 (("third_party/build/os-auto.mak") ""))
744 (substitute* "Makefile"
45136b36 745 (("third_party/build") ""))))))
bd4b6f41 746 (build-system gnu-build-system)
5cba0f48 747 (outputs '("out" "debug" "static"))
bd4b6f41 748 (arguments
742c49ba
MC
749 `(#:tests? #t
750 #:test-target "selftest"
3557d7d8 751 #:configure-flags
5cba0f48
MC
752 (list "--enable-shared"
753 "--with-external-speex"
3557d7d8
MC
754 "--with-external-gsm"
755 "--with-external-srtp"
756 "--with-external-pa"
757 ;; The following flag is Linux specific.
758 ,@(if (string-contains (or (%current-system)
759 (%current-target-system)) "linux")
760 '("--enable-epoll")
761 '())
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.
5cba0f48
MC
772 "CFLAGS=-DNDEBUG"
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")
776 "/lib"))
bd4b6f41
PN
777 #:phases
778 (modify-phases %standard-phases
742c49ba
MC
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".
782 (lambda _
45136b36 783 (for-each make-file-writable (find-files "."))))
bd4b6f41
PN
784 (add-before 'build 'build-dep
785 (lambda _ (invoke "make" "dep")))
5cba0f48
MC
786 ;; The check phases is moved after the install phase so to
787 ;; use the installed shared libraries for the tests.
788 (delete 'check)
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")))
793 (mkdir-p s)
794 (with-directory-excursion out
795 (for-each (lambda (f)
796 (rename-file f (string-append s "/" (basename f))))
45136b36 797 (find-files "." "\\.a$"))))))
5cba0f48
MC
798 (add-after 'install 'check
799 (assoc-ref %standard-phases 'check))
bd4b6f41
PN
800 (add-before 'patch-source-shebangs 'autoconf
801 (lambda _
5dc8cad5 802 (invoke "autoconf" "-v" "-f" "-i" "-o"
bd4b6f41
PN
803 "aconfigure" "aconfigure.ac")))
804 (add-before 'autoconf 'disable-some-tests
bd4b6f41 805 (lambda _
742c49ba
MC
806 (substitute* "pjlib/src/pjlib-test/test.h"
807 ;; Disable network tests which are slow and/or require an
808 ;; actual network.
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"))
bd4b6f41 836 (substitute* "Makefile"
742c49ba
MC
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")
45136b36 840 "pjmedia-test pjsip-test")))))))
742c49ba
MC
841 (native-inputs
842 `(("autoconf" ,autoconf)
843 ("automake" ,automake)
844 ("libtool" ,libtool)
845 ("pkg-config" ,pkg-config)))
846 (inputs
847 `(("bcg729" ,bcg729)
848 ("gnutls" ,gnutls)
849 ("gsm" ,gsm)
850 ("libsamplerate" ,libsamplerate)
851 ("libsrtp" ,libsrtp)
852 ("opus" ,opus)
853 ("portaudio" ,portaudio)
854 ("speex" ,speex)
855 ("speexdsp" ,speexdsp)))
bd4b6f41
PN
856 (home-page "https://www.pjsip.org")
857 (synopsis "Session Initiation Protocol (SIP) stack")
858 (description "PJProject provides an implementation of the Session
859Initiation Protocol (SIP) and a multimedia framework.")
860 (license license:gpl2+)))
915829e6 861
494135d5
BG
862(define-public libtgvoip
863 (package
864 (name "libtgvoip")
5a0d7391 865 (version "2.4.4")
494135d5
BG
866 (source
867 (origin
868 (method git-fetch)
869 (uri (git-reference
b0e7b699 870 (url "https://github.com/grishka/libtgvoip")
494135d5
BG
871 (commit version)))
872 (file-name (git-file-name name version))
1792a706
BG
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.
876 (patches
877 (search-patches "libtgvoip-disable-webrtc.patch"
878 "libtgvoip-disable-sse2.patch"))
494135d5
BG
879 (sha256
880 (base32
5a0d7391 881 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
494135d5
BG
882 (build-system gnu-build-system)
883 (inputs
5a0d7391 884 `(("alsa-lib" ,alsa-lib)
5a0d7391 885 ("openssl" ,openssl)
26db713f 886 ("opus" ,opus)
5a0d7391 887 ("pulseaudio" ,pulseaudio)))
58041437
DNB
888 (arguments
889 `(#:phases
890 (modify-phases %standard-phases
891 ;; libtgvoip wants to dlopen libpulse and libasound, so tell it where
892 ;; they are.
893 (add-after 'unpack 'patch-dlopen
894 (lambda* (#:key inputs #:allow-other-keys)
895 (substitute* "os/linux/AudioPulse.cpp"
896 (("libpulse\\.so")
897 (string-append (assoc-ref inputs "pulseaudio")
898 "/lib/libpulse.so")))
899 (substitute* '("os/linux/AudioInputALSA.cpp"
900 "os/linux/AudioOutputALSA.cpp")
901 (("libasound\\.so")
902 (string-append (assoc-ref inputs "alsa-lib")
903 "/lib/libasound.so")))
904 #t)))))
494135d5
BG
905 (synopsis "VoIP library for Telegram clients")
906 (description "A collection of libraries and header files for implementing
907telephony functionality into custom Telegram clients.")
908 (home-page "https://github.com/zevlg/libtgvoip")
909 (license license:unlicense)))