asterisk: add SMS application helper
[feed/telephony.git] / net / asterisk-1.8.x / Makefile
1 #
2 # Copyright (C) 2014 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 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=asterisk18
11 PKG_VERSION:=1.8.29.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
16 PKG_MD5SUM:=23778d7ebefdecd4c742d5de39f5e2c1
17
18 PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/ltqtapi.mk
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/asterisk18/Default
24 SUBMENU:=Telephony
25 SECTION:=net
26 CATEGORY:=Network
27 URL:=http://www.asterisk.org/
28 endef
29
30 define Package/asterisk18/Default/description
31 Asterisk is a complete PBX in software. It provides all of the features
32 you would expect from a PBX and more. Asterisk does voice over IP in three
33 protocols, and can interoperate with almost all standards-based telephony
34 equipment using relatively inexpensive hardware.
35 endef
36
37 define Package/asterisk18
38 $(call Package/asterisk18/Default)
39 TITLE:=Complete open source PBX, v1.8x
40 MENU:=1
41 DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32
42 endef
43
44 define Package/asterisk18/description
45 $(call Package/asterisk18/Default/description)
46 endef
47
48 define Package/asterisk18-sounds
49 $(call Package/asterisk18/Default)
50 TITLE:=Sound files
51 DEPENDS:= asterisk18
52 endef
53
54 define Package/asterisk18-sounds/description
55 $(call Package/asterisk18/Default/description)
56 This package contains sound files for Asterisk.
57 endef
58
59 define Package/asterisk18-voicemail
60 $(call Package/asterisk18/Default)
61 TITLE:=Voicemail support
62 DEPENDS:= asterisk18
63 endef
64
65 define Package/asterisk18-voicemail/description
66 $(call Package/asterisk18/Default/description)
67 This package contains voicemail related modules for Asterisk.
68 endef
69
70 define Package/asterisk18-chan-iax2
71 $(call Package/asterisk18/Default)
72 TITLE:=IAX support
73 DEPENDS:= asterisk18 +asterisk18-res-crypto +asterisk18-res-timing-timerfd
74 endef
75
76 define Package/asterisk18-chan-iax2/description
77 $(call Package/asterisk18/Default/description)
78 This package provides IAX support to
79 Asterisk.
80 endef
81
82 define Package/asterisk18-cdr
83 $(call Package/asterisk18/Default)
84 TITLE:=CDR support
85 DEPENDS:= asterisk18
86 endef
87
88 define Package/asterisk18-cdr/description
89 $(call Package/asterisk18/Default/description)
90 This package provides Call Detail Record support to
91 Asterisk.
92 endef
93
94 define Package/asterisk18-pgsql
95 $(call Package/asterisk18/Default)
96 TITLE:=PostgreSQL support
97 DEPENDS:= asterisk18 +libpq
98 endef
99
100 define Package/asterisk18-pgsql/description
101 $(call Package/asterisk18/Default/description)
102 This package provides PostgreSQL support to
103 Asterisk.
104 endef
105
106 define Package/asterisk18-res-musiconhold
107 $(call Package/asterisk18/Default)
108 TITLE:=MOH support
109 DEPENDS:= asterisk18
110 endef
111
112 define Package/asterisk18-res-musiconhold/description
113 $(call Package/asterisk18/Default/description)
114 This package provides Music On Hold support to
115 Asterisk.
116 endef
117
118 define Package/asterisk18-res-srtp
119 $(call Package/asterisk18/Default)
120 TITLE:=SRTP support
121 DEPENDS:= asterisk18 libsrtp +asterisk18-res-crypto
122 endef
123
124 define Package/asterisk18-res-srtp/description
125 $(call Package/asterisk18/Default/description)
126 This package provides SRTP support to
127 Asterisk.
128 endef
129
130 define Package/asterisk18-chan-gtalk
131 $(call Package/asterisk18/Default)
132 TITLE:=GTalk support
133 DEPENDS:= asterisk18 +libiksemel
134 endef
135
136 define Package/asterisk18-chan-gtalk/description
137 $(call Package/asterisk18/Default/description)
138 This package provides the channel chan_gtalk and res_jabber for GTalk
139 support to Asterisk.
140 endef
141
142 define Package/asterisk18-chan-mobile
143 $(call Package/asterisk18/Default)
144 TITLE:=Mobile channel support
145 DEPENDS:= asterisk18 +bluez-libs
146 endef
147
148 define Package/asterisk18-chan-mobile/description
149 $(call Package/asterisk18/Default/description)
150 This package provides the channel chan_mobile support to Asterisk.
151 endef
152
153 define Package/asterisk18-res-timing-timerfd
154 $(call Package/asterisk18/Default)
155 TITLE:= Timerfd Timing Interface
156 DEPENDS:= asterisk18
157 endef
158
159 define Package/asterisk18-res-timing-pthread
160 $(call Package/asterisk18/Default)
161 TITLE:= pthread Timing Interface
162 DEPENDS:= asterisk18
163 endef
164
165 define Package/asterisk18-res-fax
166 $(call Package/asterisk18/Default)
167 TITLE:=Generic FAX Resource for FAX technology resource modules
168 DEPENDS:= asterisk18 +asterisk18-res-timing-pthread
169 endef
170
171 define Package/asterisk18-res-fax-spandsp
172 $(call Package/asterisk18/Default)
173 TITLE:=Spandsp T.38 and G.711 FAX Resource
174 DEPENDS:= asterisk18 +asterisk18-res-fax +libspandsp
175 endef
176
177 define Package/asterisk18-chan-mgcp
178 $(call Package/asterisk18/Default)
179 TITLE:=MGCP channel support
180 DEPENDS:= asterisk18
181 endef
182
183 define Package/asterisk18-chan-mgcp/description
184 $(call Package/asterisk18/Default/description)
185 This package provides the channel chan_mgcp support to Asterisk.
186 endef
187
188 define Package/asterisk18-chan-skinny
189 $(call Package/asterisk18/Default)
190 TITLE:=Skinny channel support
191 DEPENDS:= asterisk18
192 endef
193
194 define Package/asterisk18-chan-skinny/description
195 $(call Package/asterisk18/Default/description)
196 This package provides the channel chan_skinny support to Asterisk.
197 endef
198
199 define Package/asterisk18-curl
200 $(call Package/asterisk18/Default)
201 TITLE:=CURL support
202 DEPENDS:= asterisk18 +libcurl
203 endef
204
205 define Package/asterisk18-curl/description
206 $(call Package/asterisk18/Default/description)
207 This package provides CURL
208 support to Asterisk.
209 endef
210
211 define Package/asterisk18-mysql
212 $(call Package/asterisk18/Default)
213 TITLE:=MySQL support
214 DEPENDS:= asterisk18 +PACKAGE_asterisk18-mysql:libmysqlclient
215 endef
216
217 define Package/asterisk18-mysql/description
218 $(call Package/asterisk18/Default/description)
219 This package provides MySQL
220 support to Asterisk.
221 endef
222
223 define Package/asterisk18-chan-lantiq
224 $(call Package/asterisk18/Default)
225 TITLE:=Lantiq TAPI support
226 DEPENDS:= asterisk18 $(LTQ_TAPI_DEPENDS)
227 URL:=http://git.nanl.de/?p=asterisk_channel_lantiq.git
228 MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
229 endef
230
231 define Package/asterisk18-chan-lantiq/description
232 $(call Package/asterisk18/Default/description)
233 This package provides the channel chan_lantiq support to Asterisk.
234 endef
235
236 define Package/asterisk18-odbc
237 $(call Package/asterisk18/Default)
238 TITLE:=ODBC support
239 DEPENDS:= asterisk18 +libpthread +libc +unixodbc
240 endef
241
242 define Package/asterisk18-odbc/description
243 $(call Package/asterisk18/Default/description)
244 This package provides ODBC support for Asterisk.
245 endef
246
247 define Package/asterisk18-pbx-lua
248 $(call Package/asterisk18/Default)
249 TITLE:=Lua support
250 DEPENDS:= asterisk18 +libpthread +libc +liblua
251 endef
252
253 define Package/asterisk18-pbx-lua/description
254 $(call Package/asterisk18/Default/description)
255 This package provides Lua resources for Asterisk.
256 endef
257
258 define Package/asterisk18-smsq
259 $(call Package/asterisk18/Default)
260 TITLE:=SMS application helper
261 DEPENDS:= asterisk18 +libpopt +libstdcpp
262 endef
263
264 define Package/asterisk18-smsq/description
265 $(call Package/asterisk18/Default/description)
266 This package provides support for sending SMS from CLI via Asterisk.
267 endef
268
269 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-gtalk),)
270 CONFIGURE_ARGS+= \
271 --with-iksemel="$(STAGING_DIR)/usr"
272 SITE_VARS+= \
273 ac_cv_lib_iksemel_iks_start_sasl=yes
274 else
275 CONFIGURE_ARGS+= \
276 --without-iksemel
277 endif
278
279 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-curl),)
280 CONFIGURE_ARGS+= \
281 --with-libcurl="$(STAGING_DIR)/usr"
282 else
283 CONFIGURE_ARGS+= \
284 --without-libcurl
285 endif
286
287 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pgsql),)
288 CONFIGURE_ARGS+= \
289 --with-postgres="$(STAGING_DIR)/usr"
290 else
291 CONFIGURE_ARGS+= \
292 --without-postgres
293 endif
294
295 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mysql),)
296 CONFIGURE_ARGS+= \
297 --with-mysqlclient
298 else
299 CONFIGURE_ARGS+= \
300 --without-mysqlclient
301 endif
302
303 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-res-fax-spandsp),)
304 CONFIGURE_ARGS+= \
305 --with-spandsp="$(STAGING_DIR)/usr"
306 else
307 CONFIGURE_ARGS+= \
308 --without-spandsp
309 endif
310
311 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-mobile),)
312 CONFIGURE_ARGS+= \
313 --with-bluetooth="$(STAGING_DIR)/usr"
314 else
315 CONFIGURE_ARGS+= \
316 --without-bluetooth
317 endif
318
319 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-res-srtp),)
320 CONFIGURE_ARGS+= \
321 --with-srtp="$(STAGING_DIR)/usr"
322 else
323 CONFIGURE_ARGS+= \
324 --without-srtp
325 endif
326
327 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pbx-lua),)
328 CONFIGURE_ARGS+= \
329 --with-lua="$(STAGING_DIR)/usr"
330 TARGET_LDFLAGS+=-ldl -lcrypt
331 else
332 CONFIGURE_ARGS+= \
333 --without-lua
334 endif
335
336 CONFIGURE_ARGS+= \
337 --without-curses \
338 --with-gsm=internal \
339 --without-cap \
340 --without-dahdi \
341 --without-gtk2 \
342 --without-isdnnet \
343 --without-misdn \
344 --without-nbs \
345 --with-ncurses="$(STAGING_DIR)/usr" \
346 --without-netsnmp \
347 --without-newt \
348 --without-ogg \
349 --without-osptk \
350 --with-popt="$(STAGING_DIR)/usr" \
351 --without-pri \
352 --without-radius \
353 --without-sdl \
354 --without-suppserv \
355 --without-tds \
356 --without-termcap \
357 --without-tinfo \
358 --without-vorbis \
359 --without-vpb \
360 --with-z="$(STAGING_DIR)/usr" \
361 --with-sounds-cache="$(DL_DIR)" \
362 --disable-xmldoc
363
364 EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
365 EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
366
367 define Build/Prepare
368 $(call Build/Prepare/Default)
369 ifneq ($(CONFIG_TARGET_lantiq),)
370 $(CP) ./src-lantiq/* $(PKG_BUILD_DIR)/
371 endif
372 endef
373
374 define Build/Configure
375 $(call Build/Configure/Default,,$(SITE_VARS))
376 endef
377
378 define Build/Compile
379 $(MAKE) -C "$(PKG_BUILD_DIR)" \
380 include/asterisk/version.h \
381 include/asterisk/buildopts.h defaults.h \
382 makeopts.embed_rules
383 ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
384 ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
385 $(MAKE) -C "$(PKG_BUILD_DIR)" \
386 ASTVARLIBDIR="/usr/lib/asterisk" \
387 ASTDATADIR="/usr/lib/asterisk" \
388 ASTKEYDIR="/usr/lib/asterisk" \
389 ASTDBDIR="/usr/lib/asterisk" \
390 NOISY_BUILD="1" \
391 DEBUG="" \
392 OPTIMIZE="" \
393 DESTDIR="$(PKG_INSTALL_DIR)" \
394 all install samples
395 endef
396
397 define Build/InstallDev
398 $(INSTALL_DIR) $(1)/usr/include/asterisk-1.8/include/asterisk/
399 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.8/include/asterisk/
400 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.8/include/
401 endef
402
403 define Package/asterisk18/conffiles
404 /etc/asterisk/asterisk.conf
405 /etc/asterisk/modules.conf
406 /etc/asterisk/extensions.conf
407 /etc/asterisk/sip.conf
408 /etc/asterisk/sip_notify.conf
409 /etc/asterisk/features.conf
410 /etc/asterisk/indications.conf
411 /etc/asterisk/logger.conf
412 /etc/asterisk/manager.conf
413 /etc/asterisk/rtp.conf
414 /etc/default/asterisk
415 /etc/init.d/asterisk
416 endef
417
418 define Package/asterisk18/install
419 $(INSTALL_DIR) $(1)/etc/asterisk
420 for f in asterisk extensions features \
421 indications logger manager modules \
422 sip sip_notify rtp; do \
423 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
424 done
425 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
426 for f in app_dial app_echo app_playback app_macro \
427 chan_sip res_rtp_asterisk res_rtp_multicast \
428 codec_ulaw codec_gsm \
429 format_gsm format_pcm format_wav format_wav_gsm \
430 pbx_config \
431 func_strings func_timeout func_callerid func_logic; do \
432 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
433 done
434 $(INSTALL_DIR) $(1)/usr/sbin
435 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
436 $(INSTALL_DIR) $(1)/etc/default
437 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
438 $(INSTALL_DIR) $(1)/etc/init.d
439 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
440 endef
441
442 define Package/asterisk18-sounds/install
443 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
444 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
445 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
446 rm -f $(1)/usr/lib/asterisk/sounds/conf-*
447 endef
448
449
450 define Package/asterisk18-voicemail/conffiles
451 /etc/asterisk/voicemail.conf
452 endef
453
454 define Package/asterisk18-voicemail/install
455 $(INSTALL_DIR) $(1)/etc/asterisk
456 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
457 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
458 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
459 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
460 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_smdi.so $(1)/usr/lib/asterisk/modules/
461 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
462 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
463 endef
464
465 define Package/asterisk18-chan-iax2/conffiles
466 /etc/asterisk/iax.conf
467 /etc/asterisk/iaxprov.conf
468 endef
469
470 define Package/asterisk18-cdr/conffiles
471 /etc/asterisk/cdr.conf
472 /etc/asterisk/cdr_custom.conf
473 /etc/asterisk/cdr_manager.conf
474 /etc/asterisk/cdr_syslog.conf
475 endef
476
477 define Package/asterisk18-res-musiconhold/conffiles
478 /etc/asterisk/musiconhold.conf
479 endef
480
481 define Package/asterisk18-chan-iax2/install
482 $(INSTALL_DIR) $(1)/etc/asterisk
483 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
484 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
485 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
486 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
487 endef
488
489 define Package/asterisk18-cdr/install
490 $(INSTALL_DIR) $(1)/etc/asterisk
491 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/{cdr,cdr_custom,cdr_manager,cdr_syslog}.conf $(1)/etc/asterisk/
492 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
493 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/{app_,app_fork,func_}cdr.so $(1)/usr/lib/asterisk/modules/
494 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_csv.so $(1)/usr/lib/asterisk/modules/
495 endef
496
497 define Package/asterisk18-pgsql/conffiles
498 /etc/asterisk/cel_pgsql.conf
499 /etc/asterisk/cdr_pgsql.conf
500 /etc/asterisk/res_pgsql.conf
501 endef
502
503 define Package/asterisk18-pgsql/install
504 $(INSTALL_DIR) $(1)/etc/asterisk
505 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/{cel,cdr,res}_pgsql.conf $(1)/etc/asterisk/
506 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
507 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/{cel,cdr,res_config}_pgsql.so $(1)/usr/lib/asterisk/modules/
508 endef
509
510 define Package/asterisk18-res-musiconhold/install
511 $(INSTALL_DIR) $(1)/etc/asterisk
512 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf $(1)/etc/asterisk/
513 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
514 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/
515 endef
516
517 define Package/asterisk18-chan-gtalk/conffiles
518 /etc/asterisk/gtalk.conf
519 /etc/asterisk/jabber.conf
520 endef
521
522 define Package/asterisk18-chan-gtalk/install
523 $(INSTALL_DIR) $(1)/etc/asterisk
524 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
525 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
526 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
527 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
528 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
529 endef
530
531 define Package/asterisk18-chan-mobile/conffiles
532 /etc/asterisk/chan_mobile.conf
533 endef
534
535 define Package/asterisk18-chan-mobile/install
536 $(INSTALL_DIR) $(1)/etc/asterisk
537 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/chan_mobile.conf $(1)/etc/asterisk/
538 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
539 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.so $(1)/usr/lib/asterisk/modules/
540 endef
541
542 define Package/asterisk18-res-timing-timerfd/install
543 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
544 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_timerfd.so $(1)/usr/lib/asterisk/modules/
545 endef
546
547 define Package/asterisk18-res-timing-pthread/install
548 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
549 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_pthread.so $(1)/usr/lib/asterisk/modules/
550 endef
551
552 define Package/asterisk18-res-fax/conffiles
553 /etc/asterisk/res_fax.conf
554 endef
555
556 define Package/asterisk18-res-fax/install
557 $(INSTALL_DIR) $(1)/etc/asterisk
558 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_fax.conf $(1)/etc/asterisk/
559 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
560 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_fax.so $(1)/usr/lib/asterisk/modules/
561 endef
562
563 define Package/asterisk18-res-fax-spandsp/install
564 $(INSTALL_DIR) $(1)/etc/asterisk
565 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
566 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_fax_spandsp.so $(1)/usr/lib/asterisk/modules/
567 endef
568
569 define Package/asterisk18-chan-mgcp/conffiles
570 /etc/asterisk/mgcp.conf
571 endef
572
573 define Package/asterisk18-chan-mgcp/install
574 $(INSTALL_DIR) $(1)/etc/asterisk
575 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
576 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
577 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
578 endef
579
580 define Package/asterisk18-chan-skinny/conffiles
581 /etc/asterisk/skinny.conf
582 endef
583
584 define Package/asterisk18-chan-skinny/install
585 $(INSTALL_DIR) $(1)/etc/asterisk
586 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
587 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
588 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
589 endef
590
591 define Package/asterisk18-curl/install
592 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
593 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/func_curl.so $(1)/usr/lib/asterisk/modules/
594 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_curl.so $(1)/usr/lib/asterisk/modules/
595 endef
596
597 define Package/asterisk18-mysql/conffiles
598 /etc/asterisk/app_mysql.conf
599 /etc/asterisk/res_config_mysql.conf
600 /etc/asterisk/cdr_mysql.conf
601 endef
602
603 define Package/asterisk18-mysql/install
604 $(INSTALL_DIR) $(1)/etc/asterisk
605 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/app_mysql.conf $(1)/etc/asterisk/
606 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_config_mysql.conf $(1)/etc/asterisk/
607 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr_mysql.conf $(1)/etc/asterisk/
608 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
609 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_mysql.so $(1)/usr/lib/asterisk/modules/
610 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_mysql.so $(1)/usr/lib/asterisk/modules/
611 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_mysql.so $(1)/usr/lib/asterisk/modules/
612 endef
613
614 define Package/asterisk18-chan-lantiq/conffiles
615 /etc/asterisk/lantiq.conf
616 endef
617
618 define Package/asterisk18-chan-lantiq/install
619 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
620 $(INSTALL_DIR) $(1)/etc/asterisk
621 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/lantiq.conf $(1)/etc/asterisk/
622 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_lantiq.so $(1)/usr/lib/asterisk/modules/
623 endef
624
625 define Package/asterisk18-res-srtp/install
626 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
627 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_srtp.so $(1)/usr/lib/asterisk/modules/
628 endef
629
630 define Package/asterisk18-odbc/conffiles
631 /etc/asterisk/cdr_adaptive_odbc.conf
632 /etc/asterisk/cdr_odbc.conf
633 /etc/asterisk/cel_odbc.conf
634 /etc/asterisk/func_odbc.conf
635 /etc/asterisk/res_odbc.conf
636 endef
637
638 define Package/asterisk18-odbc/install
639 $(INSTALL_DIR) $(1)/etc/asterisk
640 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/{cdr_adaptive,cdr,cel,func,res}_odbc.conf $(1)/etc/asterisk/
641 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
642 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/{cdr_adaptive,cdr,cel,func,res_config,res}_odbc.so $(1)/usr/lib/asterisk/modules/
643 endef
644
645 define Package/asterisk18-pbx-lua/install
646 $(INSTALL_DIR) $(1)/etc/asterisk
647 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/extensions.lua $(1)/etc/asterisk/
648 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
649 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/pbx_lua.so $(1)/usr/lib/asterisk/modules/
650 endef
651
652 define Package/asterisk18-smsq/install
653 $(INSTALL_DIR) $(1)/usr/sbin/
654 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smsq $(1)/usr/sbin/
655 endef
656
657 define Buildasterisk18ModuleTemplate
658
659 define Package/asterisk18-$(subst _,-,$(1))
660 $$(call Package/asterisk18/Default)
661 TITLE:=$(2) support
662 DEPENDS:= asterisk18 $(patsubst +%,+PACKAGE_asterisk18-$(subst _,-,$(1)):%,$(4))
663 endef
664
665 define Package/asterisk18-$(subst _,-,$(1))/description
666 $$(call Package/asterisk18/Default/description)
667 This package provides support $(3) in Asterisk.
668 endef
669
670 define Package/asterisk18-$(subst _,-,$(1))/install
671 $(INSTALL_DIR) $$(1)/usr/lib/asterisk/modules
672 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$(1).so $$(1)/usr/lib/asterisk/modules/
673 endef
674
675 $$(eval $$(call BuildPackage,asterisk18-$(subst _,-,$(1))))
676 endef
677
678 $(eval $(call BuildPackage,asterisk18))
679 $(eval $(call BuildPackage,asterisk18-voicemail))
680 $(eval $(call BuildPackage,asterisk18-sounds))
681 $(eval $(call BuildPackage,asterisk18-chan-iax2))
682 $(eval $(call BuildPackage,asterisk18-cdr))
683 $(eval $(call BuildPackage,asterisk18-res-musiconhold))
684 $(eval $(call BuildPackage,asterisk18-chan-gtalk))
685 $(eval $(call BuildPackage,asterisk18-chan-mobile))
686 $(eval $(call BuildPackage,asterisk18-odbc))
687 $(eval $(call BuildPackage,asterisk18-pgsql))
688 $(eval $(call BuildPackage,asterisk18-pbx-lua))
689 $(eval $(call BuildPackage,asterisk18-res-fax))
690 $(eval $(call BuildPackage,asterisk18-res-fax-spandsp))
691 $(eval $(call BuildPackage,asterisk18-res-timing-timerfd))
692 $(eval $(call BuildPackage,asterisk18-res-timing-pthread))
693 $(eval $(call BuildPackage,asterisk18-chan-mgcp))
694 $(eval $(call BuildPackage,asterisk18-chan-skinny))
695 $(eval $(call BuildPackage,asterisk18-curl))
696 $(eval $(call BuildPackage,asterisk18-mysql))
697 $(eval $(call BuildPackage,asterisk18-chan-lantiq))
698 $(eval $(call BuildPackage,asterisk18-res-srtp))
699 $(eval $(call BuildPackage,asterisk18-smsq))
700 $(eval $(call Buildasterisk18ModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands))
701 $(eval $(call Buildasterisk18ModuleTemplate,app_chanisavail,Channel availability check,support for checking if a channel is available))
702 $(eval $(call Buildasterisk18ModuleTemplate,app_chanspy,Channel listen in,support for listening in on any channel))
703 $(eval $(call Buildasterisk18ModuleTemplate,app_directed_pickup,Directed call pickup,support for directed call pickup))
704 $(eval $(call Buildasterisk18ModuleTemplate,app_exec,Exec application,support for application execution))
705 $(eval $(call Buildasterisk18ModuleTemplate,app_followme,FollowMe application,support for FollowMe functionality,+asterisk18-chan-local))
706 $(eval $(call Buildasterisk18ModuleTemplate,app_minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail system))
707 $(eval $(call Buildasterisk18ModuleTemplate,app_readexten,Extension to variable,a trivial application to read an extension into a variable))
708 $(eval $(call Buildasterisk18ModuleTemplate,app_read,Variable read,a trivial application to read a variable))
709 $(eval $(call Buildasterisk18ModuleTemplate,app_sayunixtime,Say Unix time,an application to say Unix time))
710 $(eval $(call Buildasterisk18ModuleTemplate,app_sms,SMS,SMS support (ETSI ES 201 912 protocol 1),+asterisk18-smsq))
711 $(eval $(call Buildasterisk18ModuleTemplate,app_stack,Stack applications, stack applications Gosub Return etc., +asterisk18-res-agi))
712 $(eval $(call Buildasterisk18ModuleTemplate,app_system,System exec,support for executing system commands))
713 $(eval $(call Buildasterisk18ModuleTemplate,app_talkdetect,File playback with audio detect,for file playback with audio detect))
714 $(eval $(call Buildasterisk18ModuleTemplate,app_waituntil,Sleep,support sleeping until the given epoch))
715 $(eval $(call Buildasterisk18ModuleTemplate,app_while,While loop,a while loop implementation))
716 $(eval $(call Buildasterisk18ModuleTemplate,chan_agent,Agents proxy channel, an implementation of agents proxy channel))
717 $(eval $(call Buildasterisk18ModuleTemplate,chan_local,Local proxy channel, an implementation of local proxy channel))
718 $(eval $(call Buildasterisk18ModuleTemplate,codec_alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs))
719 $(eval $(call Buildasterisk18ModuleTemplate,codec_a_mu,Alaw to ulaw translation,translation between alaw and ulaw codecs))
720 $(eval $(call Buildasterisk18ModuleTemplate,codec_g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec))
721 $(eval $(call Buildasterisk18ModuleTemplate,codec_g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs))
722 $(eval $(call Buildasterisk18ModuleTemplate,format_g726,G.726,support for headerless G.726 16/24/32/40kbps data format))
723 $(eval $(call Buildasterisk18ModuleTemplate,format_g729,G.729,support for raw headerless G729 data))
724 $(eval $(call Buildasterisk18ModuleTemplate,format_sln,Raw slinear format,support for raw slinear format))
725 $(eval $(call Buildasterisk18ModuleTemplate,format_sln16,Raw slinear 16 format,support for Raw slinear 16 format))
726 $(eval $(call Buildasterisk18ModuleTemplate,func_db,Database interaction,functions for interaction with the database))
727 $(eval $(call Buildasterisk18ModuleTemplate,func_devstate,Blinky lights control,functions for manually controlled blinky lights))
728 $(eval $(call Buildasterisk18ModuleTemplate,func_vmcount,vmcount dialplan,a vmcount dialplan function))
729 $(eval $(call Buildasterisk18ModuleTemplate,func_extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control))
730 $(eval $(call Buildasterisk18ModuleTemplate,func_global,Global variable,global variable dialplan functions))
731 $(eval $(call Buildasterisk18ModuleTemplate,func_groupcount,Group count,Counts the number of channels in the specified group))
732 $(eval $(call Buildasterisk18ModuleTemplate,func_shell,Shell,support for shell execution))
733 $(eval $(call Buildasterisk18ModuleTemplate,pbx_ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic))
734 $(eval $(call Buildasterisk18ModuleTemplate,res_ael_share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules))
735 $(eval $(call Buildasterisk18ModuleTemplate,pbx_spool,Call Spool,outgoing call spool support))
736 $(eval $(call Buildasterisk18ModuleTemplate,res_agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension))
737 $(eval $(call Buildasterisk18ModuleTemplate,res_crypto,Provide Crypto,Cryptographic Signature capability))
738 $(eval $(call Buildasterisk18ModuleTemplate,app_alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID))
739 $(eval $(call Buildasterisk18ModuleTemplate,app_setcallerid,Set callerid,support for setting callerid))
740 $(eval $(call Buildasterisk18ModuleTemplate,app_verbose,Verbose logging,Verbose logging application))
741 $(eval $(call Buildasterisk18ModuleTemplate,func_channel,Channel info,Channel info dialplan function))
742 $(eval $(call Buildasterisk18ModuleTemplate,func_blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted))
743 $(eval $(call Buildasterisk18ModuleTemplate,app_originate,Originate a call,originating an outbound call and connecting it to a specified extension or application))
744 $(eval $(call Buildasterisk18ModuleTemplate,func_uri,URI encoding and decoding,Encodes and decodes URI-safe strings))
745 $(eval $(call Buildasterisk18ModuleTemplate,app_disa,Direct Inward System Access,Direct Inward System Access))
746 $(eval $(call Buildasterisk18ModuleTemplate,app_senddtmf,Send DTMF digits,Sends arbitrary DTMF digits))
747 $(eval $(call Buildasterisk18ModuleTemplate,func_cut,CUT function,CUT function))
748 $(eval $(call Buildasterisk18ModuleTemplate,res_clioriginate,Calls via CLI,Originate calls via the CLI))
749 $(eval $(call Buildasterisk18ModuleTemplate,app_mixmonitor,Record a call and mix the audio,record a call and mix the audio during the recording))
750 $(eval $(call Buildasterisk18ModuleTemplate,app_playtones,Playtones application,play a tone list))
751 $(eval $(call Buildasterisk18ModuleTemplate,app_record,Record sound file,to record a sound file))