%define KERNEL_VERSION %{?kern_ver} %define WANPIPE_VER wanpipe-util %define name %{WANPIPE_VER} %define version 3.4.8 %define release 0 %define serial 1 %define ETC_DIR /etc %define USR_DIR /usr %define UTILS_DIR /usr/sbin %define PROD_HOME /etc/wanpipe %define WANCFG_LIBS_DIR /etc/wanpipe/wancfg/lib %define API_DIR /etc/wanpipe/api %define DOCS_DIR /usr/share/doc/wanpipe %define KERNEL_VERSION / %define PROD wanrouter %define META_CONF %{PROD_HOME}/%{PROD}.rc %define WAN_INTR_DIR %{PROD_HOME}/interfaces %define WAN_CONF_DIR %{PROD_HOME} %define PROD_CONF %{WAN_CONF_DIR}/wanpipe1.conf %define LIBSANGOMA_CONF /etc/ld.so.conf.d/libsangoma.so.conf #%define START_SCRIPT S07%{PROD} #%define OLD_START S07router #%define STOP_SCRIPT K10%{PROD} #%define OLD_STOP K10router %define ROUTER_RC %{META_CONF} %define WANROUTER_STARTUP_SMPL %{PROD_HOME}/samples/wanrouter %define WANROUTER_STARTUP /usr/sbin/wanrouter %define NEW_IF_TYPE NO %define PROD_INIT /usr/sbin/ Summary: Sangoma WANPIPE package for Linux. It contains WANPIPE configuration/startup/debugging utilities for Linux. This package requires the wanpipe-mod package! Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Applications/Communications #Source0: %{WANPIPE_VER}.tgz #Source1: bridge-utils-0.9.1.tar.gz Vendor: Sangoma Technologies Inc. Url: www.sangoma.com Group: Networking/WAN %description Linux Utilities for Sangoma AFT-Series of cards and S-Series of Cards. Wanpipe supports the following protocols, TDM Voice, Frame Relay, X25(API), PPP,Multi-link PPP, CHDLC and custom API development for WAN and Voice. Install Wanpipe-modules package for wanpipe drivers. %prep %build %install %clean %postun echo "Uninstalling WANPIPE..." # ---------------------------------------------------------------------------- # Remove initialization scripts. # ---------------------------------------------------------------------------- remove_init() { chkconfig --del wanrouter rm /etc/init.d/wanrouter } remove_init_old() { # Examine system bootstrap files. if [ -d /etc/rc0.d ] then RC_DIR=/etc elif [ -d /etc/rc.d/rc0.d ] then RC_DIR=/etc/rc.d else return 0 fi echo "Removing start-up scripts..." rm -f $RC_DIR/rc2.d/%{START_SCRIPT} rm -f $RC_DIR/rc3.d/%{START_SCRIPT} rm -f $RC_DIR/rc4.d/%{START_SCRIPT} rm -f $RC_DIR/rc5.d/%{START_SCRIPT} rm -f $RC_DIR/rc0.d/%{STOP_SCRIPT} rm -f $RC_DIR/rc1.d/%{STOP_SCRIPT} rm -f $RC_DIR/rc6.d/%{STOP_SCRIPT} rm -f $RC_DIR/init.d/%{PROD} return 0 } #remove start-on-boot scripts remove_init; %post # ---------------------------------------------------------------------------- # Create meta-configuration file. # ---------------------------------------------------------------------------- create_metaconf() { local response # Select directory for the log file. if [ -d /var/log ]; then LOG_FILE=/var/log/%{PROD} elif [ -d /var/adm wanpipe1]; then LOG_FILE=/var/adm/%{PROD} else LOG_FILE=%{PROD_HOME}/%{PROD}.log fi # Select directory for the lock file. if [ -d /var/lock/subsys ]; then LOCK_FILE=/var/lock/subsys/%{PROD} elif [ -d /var/lock ]; then LOCK_FILE=/var/lock/%{PROD} else LOCK_FILE=$PROD_HOME/%{PROD}.lck fi cat > %{META_CONF} << ENDOFTEXT #!/bin/sh # wanrouter.rc WAN router meta-configuration file. # # This file defines variables used by the router shell scripts # and should be located in /etc/wanpipe directory. These are: # # ROUTER_BOOT = Boot flag (YES/NO). # WAN_CONF_DIR = Where to put wanpipe config files. # WAN_INTR_DIR = Where to put wanpipe interface files. # WAN_LOG = Where to put start-up log file. # WAN_LOCK = File used as a lock. # WAN_LOCK_DIR = # WAN_IP_FORWARD = Enable IP Forwarding on startup. # WAN_DEVICES = Name of the wanpipe devices to be # loaded on 'wanrouter start' # (ex: "wanpipe1 wanpipe2 wanpipe3...") # # Note: Name of wanpipe devices correspond # to the configuration files in # WANPIPE_CONF_DIR directory: # (ex. /etc/wanpipe/wanpipe1.conf ) # # Note: This file is 'executed' by the shell script, so # the usual shell syntax must be observed. ENDOFTEXT echo "ROUTER_BOOT=YES" >> %{META_CONF} echo "WAN_CONF_DIR=%{WAN_CONF_DIR}" >> %{META_CONF} echo "WAN_INTR_DIR=%{WAN_INTR_DIR}" >> %{META_CONF} echo "WAN_LOG=$LOG_FILE" >> %{META_CONF} echo "WAN_LOCK=$LOCK_FILE" >> %{META_CONF} echo "WAN_LOCK_DIR=/var/lock/subsys" >> %{META_CONF} echo "WAN_IP_FORWARD=NO" >> %{META_CONF} echo "NEW_IF_TYPE=NO" >> %{META_CONF} echo "WAN_LIB_DIR=/etc/wanpipe/lib" >> %{META_CONF} echo "WAN_ADSL_LIST=/etc/wanpipe/wan_adsl.list" >> %{META_CONF} echo "WAN_ANNEXG_LOAD=NO" >> %{META_CONF} echo "WAN_LIP_LOAD=YES" >> %{META_CONF} echo "WAN_DYN_WANCONFIG=NO" >> %{META_CONF} echo "WAN_SCRIPTS_DIR=/etc/wanpipe/scripts" >> %{META_CONF} echo "WAN_FIRMWARE_DIR=/etc/wanpipe/firmware" >> %{META_CONF} echo "WAN_DEVICES_REV_STOP_ORDER=YES" >> %{META_CONF} echo "WAN_DEVICES=\"wanpipe1\"" >> %{META_CONF} return 0 } # ---------------------------------------------------------------------------- # Install initialization scripts. # ---------------------------------------------------------------------------- install_init() { ln -s /usr/sbin/wanrouter /etc/init.d/wanrouter chkconfig --add wanrouter chkconfig wanrouter on } # ---------------------------------------------------------------------------- # Enable MGD and BRI log for A500-BRI # ---------------------------------------------------------------------------- enable_smg_log() { if [ -e /etc/syslog.conf ]; then eval "grep "local2.*sangoma_mgd" /etc/syslog.conf" > /dev/null 2> /dev/null if [ $? -ne 0 ]; then eval "grep "local2" /etc/syslog.conf " > /dev/null 2> /dev/null if [ $? -eq 0 ]; then echo echo "Warning : local2 is already used in syslog.conf" echo fi echo -e "\n# Sangoma Media Gateway log" > tmp.$$ echo -e "local2.* /var/log/sangoma_mgd.log\n" >> tmp.$$ eval "cat /etc/syslog.conf tmp.$$ > tmp1.$$" \cp -f tmp1.$$ /etc/syslog.conf eval "/etc/init.d/syslog restart" > /dev/null 2>/dev/null fi eval "grep "local3.*sangoma_bri" /etc/syslog.conf" > /dev/null 2> /dev/null if [ $? -ne 0 ]; then eval "grep "local3" /etc/syslog.conf " > /dev/null 2> /dev/null if [ $? -eq 0 ]; then echo echo "Warning : local3 is already used in syslog.conf" echo fi echo -e "\n# Sangoma BRI Daemon (smg_bri) log" > tmp.$$ echo -e "local3.* /var/log/sangoma_bri.log\n" >> tmp.$$ eval "cat /etc/syslog.conf tmp.$$ > tmp1.$$" \cp -f tmp1.$$ /etc/syslog.conf eval "/etc/init.d/syslog restart" > /dev/null 2> /dev/null fi else echo "Warning: /etc/syslog.conf not found" fi if [ -f tmp1.$$ ]; then rm -f tmp1.$$ fi if [ -f tmp.$$ ]; then rm -f tmp.$$ fi echo "Ok" echo echo "Checking logrotate ..." eval "type logrotate" > /dev/null 2> /dev/null if [ $? -ne 0 ]; then echo "Error: Logrotate not found !" fi if [ -e /etc/logrotate.d ] && [ -e /etc/logrotate.d/syslog ]; then eval "grep sangoma_mgd /etc/logrotate.d/syslog" > /dev/null 2> /dev/null if [ $? -ne 0 ]; then eval "sed -e 's/messages/messages \/var\/log\/sangoma_mgd.log/' /etc/logrotate.d/syslog >tmp2.$$ 2>/dev/null" eval "cp -f tmp2.$$ /etc/logrotate.d/syslog" eval "logrotate -f /etc/logrotate.d/syslog" if [ $? -ne 0 ]; then echo "Error: logrotate restart failed!"; exit 1; fi echo "Logrotate is being changed and restarted!" else echo "Logrotate is configured!" fi else echo "Error: Logrotate dir: /etc/logrotate.d not found !" fi echo "OK." echo } install_init_old() { #Examine system bootstrap files. if [ -d /etc/rc0.d ] then RC_DIR=/etc elif [ -d /etc/rc.d/rc0.d ] then RC_DIR=/etc/rc.d else return 0 fi PROD_INIT=%{PROD_INIT}%{PROD} # Install start scripts. [ -d $RC_DIR/rc2.d ] && ln -sf $PROD_INIT $RC_DIR/rc2.d/%{START_SCRIPT} [ -d $RC_DIR/rc3.d ] && ln -sf $PROD_INIT $RC_DIR/rc3.d/%{START_SCRIPT} [ -d $RC_DIR/rc5.d ] && ln -sf $PROD_INIT $RC_DIR/rc4.d/%{START_SCRIPT} [ -d $RC_DIR/rc5.d ] && ln -sf $PROD_INIT $RC_DIR/rc5.d/%{START_SCRIPT} # Install stop scripts. [ -d $RC_DIR/rc0.d ] && ln -sf $PROD_INIT $RC_DIR/rc0.d/%{STOP_SCRIPT} [ -d $RC_DIR/rc1.d ] && ln -sf $PROD_INIT $RC_DIR/rc1.d/%{STOP_SCRIPT} [ -d $RC_DIR/rc6.d ] && ln -sf $PROD_INIT $RC_DIR/rc6.d/%{STOP_SCRIPT} [ -d $RC_DIR/init.d ] && ln -sf $PROD_INIT $RC_DIR/init.d/%{PROD} return 0 } if [ -d "/usr/local/wanrouter" ]; then cat < /dev/null fi cat < - Feature Frozen - 3.4.7.3 ================================================================================ - Fixed RBS signalling for E1 channel 31 - Added Front end Reset Detection -> Support for new A108 Firmware V40 - Fixed RTP TAP bug: Caused high system load on RTP TAP usage. - Added excessive fifo error sanity check. Fixes random pci dma errors. - Increased EC VQE Delay: Fixes random fax failure due to hwec. - HWEC: Check state before bypass enable. - HWEC: Disable bypass on release * Tue Nov 25 2009 Nenad Corbic - Feature Frozen - 3.4.7 ================================================================================ - New A200 Firmware V12 Fixes the fifo reporting in firmware. - Updated driver fifo handling so that if customer is running older version of A200 firmware (less than V12) the fifo interrupt handling would still work correctly. - Dahdi 2.2 broke Sangoma RBS support - Fixed the free run interrupt supported on V38 firmware - Fixed chan_woomera inbound calls on second profile - Fixed sangoma_mgd for multiple profiles - Updated smg - Fixed wanpipemon LIU alarm statistics - Updates SMG for 32T1/E1 Support - Backporte front end OOF alarm update. A OOF alarm counter was added so that link does not drop on a single OOF alarm as per T1/E1 spec. * Tue Sep 18 2009 Nenad Corbic - Feature Frozen - 3.4.6 =============================================================================== - Fund a bug in Sangoma_mgd causing channel 31 in each span to fail. This bug was introduced in 3.4.5 release. * Tue Sep 16 2009 Nenad Corbic - Feature Frozen - 3.4.5 =============================================================================== - New firmawre feature for A101/2/5/8: Free Run Timer Interrupt The AFT T1/E1 cards will now provide perfect timing to zatpel/dahdi even when the ports are not connected. The free run interrupt will be enabled when all zaptel/dahdi ports are down, or on inital card start. To test this feature just start a wanpipe port with zaptel/dahdi and run zttest. A108 firmare V38 A104/2/1/ firmware V36 - Added module inc cound when zaptel/dahdi starts. So wanpipe drivers do not crash if one tries to unload zaptel/dahdi before stopping wanpipe drivers. - Dahdi 2.2 Support - Updated for 2.6.30 kernel * Fri Jun 17 2009 Nenad Corbic - Feature Frozen - 3.4.4 ===================================================================== - Latest smg update in 3.4.3 broke BRI support - This is now fixed. * Fri Jun 17 2009 Nenad Corbic - Feature Frozen - 3.4.3 ===================================================================== - New firmware 2007-07-10: A108D Latest Firmware Release........ v37 . More info 2007-07-10: A104D Latest Firmware Release ....... v35 . More info 2007-07-10: A102D Latest Firmware Release ....... v35 . More info 2007-07-10: A101D Latest Firmware Release. ...... v34 . More info 2007-07-10: A200 Latest Firmware Release ........ v11 . More info 2007-07-10: A400 Latest Firmware Release ........ v11 . More info 2007-07-10: A104D Latest Firmware Release........ v26 . More info 2007-07-10: A301-SH Latest Firmware Release...... v09 . More info 2008-10-28: A14X Latest Firmware Release......... v07 . More Info 2009-04-30: A500 Latest Firmware Release......... v35 . More info 2009-05-08: B600 Latest Firmware Release......... v02 . More Info 2009-07-03: B700 Latest Firmware Release......... v35 . More Info - Updated Makefile Build make zaptel ZAPDIR= # Build for Zaptel make dahdi DAHDI_DIR= # Build for DAHDI make install or use original script method ./Setup install # General Build ./Setup zaptel # Zaptel specific build ./Setup dahdi # Dahdi specific build - For 64bit systems there is no need to use --64bit_4G flag any more. The check is done in the driver. - Updated TDM ring buffer logic to battle noise and data corrupting in channelized voice mode. Backport from 3.5. - Updated for 2.6.29 kernel. - Added DAHDI 2.2 support - AFT TE3 Update Added a define AFT_TE3_IFT_FEATURE_DISABLE to disable the hardware feature that implements IFT timeout interrupt on DMA chains. On some very slow machines this feature can yeild slower performance because the machine does not have to power to fill the T3/E3 line with traffic. - Turned off Framer Timer Interrupt It was only used for stats and was not necessary - Update for DMA chains to combat PCI IRQ latency - Updated 64bit data protocols - Updated smg_ctrl scripts for bri and ss7 made them common - Bug fix for Mixed Voice & Data mode On fifo overrun recovery do not disable dma if running in mixed voice & data mode. - Updated to wancfg_zaptel script. Bug fix smg was prompting user even if bri was not installed. - Updated SMG/Woomera Added Asterisk Load balancing using extension information. * Fri Apr 30 2009 Nenad Corbic - Feature Frozen - 3.4.1 ======================================================================= - Updated wancfg_zaptel configuration utility Use wancfg_fs to configure analog/BRI card for FreeSwitch Update for remove old start/stop script Added configuration option for TDMV_HW_FAX_DETECT Bug fixes in silent option - A500 BRI - Firmware Update V35 On some machines the A500 card caused PCI parity errors, causing a system reboot or a crash. The firmware V35 fixes this problem. - BRI DCHAN Bug Fix The DCHAN on some machines could become stuck due to a driver interrupt race condition, causing BRI to stop reciving/tranmsitting calls. This bug has now been fixed. - Updated BRI stack and sangoma_mdg - Added TDMV_HW_FAX_DETECT option To enable hardware fax detection. Used in conjunction with TDMV_HW_DTMF. TDMV_HW_FAX_DETECT=