########################################## # Asterisk GUI package for PADS ########################################## ASTERISKGUI_DIR=$(BUILD_DIR)/asterisk-gui #ASTERISKGUI_VERSION=trunk ASTERISKGUI_UNPACKED=asterisk-gui #ASTERISKGUI_SITE=https://svn.pikatech.com/pads/packages/asterisk-gui ASTERISKGUI_SITE=http://svn.digium.com/svn/asterisk-gui/branches/aadk $(DL_DIR)/$(ASTERISKGUI_UNPACKED): $(SVN) -r 2538 $(ASTERISKGUI_SITE)/$(ASTERISKGUI_VERSION) $(DL_DIR)/$(ASTERISKGUI_UNPACKED) -find $(DL_DIR)/$(ASTERISKGUI_UNPACKED) -type d -name .svn | xargs rm -rf asterisk-gui-source: $(DL_DIR)/asterisk-gui $(ASTERISKGUI_DIR)/.unpacked: $(DL_DIR)/$(ASTERISKGUI_UNPACKED) cp -R $(DL_DIR)/$(ASTERISKGUI_UNPACKED) $(ASTERISKGUI_DIR) cp package/asterisk-gui/images/* $(ASTERISKGUI_DIR)/config/images/ touch $(ASTERISKGUI_DIR)/.unpacked $(ASTERISKGUI_DIR)/.configured: $(ASTERISKGUI_DIR)/.unpacked patch -d $(ASTERISKGUI_DIR) -p0 < package/asterisk-gui/asterisk-gui_pika.patch touch $(ASTERISKGUI_DIR)/.configured asterisk-gui: $(ASTERISKGUI_DIR)/.configured mkdir -p $(TARGET_DIR)/var/lib/asterisk mkdir -p $(PERSISTENT_STORAGE)/etc/asterisk/scripts mkdir -p $(TARGET_DIR)/var/lib/asterisk/scripts mkdir -p $(TARGET_DIR)/var/lib/asterisk/static-http mkdir -p $(TARGET_DIR)/var/lib/asterisk/static-http/config cp -Rv $(ASTERISKGUI_DIR)/config/* $(TARGET_DIR)/var/lib/asterisk/static-http/config/ rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/gui_sysinfo cp -v $(ASTERISKGUI_DIR)/scripts/gui_sysinfo $(TARGET_DIR)/bin/ cp -v $(ASTERISKGUI_DIR)/scripts/* $(TARGET_DIR)/var/lib/asterisk/scripts/ cp -v $(ASTERISKGUI_DIR)/gui_configs/gui_custommenus.conf $(TARGET_DIR)/bin/ chmod +x $(TARGET_DIR)/bin/gui_sysinfo cp -Rv $(ASTERISKGUI_DIR)/scripts/* $(PERSISTENT_STORAGE)/etc/asterisk/scripts/ # \ # \ # \ # \ #!!!!! Note due to this line in the Asterisk GUI README/LICENSE: !!!!!\ #!!!!! The images and logos included with Asterisk-GUI may only be distributed with !!!!!\ #!!!!! unmodified versions of the toolkit and may not be used in any derivative works !!!!!\ #!!!!! without special written permission from Digium. !!!!!\ # \ # \ # \ # rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/adv-v.gif rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/bandwidth.gif rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/digiumlogo.gif rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/favicon.ico rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/home.png rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/iaxtel.jpg rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/ngt.jpg rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/simplesignal.jpg rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/slice-v.gif rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/split-v.gif rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/voicepulse.gif rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/voilaip.gif #rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/images/*.gif #rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/setup/*.gif #rm -f $(TARGET_DIR)/var/lib/asterisk/static-http/config/setup/images/*.gif # Disabling the GUI rm -rf $(TARGET_DIR)/var/lib/asterisk/static-http/config/setup sed -i 's?;enabled=yes?enabled=yes?' $(PERSISTENT_STORAGE)/etc/asterisk/http.conf sed -i 's?;enablestatic=yes?enablestatic=yes?' $(PERSISTENT_STORAGE)/etc/asterisk/http.conf sed -i 's?bindaddr=?;bindaddr=?' $(PERSISTENT_STORAGE)/etc/asterisk/http.conf sed -i 's?enabled = no?enabled = yes?' $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf sed -i 's?;webenabled = yes?webenabled = yes?' $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf echo "[admin]" >> $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf echo "secret = admin" >> $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf echo "secret = admin" >> $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf echo "read = system,call,log,verbose,command,agent,user,config" >> $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf echo "write = system,call,log,verbose,command,agent,user,config" >> $(PERSISTENT_STORAGE)/etc/asterisk/manager.conf #Create a default trunk in users.conf echo >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo '[trunk_1]' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'context = DID_trunk_1' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hasexten = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hasiax = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hassip = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'trunkname = Ports fxo/1,fxo/2,fxo/3,fxo/4' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'trunkstyle = analog' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf #Create a default phone in users.conf echo >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo '[1000]' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'fullname = Pika fxs1' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hasdirectory = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hasiax = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hasmanager = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hassip = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'hasvoicemail = no' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'host = dynamic' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'threewaycalling = yes' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'pikachan = fxs/1' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf echo 'dtmfmode = rfc2833' >> $(PERSISTENT_STORAGE)/etc/asterisk/users.conf asterisk-gui-configure: $(ASTERISKGUI_DIR)/.configured asterisk-gui-clean: -$(MAKE) -C $(ASTERISKGUI_DIR) clean asterisk-gui-config: $(ASTERISKGUI_DIR)/.configured $(MAKE) -C $(ASTERISKGUI_DIR) menuconfig asterisk-gui-dirclean: rm -rf $(ASTERISKGUI_DIR) ################################################ # # Toplevel Makefile options # ################################################# ifeq ($(strip $(PADS_PACKAGE_ASTERISKGUI)),y) TARGETS+=asterisk asterisk-gui endif