09b8fc4bf002ff004cfec344b3813f67f5aaae0c
[feed/telephony.git] / net / freeswitch-stable / Makefile
1 #
2 # Copyright (C) 2017 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # TODO
9 #
10 # - try to use system xmlrpc-c once it compiles again :-)
11
12 # NOTES
13 #
14 # - --disable-cpp sounds like we could get rid of the dep on libstdcpp, but it
15 # only results in switch_cpp.cpp not being compiled and there is other stuff
16 # that depends on libstdcpp.
17 # - I have patched configure.ac to be able to say no to libpng and freetype. If
18 # there are errors in the future due to missing depends we'll need to poke
19 # around some more.
20
21 include $(TOPDIR)/rules.mk
22
23 PRG_NAME:=freeswitch
24 PKG_NAME:=$(PRG_NAME)-stable
25 PKG_VERSION:=1.6.17
26 PKG_RELEASE:=1
27 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
28
29 PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
30 PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
31 PKG_MD5SUM:=709b3e43362d86b9682a7db14eb344b74362493d68244dfc4e6f40218089d4e1
32
33 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION)
34
35 # configure fails without libjpeg, but it's only needed for mod_spandsp
36 PKG_BUILD_DEPENDS:= \
37 libjpeg \
38 python \
39 python-setuptools \
40 swig/host
41
42 PKG_BUILD_PARALLEL:=1
43 PKG_INSTALL:=1
44
45 PKG_LICENSE:= \
46 AGPL-3.0 \
47 Apache-2.0 \
48 BSD-2-Clause \
49 BSD-3-Clause \
50 BSD-4-Clause \
51 BSD-like \
52 Beerware \
53 GPL-1.0+ \
54 GPL-2.0 \
55 GPL-2.0+ \
56 GPL-3.0 \
57 ISC \
58 LGPL-2.0+ \
59 LGPL-2.1 \
60 LGPL-2.1+ \
61 MIT/X11 (BSD like) \
62 MPL-1.1 \
63 OpenLDAP \
64 RSA-MD \
65 zlib-acknowledgement
66
67 PKG_LICENSE_FILES:=debian/copyright
68
69 FS_STABLE_DEPS_BASE:= \
70 +FS_STABLE_WITH_PGSQL:libpq \
71 +libopenssl \
72 +libuuid
73
74 FS_STABLE_DEPS:= \
75 $(FS_STABLE_DEPS_BASE) \
76 +FS_STABLE_WITH_FREETYPE:libfreetype \
77 +FS_STABLE_WITH_LIBEDIT:libedit \
78 +FS_STABLE_WITH_ODBC:unixodbc \
79 +FS_STABLE_WITH_PNG:libpng \
80 +libcurl \
81 +libpcre \
82 +libpthread \
83 +librt \
84 +libspeex \
85 +libspeexdsp \
86 +libstdcpp \
87 +libsqlite3 \
88 +zlib
89
90 FS_STABLE_MOD_AVAILABLE:= \
91 abstraction \
92 alsa \
93 avmd \
94 blacklist \
95 callcenter \
96 cdr_csv \
97 cdr_sqlite \
98 cidlookup \
99 commands \
100 conference \
101 console \
102 curl \
103 db \
104 dialplan_asterisk \
105 dialplan_xml \
106 dingaling \
107 directory \
108 distributor \
109 dptools \
110 easyroute \
111 enum \
112 esf \
113 esl \
114 event_multicast \
115 event_socket \
116 expr \
117 fifo \
118 format_cdr \
119 fsk \
120 g723_1 \
121 g729 \
122 hash \
123 hiredis \
124 httapi \
125 http_cache \
126 json_cdr \
127 lcr \
128 local_stream \
129 logfile \
130 loopback \
131 lua \
132 native_file \
133 odbc_cdr \
134 python \
135 redis \
136 rtc \
137 rtmp \
138 say_de \
139 say_en \
140 say_es \
141 say_es_ar \
142 say_fa \
143 say_fr \
144 say_he \
145 say_hr \
146 say_hu \
147 say_it \
148 say_ja \
149 say_nl \
150 say_pl \
151 say_pt \
152 say_ru \
153 say_sv \
154 say_th \
155 say_zh \
156 sndfile \
157 snom \
158 sofia \
159 spandsp \
160 spy \
161 syslog \
162 tone_stream \
163 translate \
164 valet_parking \
165 verto \
166 voicemail \
167 xml_cdr \
168 xml_rpc \
169 xml_scgi
170
171 include $(INCLUDE_DIR)/package.mk
172
173 $(call include_mk, python-version.mk)
174 PYTHON_DIR:=$(STAGING_DIR)/usr
175 PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
176 PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
177
178 define Package/$(PKG_NAME)/install/bin
179 $(INSTALL_DIR) $(1)/usr/bin
180 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
181 endef
182
183 define Package/$(PKG_NAME)/install/dir
184 for dir in $$$$(shell cd $(2); find -type d -print | sed 's|^./\?||'); \
185 do \
186 $(INSTALL_DIR) $(1)/$$$$$$$$dir; \
187 done
188 for file in $$$$(shell cd $(2); find -type f -print | sed 's|^./||'); \
189 do \
190 $(INSTALL_DATA) $(2)/$$$$$$$$file $(1)/$$$$$$$$file; \
191 done
192 endef
193
194 define Package/$(PKG_NAME)/install/lib
195 $(INSTALL_DIR) $(1)/usr/lib
196 $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(2).so* $(1)/usr/lib
197 endef
198
199 define Package/$(PKG_NAME)/install/mod
200 $(INSTALL_DIR) $(1)/usr/lib/$(PRG_NAME)/mod
201 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(PRG_NAME)/mod/mod_$(2).so \
202 $(1)/usr/lib/$(PRG_NAME)/mod
203 ifeq ($(2),python)
204 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
205 $(INSTALL_DATA) \
206 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/$(PRG_NAME).py \
207 $(1)$(PYTHON_PKG_DIR)
208 endif
209 endef
210
211 define Package/$(PKG_NAME)/config
212 source "$(SOURCE)/Config.in"
213 endef
214
215 define Package/$(PKG_NAME)/Default
216 SUBMENU:=Telephony
217 SECTION:=net
218 CATEGORY:=Network
219 URL:=https://www.$(PRG_NAME).org
220 endef
221
222 define Package/$(PKG_NAME)
223 $(call Package/$(PKG_NAME)/Default)
224 TITLE:=Open source telephony platform, v$(PKG_VERSION)
225 MENU:=1
226 USERID:=$(PRG_NAME)=372:$(PRG_NAME)=372
227 DEPENDS:=$(FS_STABLE_DEPS)
228 CONFLICTS:=$(PRG_NAME)
229 endef
230
231 define Package/$(PKG_NAME)/description
232 FreeSWITCH is a scalable open source cross-platform telephony platform
233 designed to route and interconnect popular communication protocols
234 using audio, video, text or any other form of media.
235 endef
236
237 define Package/$(PKG_NAME)/conffiles
238 /etc/$(PRG_NAME)
239 /etc/default/$(PRG_NAME)
240 /etc/init.d/$(PRG_NAME)
241 endef
242
243 define Package/$(PKG_NAME)/install
244 $(call Package/$(PKG_NAME)/install/bin,$(1),$(PRG_NAME))
245 $(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME))
246 $(INSTALL_DIR) $(1)/etc/$(PRG_NAME)/tls
247 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/fonts
248 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/grammar
249 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/htdocs
250 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/images
251 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/scripts
252 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/sounds
253 $(INSTALL_DIR) $(1)/etc/default
254 $(INSTALL_CONF) ./files/$(PRG_NAME).default $(1)/etc/default/$(PRG_NAME)
255 $(INSTALL_DIR) $(1)/etc/init.d
256 $(INSTALL_BIN) ./files/$(PRG_NAME).init $(1)/etc/init.d/$(PRG_NAME)
257 ifeq ($(CONFIG_FS_STABLE_WITH_LIBEDIT),)
258 $(SED) '/^ #procd_append_param command -nc -nf$$$$/s/#//' \
259 $(1)/etc/init.d/$(PRG_NAME)
260 endif
261 endef
262
263 define Package/$(PKG_NAME)/postinst
264 #!/bin/sh
265 if [ -z "$${IPKG_INSTROOT}" ]; then
266 # Prevent autostart of $(PRG_NAME)
267 touch /etc/$(PRG_NAME)_disabled
268
269 echo
270 echo "o-------------------------------------------------------------------o"
271 echo "| FreeSWITCH note |"
272 echo "o-------------------------------------------------------------------o"
273 echo "| Edit /etc/default/freeswitch to change basic init configuration. |"
274 echo "o-------------------------------------------------------------=^_^=-o"
275 echo
276 fi
277 exit 0
278 endef
279
280 define Package/$(PKG_NAME)-hotplug
281 $(call Package/$(PKG_NAME)/Default)
282 TITLE:=Hotplug script
283 DEPENDS:=$(PKG_NAME)
284 PKGARCH:=all
285 endef
286
287 define Package/$(PKG_NAME)-hotplug/description
288 This package includes a hotplug script for FreeSWITCH.
289 endef
290
291 define Package/$(PKG_NAME)-hotplug/install
292 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
293 $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \
294 $(1)/etc/hotplug.d/iface/99-$(PRG_NAME)
295 endef
296
297 define Package/$(PKG_NAME)-hotplug/postinst
298 #!/bin/sh
299 if [ -z "$${IPKG_INSTROOT}" ]; then
300 echo
301 echo "o-------------------------------------------------------------------o"
302 echo "| FreeSWITCH hotplug note |"
303 echo "o-------------------------------------------------------------------o"
304 echo "| See /etc/default/freeswitch for hotplug hints. |"
305 echo "o-------------------------------------------------------------=^_^=-o"
306 echo
307 fi
308 exit 0
309 endef
310
311 define Package/$(PKG_NAME)-python-esl
312 $(call Package/$(PKG_NAME)/Default)
313 TITLE:=Python ESL
314 DEPENDS:=$(PKG_NAME) +python-light
315 endef
316
317 define Package/$(PKG_NAME)-python-esl/description
318 This package contains the Python binding for FreeSWITCH's Event Socket
319 Library (ESL).
320 endef
321
322 define Package/$(PKG_NAME)-python-esl/install
323 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
324 $(INSTALL_DATA) \
325 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/ESL.py \
326 $(1)$(PYTHON_PKG_DIR)
327 $(INSTALL_BIN) \
328 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/_ESL.so \
329 $(1)$(PYTHON_PKG_DIR)
330 endef
331
332 define Package/$(PKG_NAME)-timezones
333 $(call Package/$(PKG_NAME)/Default)
334 TITLE:=Timezones file
335 DEPENDS:=$(PKG_NAME)
336 PKGARCH:=all
337 endef
338
339 define Package/$(PKG_NAME)-timezones/description
340 This package includes a timezones file for FreeSWITCH.
341 endef
342
343 define Package/$(PKG_NAME)-timezones/install
344 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/tz
345 $(INSTALL_DATA) \
346 $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/timezones.conf.xml \
347 $(1)/usr/share/$(PRG_NAME)/tz
348 endef
349
350 define Package/$(PKG_NAME)/Example
351 define Package/$(PKG_NAME)-example-$(1)
352 $(call Package/$(PKG_NAME)/Default)
353 TITLE:=Example configuration
354 DEPENDS:=$(PKG_NAME)
355 PKGARCH:=all
356 endef
357 define Package/$(PKG_NAME)-example-$(1)/description
358 This package does not install any configuration for FreeSWITCH into
359 /etc/freeswitch. The system administrator is completely responsible
360 for that directory. If you install one of the example configuration
361 packages, it will install the corresponding sample configuration to
362 /usr/share/freeswitch/conf where you can take a look at it.
363 endef
364 define Package/$(PKG_NAME)-example-$(1)/install
365 $(call Package/$(PKG_NAME)/install/dir,$$(1)/usr/share/$(PRG_NAME)/conf/$(1),$(PKG_BUILD_DIR)/conf/$(1))
366 endef
367 $$(eval $$(call BuildPackage,$(PKG_NAME)-example-$(1)))
368 endef
369
370 define Package/$(PKG_NAME)/Language
371 define Package/$(PKG_NAME)-lang-$(1)
372 $(call Package/$(PKG_NAME)/Default)
373 TITLE:=$(2) language files
374 DEPENDS:=$(PKG_NAME)
375 PKGARCH:=all
376 endef
377 define Package/$(PKG_NAME)-lang-$(1)/description
378 This package includes the $(2) language files for FreeSWITCH.
379 endef
380 define Package/$(PKG_NAME)-lang-$(1)/install
381 $(call Package/$(PKG_NAME)/install/dir,$$(1)/usr/share/$(PRG_NAME)/lang/$(1),$(PKG_BUILD_DIR)/conf/vanilla/lang/$(1))
382 endef
383 $$(eval $$(call BuildPackage,$(PKG_NAME)-lang-$(1)))
384 endef
385
386 define Package/$(PKG_NAME)/Module
387 define Package/$(PKG_NAME)-mod-$(1)
388 $(call Package/$(PKG_NAME)/Default)
389 TITLE:=$(2) module
390 DEPENDS:=$(PKG_NAME) $(4)
391 endef
392 define Package/$(PKG_NAME)-mod-$(1)/description
393 $(subst \n,$(newline),$(3))
394 endef
395 define Package/$(PKG_NAME)-mod-$(1)/install
396 $(call Package/$(PKG_NAME)/install/mod,$$(1),$(1))
397 endef
398 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
399 endef
400
401 define Package/$(PKG_NAME)/Util
402 define Package/$(PKG_NAME)-util-$(1)
403 $(call Package/$(PKG_NAME)/Default)
404 TITLE:=$(2) utility
405 DEPENDS:=$(PKG_NAME) $(4)
406 ifeq ($(5),y)
407 PKGARCH:=all
408 endif
409 endef
410 define Package/$(PKG_NAME)-util-$(1)/description
411 $(subst \n,$(newline),$(3))
412 endef
413 define Package/$(PKG_NAME)-util-$(1)/install
414 $(call Package/$(PKG_NAME)/install/bin,$$(1),$(1))
415 endef
416 ifeq ($(1)$(CONFIG_FS_STABLE_WITH_LIBEDIT),fs_cli)
417 define Package/$(PKG_NAME)-util-$(1)/postinst
418 #!/bin/sh
419 if [ -z "$${IPKG_INSTROOT}" ]; then
420 echo
421 echo "o-------------------------------------------------------------------o"
422 echo "| fs_cli note |"
423 echo "o-------------------------------------------------------------------o"
424 echo "| Your FreeSWITCH was compiled without libedit support. Due to an |"
425 echo "| interop issue it's possible that when you try to exit fs_cli with |"
426 echo "| Ctrl-D, you'll see messages flashing by and have to kill fs_cli |"
427 echo "| manually. To avoid this you can either use Ctrl-C instead (fs_cli |"
428 echo "| needs to be started with '-i' for this to work; you could create |"
429 echo "| an appropriate alias in /etc/profile) or type /exit, /quit or |"
430 echo "| /bye. |"
431 echo "o-------------------------------------------------------------=^_^=-o"
432 echo
433 fi
434 exit 0
435 endef
436 endif
437 $$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(1)))
438 endef
439
440 # we neither need host-perl nor host-php
441 CONFIGURE_VARS+= \
442 ac_cv_prog_PERL=false \
443 ac_cv_have_perl=no \
444 ac_cv_prog_PHP=false \
445 ac_cv_have_php=no \
446 ac_cv_prog_PHP_CONFIG=false \
447 ac_cv_have_php_config=no
448
449 # The autoconf variables in this block are OK for both musl and glibc
450 CONFIGURE_VARS+= \
451 ac_cv_file__dev_ptmx=yes \
452 ac_cv_file__dev_urandom=yes \
453 ac_cv_file_dbd_apr_dbd_mysql_c=no \
454 ac_cv_free_null=yes \
455 ac_cv_func_mmap_fixed_mapped=yes \
456 ac_cv_func_pthread_rwlock_init=yes \
457 ac_cv_func_sem_open=yes \
458 ac_cv_have_working_memmove=yes \
459 ac_cv_negative_eai=yes \
460 ac_cv_o_nonblock_inherited=no \
461 ac_cv_struct_rlimit=yes \
462 apr_cv_epoll=yes \
463 apr_cv_gai_addrconfig=yes \
464 apr_cv_mutex_recursive=yes \
465 apr_cv_process_shared_works=yes \
466 apr_cv_pthreads_lib=-lpthread \
467 apr_cv_tcp_nodelay_with_cork=yes \
468 apr_cv_type_rwlock_t=yes
469
470 # Regarding apr_cv_mutex_robust_shared=no see
471 # http://www.openwall.com/lists/musl/2016/11/26/1
472 # _Don't_ remove quotes below!
473 ifeq ($(CONFIG_LIBC),"musl")
474 CONFIGURE_VARS+= \
475 apr_cv_mutex_robust_shared=no \
476 ac_cv_strerror_r_rc_int=yes
477 else
478 CONFIGURE_VARS+= \
479 apr_cv_mutex_robust_shared=yes
480 endif
481
482 # fs_cli
483 CONFIGURE_VARS+= \
484 disable_cc=yes
485
486 CONFIGURE_ARGS+= \
487 --build=$(GNU_HOST_NAME) \
488 --host=$(GNU_TARGET_NAME) \
489 --target=$(GNU_TARGET_NAME) \
490 --prefix=/usr/share/$(PRG_NAME) \
491 --bindir=/usr/bin \
492 --libdir=/usr/lib \
493 --srcdir=$(PKG_BUILD_DIR) \
494 --sysconfdir=/etc \
495 --disable-dependency-tracking \
496 --disable-static \
497 --disable-system-xmlrpc-c \
498 --enable-fhs \
499 --with-cachedir=/tmp/$(PRG_NAME)/cache \
500 --with-certsdir=/etc/$(PRG_NAME)/tls \
501 --with-dbdir=/tmp/$(PRG_NAME)/db \
502 --with-fontsdir=/usr/share/$(PRG_NAME)/fonts \
503 --with-grammardir=/usr/share/$(PRG_NAME)/grammar \
504 --with-htdocsdir=/usr/share/$(PRG_NAME)/htdocs \
505 --with-imagesdir=/usr/share/$(PRG_NAME)/images \
506 --with-logfiledir=/tmp/$(PRG_NAME)/log \
507 --with-modinstdir=/usr/lib/$(PRG_NAME)/mod \
508 --with-recordingsdir=/tmp/$(PRG_NAME)/recordings \
509 --with-rundir=/var/run/$(PRG_NAME) \
510 --with-scriptdir=/usr/share/$(PRG_NAME)/scripts \
511 --with-soundsdir=/usr/share/$(PRG_NAME)/sounds \
512 --with-storagedir=/tmp/$(PRG_NAME)/storage \
513 --without-erlang \
514 _python_sysroot="$(STAGING_DIR)" \
515 _python_prefix="/usr" \
516 _python_exec_prefix="/usr" \
517 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_LIBEDIT,core-libedit-support) \
518 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ODBC,core-odbc-support) \
519 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_SRTP,srtp) \
520 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ZRTP,zrtp) \
521 $(if $(CONFIG_FS_STABLE_WITH_DEBUG),,--disable-debug) \
522 $(if $(CONFIG_FS_STABLE_WITH_FREETYPE),,--without-freetype) \
523 $(if $(CONFIG_FS_STABLE_WITH_LIBYUV),,--disable-libyuv) \
524 $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \
525 $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
526 $(if $(CONFIG_FS_STABLE_WITH_PGSQL),--enable-core-pgsql-support,--without-pgsql) \
527 $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \
528 $(if $(CONFIG_FS_STABLE_WITH_VPX),,--disable-libvpx)
529
530 define Build/Prepare
531 $(call Build/Prepare/Default)
532 $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
533 $(foreach m,$(FS_STABLE_MOD_AVAILABLE),
534 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
535 $(SED) '/mod_$(m)/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
536
537 $(SED) 's|^LOCAL_CFLAGS=.*|LOCAL_CFLAGS=-I$(PYTHON_INC_DIR)|' \
538 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
539 $(SED) 's|^LOCAL_LDFLAGS=.*|LOCAL_LDFLAGS=$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)|' \
540 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
541 $(SED) 's|^SITE_DIR=.*|SITE_DIR=$$$$(DESTDIR)$(PYTHON_PKG_DIR)|' \
542 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
543 $(SED)'s|swig2.0|$(STAGING_DIR)/host/bin/swig|' \
544 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
545 $(RM) $(PKG_BUILD_DIR)/libs/esl/python/esl_wrap.cpp
546 $(SED)'s|swig2.0|$(STAGING_DIR)/host/bin/swig|' \
547 $(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
548 $(RM) $(PKG_BUILD_DIR)/src/mod/languages/mod_python/mod_python_wrap.cpp
549 $(SED)'s|^PYTHON_SITE_DIR=.*|PYTHON_SITE_DIR=$(PYTHON_PKG_DIR)|' \
550 $(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
551 endef
552
553 define Build/Configure
554 find $(PKG_BUILD_DIR) -name missing -type f -exec rm {} \;
555 cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./rebootstrap.sh
556 $(call Build/Configure/Default)
557 endef
558
559 define Build/Compile
560 $(call Build/Compile/Default)
561 $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod)
562 endef
563
564 define Build/Install
565 $(call Build/Install/Default)
566 $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod-install)
567 endef
568
569 $(eval $(call BuildPackage,$(PKG_NAME)))
570 $(eval $(call BuildPackage,$(PKG_NAME)-hotplug))
571 $(eval $(call BuildPackage,$(PKG_NAME)-python-esl))
572 $(eval $(call BuildPackage,$(PKG_NAME)-timezones))
573
574 ################################
575 # FreeSWITCH example configs
576 # Params:
577 # 1 - Package subname
578 ################################
579
580 $(eval $(call Package/$(PKG_NAME)/Example,curl))
581 $(eval $(call Package/$(PKG_NAME)/Example,insideout))
582 $(eval $(call Package/$(PKG_NAME)/Example,minimal))
583 $(eval $(call Package/$(PKG_NAME)/Example,rayo))
584 $(eval $(call Package/$(PKG_NAME)/Example,sbc))
585 $(eval $(call Package/$(PKG_NAME)/Example,softphone))
586 $(eval $(call Package/$(PKG_NAME)/Example,testing))
587 $(eval $(call Package/$(PKG_NAME)/Example,vanilla))
588
589 ################################
590 # FreeSWITCH language files
591 # Params:
592 # 1 - Language code
593 # 2 - Language
594 ################################
595
596 $(eval $(call Package/$(PKG_NAME)/Language,de,German))
597 $(eval $(call Package/$(PKG_NAME)/Language,en,English))
598 $(eval $(call Package/$(PKG_NAME)/Language,es,Spanish))
599 $(eval $(call Package/$(PKG_NAME)/Language,fr,French))
600 $(eval $(call Package/$(PKG_NAME)/Language,he,Hebrew))
601 $(eval $(call Package/$(PKG_NAME)/Language,pt,Portuguese))
602 $(eval $(call Package/$(PKG_NAME)/Language,ru,Russian))
603 $(eval $(call Package/$(PKG_NAME)/Language,sv,Swedish))
604
605 ################################
606 # FreeSWITCH modules
607 # Params:
608 # 1 - Package subname
609 # 2 - Package title
610 # 3 - Module description
611 # 4 - Module dependencies
612 ################################
613
614 $(eval $(call Package/$(PKG_NAME)/Module,abstraction,API abstraction,This module provides a way to create new API functions via regex\nrewriting.,))
615 $(eval $(call Package/$(PKG_NAME)/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
616 $(eval $(call Package/$(PKG_NAME)/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
617 $(eval $(call Package/$(PKG_NAME)/Module,blacklist,Blacklist helper,This module provides tools to blacklist callers.,))
618 $(eval $(call Package/$(PKG_NAME)/Module,callcenter,Call center,This module implements Automated Call Distribution queues.,))
619 $(eval $(call Package/$(PKG_NAME)/Module,cdr_csv,CSV CDR,CSV Call Detail Record handler.,))
620 $(eval $(call Package/$(PKG_NAME)/Module,cdr_sqlite,SQLite CDR,SQLite Call Detail Record handler.,))
621 $(eval $(call Package/$(PKG_NAME)/Module,cidlookup,Caller ID lookup,This module provides an API for querying caller ID name and location\ndata.,))
622 $(eval $(call Package/$(PKG_NAME)/Module,commands,Commands,This module provides miscellaneous API commands.,))
623 $(eval $(call Package/$(PKG_NAME)/Module,conference,Conference,This module provides multi-party conferencing.,))
624 $(eval $(call Package/$(PKG_NAME)/Module,console,Console logger,Allows control over what messages get logged to the console. When\nFreeSWITCH is compiled without libedit support - this is not the\ndefault - mod_console has no effect because the init script starts\nFreeSWITCH with the console disabled to work around an\ninteroperability issue that causes high CPU load.,))
625 $(eval $(call Package/$(PKG_NAME)/Module,curl,cURL,This module provides an API for making HTTP requests with cURL.,))
626 $(eval $(call Package/$(PKG_NAME)/Module,db,DB,This module implements a simple db API with group support. Also can be\nused as a limit db backend.,+libdb47))
627 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_asterisk,Asterisk dialplan,Asterisk extensions.conf style dialplan parser.,))
628 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_xml,XML dialplan,Standard FreeSWITCH XML dialplan support.,))
629 $(eval $(call Package/$(PKG_NAME)/Module,dingaling,Generic XMPP,Allows FreeSWITCH to be used as a client for XMPP Servers.,))
630 $(eval $(call Package/$(PKG_NAME)/Module,directory,Dial-by-name directory,This module implements a dial-by-name directory IVR.,))
631 $(eval $(call Package/$(PKG_NAME)/Module,distributor,Load distributor,This module implements a mechanism for performing load balancing.,))
632 $(eval $(call Package/$(PKG_NAME)/Module,dptools,Dialplan tools,This module implements basic dialplan tools.,))
633 $(eval $(call Package/$(PKG_NAME)/Module,easyroute,DID routing,This module does destination lookup based on DID.,))
634 $(eval $(call Package/$(PKG_NAME)/Module,enum,ENUM routing,This module implements ENUM support.,+libldns))
635 $(eval $(call Package/$(PKG_NAME)/Module,esf,Multicast,This module adds multi-cast support.,))
636 $(eval $(call Package/$(PKG_NAME)/Module,esl,Single ESL,This module adds an API for generating one-off ESL requests.,))
637 $(eval $(call Package/$(PKG_NAME)/Module,event_multicast,Multicast Event,Multicast Event System for FreeSWITCH.,))
638 $(eval $(call Package/$(PKG_NAME)/Module,event_socket,Event socket,Sends events via a single socket. Needed for fs_cli.,))
639 $(eval $(call Package/$(PKG_NAME)/Module,expr,Expr,This module adds expr support for expression evaluation.,))
640 $(eval $(call Package/$(PKG_NAME)/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
641 $(eval $(call Package/$(PKG_NAME)/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
642 $(eval $(call Package/$(PKG_NAME)/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,))
643 $(eval $(call Package/$(PKG_NAME)/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
644 $(eval $(call Package/$(PKG_NAME)/Module,g729,G.729 passthrough,G.729 codec passthrough.,))
645 $(eval $(call Package/$(PKG_NAME)/Module,hash,Hash,This module provides a key-value in-memory datastore. Usable as a\nlimit backend.,))
646 $(eval $(call Package/$(PKG_NAME)/Module,hiredis,Redis client,This module provides a mechanism to use Redis as a datastore.,libhiredis))
647 $(eval $(call Package/$(PKG_NAME)/Module,httapi,HT-TAPI,This module provides an API for controlling the switch by responding\nto HTTP requests.,))
648 $(eval $(call Package/$(PKG_NAME)/Module,http_cache,HTTP GET with caching,This module provides an API for making HTTP GET requests where the\nresult is cached.,))
649 $(eval $(call Package/$(PKG_NAME)/Module,json_cdr,JSON CDR,JSON-based Call Detail Record handler.,))
650 $(eval $(call Package/$(PKG_NAME)/Module,lcr,LCR,This module adds a facility for least-cost routing.,))
651 $(eval $(call Package/$(PKG_NAME)/Module,local_stream,Local stream,Connects multiple channels to a looped stream.,))
652 $(eval $(call Package/$(PKG_NAME)/Module,logfile,File logger,Logs FreeSWITCH output to a file.,))
653 $(eval $(call Package/$(PKG_NAME)/Module,loopback,Loopback,A loopback channel driver.,))
654 $(eval $(call Package/$(PKG_NAME)/Module,lua,Lua,Lua language interface for FreeSWITCH.,+liblua))
655 $(eval $(call Package/$(PKG_NAME)/Module,native_file,Native file,Plays files that are already encoded in the right format.,))
656 $(eval $(call Package/$(PKG_NAME)/Module,odbc_cdr,ODBC CDR,ODBC Call Detail Record handler.,))
657 $(eval $(call Package/$(PKG_NAME)/Module,python,Python,Python support module.,+python-light))
658 $(eval $(call Package/$(PKG_NAME)/Module,redis,Redis limit backend,This module provides a mechanism to use Redis as a limit backend data\nstore.,))
659 $(eval $(call Package/$(PKG_NAME)/Module,rtc,Media streaming,Media streaming as used by WebRTC and mod_verto.,))
660 $(eval $(call Package/$(PKG_NAME)/Module,rtmp,RTMP endpoint,RTMP endpoint support. Allows FreeSWITCH to be used from RTMP clients.,))
661 $(eval $(call Package/$(PKG_NAME)/Module,say_de,German Say,Uses prerecorded sounds to read or say various things.,))
662 $(eval $(call Package/$(PKG_NAME)/Module,say_en,English Say,Uses prerecorded sounds to read or say various things.,))
663 $(eval $(call Package/$(PKG_NAME)/Module,say_es,Spanish Say,Uses prerecorded sounds to read or say various things.,))
664 $(eval $(call Package/$(PKG_NAME)/Module,say_es_ar,Argentinian Spanish Say,Uses prerecorded sounds to read or say various things.,))
665 $(eval $(call Package/$(PKG_NAME)/Module,say_fa,Persian Say,Uses prerecorded sounds to read or say various things.,))
666 $(eval $(call Package/$(PKG_NAME)/Module,say_fr,French Say,Uses prerecorded sounds to read or say various things.,))
667 $(eval $(call Package/$(PKG_NAME)/Module,say_he,Hebrew Say,Uses prerecorded sounds to read or say various things.,))
668 $(eval $(call Package/$(PKG_NAME)/Module,say_hr,Croatian Say,Uses prerecorded sounds to read or say various things.,))
669 $(eval $(call Package/$(PKG_NAME)/Module,say_hu,Hungarian Say,Uses prerecorded sounds to read or say various things.,))
670 $(eval $(call Package/$(PKG_NAME)/Module,say_it,Italian Say,Uses prerecorded sounds to read or say various things.,))
671 $(eval $(call Package/$(PKG_NAME)/Module,say_ja,Japanese Say,Uses prerecorded sounds to read or say various things.,))
672 $(eval $(call Package/$(PKG_NAME)/Module,say_nl,Dutch Say,Uses prerecorded sounds to read or say various things.,))
673 $(eval $(call Package/$(PKG_NAME)/Module,say_pl,Polish Say,Uses prerecorded sounds to read or say various things.,))
674 $(eval $(call Package/$(PKG_NAME)/Module,say_pt,Portuguese Say,Uses prerecorded sounds to read or say various things.,))
675 $(eval $(call Package/$(PKG_NAME)/Module,say_ru,Russian Say,Uses prerecorded sounds to read or say various things.,))
676 $(eval $(call Package/$(PKG_NAME)/Module,say_sv,Swedish Say,Uses prerecorded sounds to read or say various things.,))
677 $(eval $(call Package/$(PKG_NAME)/Module,say_th,Thai Say,Uses prerecorded sounds to read or say various things.,))
678 $(eval $(call Package/$(PKG_NAME)/Module,say_zh,Chinese Say,Uses prerecorded sounds to read or say various things.,))
679 $(eval $(call Package/$(PKG_NAME)/Module,sndfile,Soundfile,Adds sound format support via libsndfile.,+libsndfile))
680 $(eval $(call Package/$(PKG_NAME)/Module,snom,SNOM,This module implements features specific to SNOM phones.,))
681 $(eval $(call Package/$(PKG_NAME)/Module,sofia,Sofia SIP,SIP module.,))
682 $(eval $(call Package/$(PKG_NAME)/Module,spandsp,SpanDSP,This module implements SpanDSP fax. It includes DSP and codec\nfunctionality.,+libjpeg +liblzma))
683 $(eval $(call Package/$(PKG_NAME)/Module,spy,User Spy,This module adds the ability to monitor the audio of a channel.,))
684 $(eval $(call Package/$(PKG_NAME)/Module,syslog,Syslog logger,Logs FreeSWITCH output to the syslog.,))
685 $(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation stream.,))
686 $(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
687 $(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
688 $(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
689 $(eval $(call Package/$(PKG_NAME)/Module,voicemail,Voicemail,This module provides a voicemail system.,))
690 $(eval $(call Package/$(PKG_NAME)/Module,xml_cdr,XML CDR,XML Call Detail Record handler.,))
691 $(eval $(call Package/$(PKG_NAME)/Module,xml_rpc,XML RPC,Allows using the webapi to control FreeSWITCH.,))
692 $(eval $(call Package/$(PKG_NAME)/Module,xml_scgi,XML SCGI,SCGI XML Gateway.,))
693
694 ################################
695 # FreeSWITCH utilities
696 # Params:
697 # 1 - Package subname
698 # 2 - Package title
699 # 3 - Utility description
700 # 4 - Utility dependencies
701 # 5 - Utility is a script (y/n)
702 ################################
703
704 $(eval $(call Package/$(PKG_NAME)/Util,fs_cli,CLI,The fs_cli program is a Command-Line Interface that allows a user to\nconnect to a FreeSWITCH instance running on the local or a remote\nsystem.,$(FS_STABLE_DEPS_BASE) +FS_STABLE_WITH_LIBEDIT:libedit,n))
705 $(eval $(call Package/$(PKG_NAME)/Util,fs_encode,Sound file conversion,Format conversion of sound files so the result can be used by\nmod_native_file.,$(FS_STABLE_DEPS) +$(PKG_NAME)-mod-native_file +$(PKG_NAME)-mod-sndfile +$(PKG_NAME)-mod-spandsp,n))
706 $(eval $(call Package/$(PKG_NAME)/Util,fs_ivrd,IVR daemon,The FreeSWITCH IVR daemon is an abstraction layer that sits on top of\nthe ESL. The basic idea is that the ivrd will allow the user to have\na STDIN/STDOUT interface for simple call control.,$(FS_STABLE_DEPS_BASE),n))
707 $(eval $(call Package/$(PKG_NAME)/Util,gentls_cert,TLS certificate,Can be used to create TLS certificates and setup CAs.,+openssl-util,y))
708 $(eval $(call Package/$(PKG_NAME)/Util,tone2wav,Sound file generation,Generates a sound file from a teletone script. The output can be in\nany format that is supported by libsndfile.,$(FS_STABLE_DEPS) +$(PKG_NAME)-mod-sndfile,n))