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