Hello,

this patch adds support for Lua resources in Asterisk. Asterisk-pbx-lua allows 
users to use the full power of lua to develop telephony applications using 
Asterisk. Lua dialplan configuration is done in the extensions.lua file.

Regards,
Jiri Slachta, CESNET, z.s.p.o.
Signed-off-by: Jiri Slachta <[email protected]>
Index: feeds/packages/net/asterisk-1.8.x/Makefile
===================================================================
--- feeds/packages/net/asterisk-1.8.x/Makefile  (revision 34287)
+++ feeds/packages/net/asterisk-1.8.x/Makefile  (working copy)
@@ -245,6 +245,17 @@
  This package provides ODBC support for Asterisk.
 endef
 
+define Package/asterisk18-pbx-lua
+$(call Package/asterisk18/Default)
+  TITLE:=Lua support
+  DEPENDS:= asterisk18 +libpthread +libc +liblua
+endef
+
+define Package/asterisk18-pbx-lua/description
+$(call Package/asterisk18/Default/description)
+ This package provides Lua resources for Asterisk.
+endef
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-app-meetme),)
   CONFIGURE_ARGS+= \
        --with-dahdi="$(STAGING_DIR)/usr"
@@ -306,6 +317,15 @@
        --without-srtp
 endif
 
+ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pbx-lua),)
+  CONFIGURE_ARGS+= \
+       --with-lua="$(STAGING_DIR)/usr"
+  TARGET_LDFLAGS+=-ldl -lcrypt
+else
+  CONFIGURE_ARGS+= \
+       --without-pbx-lua
+endif
+
 CONFIGURE_ARGS+= \
        --without-curses \
        --with-gsm=internal \
@@ -611,6 +631,13 @@
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*odbc*.so 
$(1)/usr/lib/asterisk/modules/
 endef
 
+define Package/asterisk18-pbx-lua/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/extensions.lua 
$(1)/etc/asterisk/
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/pbx_lua.so 
$(1)/usr/lib/asterisk/modules/
+endef
+
 define Buildasterisk18ModuleTemplate
 
   define Package/asterisk18-$(subst _,-,$(1))
@@ -642,6 +669,7 @@
 $(eval $(call BuildPackage,asterisk18-chan-gtalk))
 $(eval $(call BuildPackage,asterisk18-chan-mobile))
 $(eval $(call BuildPackage,asterisk18-odbc))
+$(eval $(call BuildPackage,asterisk18-pbx-lua))
 $(eval $(call BuildPackage,asterisk18-res-fax))
 $(eval $(call BuildPackage,asterisk18-res-fax-spandsp))
 $(eval $(call BuildPackage,asterisk18-res-timing-timerfd))
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to