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