wanpipe-3.4.7.tgz
This commit is contained in:
parent
4cfa4b86fd
commit
4f3c0f3604
|
@ -8,15 +8,37 @@ For more info visit: http://wiki.sangoma.com
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
* Tue Sep 18 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.6
|
||||
=====================================================================
|
||||
* Wed Nov 05 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.5
|
||||
=====================================================================
|
||||
* Tue Sep 16 2009 Nenad Corbic <ncorbic@sangoma.com> - 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
|
||||
|
@ -35,14 +57,14 @@ For more info visit: http://wiki.sangoma.com
|
|||
- Updated for 2.6.30 kernel
|
||||
|
||||
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.4
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.3
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.3
|
||||
=====================================================================
|
||||
|
||||
- New firmware
|
||||
|
@ -108,7 +130,7 @@ For more info visit: http://wiki.sangoma.com
|
|||
Added Asterisk Load balancing using extension information.
|
||||
|
||||
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.1
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.1
|
||||
=======================================================================
|
||||
|
||||
- Updated wancfg_zaptel configuration utility
|
||||
|
|
18
Makefile
18
Makefile
|
@ -155,6 +155,8 @@ all: cleanup_local _checkzap _checksrc all_bin_kmod all_util
|
|||
|
||||
all_src: cleanup_local _checkzap _checksrc all_kmod all_util
|
||||
|
||||
all_src_ss7: cleanup_local _checkzap _checksrc all_kmod_ss7 all_util
|
||||
|
||||
dahdi: all_src
|
||||
|
||||
zaptel: all_src
|
||||
|
@ -162,6 +164,9 @@ zaptel: all_src
|
|||
openzap: all_src all_lib
|
||||
@touch .all_lib
|
||||
|
||||
openzap_ss7: all_src_ss7 all_lib
|
||||
@touch .all_lib
|
||||
|
||||
tdmapi: all_src all_lib
|
||||
@touch .all_lib
|
||||
|
||||
|
@ -174,6 +179,14 @@ cleanup_local:
|
|||
all_kmod: _checkzap _checksrc _cleanoldwanpipe _check_kver
|
||||
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $(KDIR) SUBDIRS=$(WAN_DIR) EXTRA_FLAGS="$(EXTRA_CFLAGS) $(shell cat ./patches/kfeatures)" ZAPDIR=$(ZAPDIR_PRIV) ZAPHDLC=$(ZAPHDLC_PRIV) HOMEDIR=$(PWD) modules
|
||||
|
||||
all_kmod_ss7: _checkzap _checksrc _cleanoldwanpipe _check_kver
|
||||
@if [ -e $(PWD)/ss7_build_dir ]; then \
|
||||
rm -rf $(PWD)/ss7_build_dir; \
|
||||
fi
|
||||
@mkdir -p $(PWD)/ss7_build_dir
|
||||
./Setup drivers --builddir=$(PWD)/ss7_build_dir --with-linux=$(KDIR) $(ZAP_OPTS) --usr-cc=$(CC) --protocol=AFT_TE1-XMTP2 --no-zaptel-compile --noautostart --arch=$(ARCH) --silent
|
||||
@eval "./patches/copy_modules.sh $(PWD)/ss7_build_dir $(WAN_DIR)"
|
||||
|
||||
all_bin_kmod: _checkzap _checksrc _cleanoldwanpipe _check_kver
|
||||
@if [ -e $(PWD)/ast_build_dir ]; then \
|
||||
rm -rf $(PWD)/ast_build_dir; \
|
||||
|
@ -293,6 +306,11 @@ install_kmod:
|
|||
echo "install -m 644 -D $(WAN_DIR)/wanpipe_lip.${MODTYPE} $(INSTALLPREFIX)/$(KINSTDIR)/net/wanrouter/wanpipe_lip.${MODTYPE}"; \
|
||||
install -m 644 -D $(WAN_DIR)/wanpipe_lip.${MODTYPE} $(INSTALLPREFIX)/$(KINSTDIR)/net/wanrouter/wanpipe_lip.${MODTYPE}; \
|
||||
fi
|
||||
@rm -f $(INSTALLPREFIX)/$(KINSTDIR)/drivers/net/wan/xmtp2km.${MODTYPE}
|
||||
@if [ -f $(WAN_DIR)/xmtp2km.${MODTYPE} ]; then \
|
||||
echo "install -D -m 644 $(WAN_DIR)/xmtp2km.${MODTYPE} $(INSTALLPREFIX)/$(KINSTDIR)/drivers/net/wan/xmtp2km.${MODTYPE}"; \
|
||||
install -D -m 644 $(WAN_DIR)/xmtp2km.${MODTYPE} $(INSTALLPREFIX)/$(KINSTDIR)/drivers/net/wan/xmtp2km.${MODTYPE};\
|
||||
fi
|
||||
@eval "./patches/rundepmod.sh"
|
||||
|
||||
endif
|
||||
|
|
6
Setup
6
Setup
|
@ -5019,7 +5019,7 @@ function install_smg_samples_ss7()
|
|||
if [ -f $ROOT/etc/asterisk/extensions.conf ]; then
|
||||
eval "grep -i outb-ss7 $ROOT/etc/asterisk/extensions.conf 2> /dev/null > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
cat $ROOT/etc/asterisk/extensions.conf ./conf_ss7/woomera_ext.conf > conf.$$
|
||||
cat $ROOT/etc/asterisk/extensions.conf ./conf/woomera_ext.conf > conf.$$
|
||||
mv conf.$$ $ROOT/etc/asterisk/extensions.conf
|
||||
echo "Asterisk extensions.conf file updated with woomera config"
|
||||
else
|
||||
|
@ -5031,7 +5031,7 @@ function install_smg_samples_ss7()
|
|||
if [ -f $ROOT/etc/asterisk/iax.conf ]; then
|
||||
eval "grep -i outb-ss7 $ROOT/etc/asterisk/iax.conf 2> /dev/null > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
cat $ROOT/etc/asterisk/iax.conf ./conf_ss7/woomera_iax.conf > conf.$$
|
||||
cat $ROOT/etc/asterisk/iax.conf ./conf/woomera_iax.conf > conf.$$
|
||||
mv conf.$$ $ROOT/etc/asterisk/iax.conf
|
||||
echo "Asterisk iax.conf file updated with ss7 guest config"
|
||||
else
|
||||
|
@ -7327,7 +7327,7 @@ KERNEL_UNAME=`uname -r`
|
|||
PKG_NAME=wanpipe
|
||||
DISTR_NAME="WANPIPE"
|
||||
PROD=wanrouter
|
||||
PROD_VER=3.4.6
|
||||
PROD_VER=3.4.7
|
||||
PROD_HOME=`pwd`
|
||||
META_CONF=$PROD_HOME/$PROD.rc
|
||||
WAN_INTR_DIR=$PROD_HOME/interfaces
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
Tue Jul 21 17:44:15 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
||||
Wed Jul 22 15:50:00 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
||||
Wed Jul 22 15:50:11 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
|
@ -1,85 +0,0 @@
|
|||
Tue Jul 21 17:45:57 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
||||
Wed Jul 22 15:52:40 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 1
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 1
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
||||
Wed Jul 22 15:52:43 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
||||
Wed Jul 22 15:53:38 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
||||
Wed Jul 22 15:54:36 EDT 2009
|
||||
IF => w1g1 Number of receiver overrun errors: 0
|
||||
IF => w2g1 Number of receiver overrun errors: 0
|
||||
IF => w3g1 Number of receiver overrun errors: 0
|
||||
IF => w4g1 Number of receiver overrun errors: 0
|
||||
IF => w5g1 Number of receiver overrun errors: 0
|
||||
IF => w6g1 Number of receiver overrun errors: 0
|
||||
IF => w7g1 Number of receiver overrun errors: 0
|
||||
IF => w8g1 Number of receiver overrun errors: 0
|
||||
IF => w9g1 Number of receiver overrun errors: 0
|
||||
IF => w10g1 Number of receiver overrun errors: 0
|
||||
IF => w11g1 Number of receiver overrun errors: 0
|
||||
IF => w12g1 Number of receiver overrun errors: 0
|
||||
IF => w13g1 Number of receiver overrun errors: 0
|
||||
IF => w14g1 Number of receiver overrun errors: 0
|
||||
IF => w15g1 Number of receiver overrun errors: 0
|
||||
IF => w16g1 Number of receiver overrun errors: 0
|
|
@ -1,5 +1,5 @@
|
|||
Package: wanpipe
|
||||
Version: 3.4.6-0
|
||||
Version: 3.4.7-0
|
||||
Section: networking
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
|
|
|
@ -1941,7 +1941,7 @@ typedef struct private_area
|
|||
aft_dma_chain_t rx_dma_chain_table;
|
||||
unsigned char tx_chain_indx,tx_pending_chain_indx;
|
||||
#else
|
||||
unsigned char tx_chain_indx,tx_pending_chain_indx;
|
||||
unsigned char tx_chain_indx,tx_pending_chain_indx,tx_chain_data_sz,tx_chain_sz;
|
||||
wan_dma_descr_t/*aft_dma_chain_t*/ tx_dma_chain_table[MAX_AFT_DMA_CHAINS];
|
||||
|
||||
unsigned char rx_chain_indx,rx_pending_chain_indx;
|
||||
|
@ -2009,26 +2009,6 @@ typedef struct private_area
|
|||
}private_area_t;
|
||||
|
||||
|
||||
static __inline int
|
||||
aft_tx_dma_chain_chain_len(private_area_t *chan)
|
||||
{
|
||||
int pending_indx=chan->tx_pending_chain_indx;
|
||||
int chain_diff=0;
|
||||
|
||||
if (chan->tx_chain_indx == pending_indx){
|
||||
return chain_diff;
|
||||
}
|
||||
|
||||
if (chan->tx_chain_indx > pending_indx){
|
||||
chain_diff = chan->tx_chain_indx - pending_indx;
|
||||
}else{
|
||||
chain_diff = MAX_AFT_DMA_CHAINS-(pending_indx - chan->tx_chain_indx);
|
||||
}
|
||||
|
||||
return chain_diff;
|
||||
}
|
||||
|
||||
|
||||
#if defined WANPIPE_PERFORMANCE_DEBUG
|
||||
#warning "WANPIPE_PERFORMANCE_DEBUG Enabled"
|
||||
static __inline int aft_calc_elapsed(struct timeval *started, struct timeval *ended)
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
#define _SDLA_FRONT_END_H_
|
||||
|
||||
|
||||
# include "sdla_56k.h"
|
||||
# include "sdla_te1.h"
|
||||
# include "sdla_te3.h"
|
||||
# include "sdla_remora.h"
|
||||
# include "sdla_bri.h"
|
||||
# include "sdla_serial.h"
|
||||
|
||||
/*
|
||||
*************************************************************************
|
||||
* DEFINES AND MACROS *
|
||||
|
@ -259,9 +266,18 @@ typedef struct {
|
|||
#define WAN_FE_LBMODE_CMD_SET 0x01
|
||||
#define WAN_FE_LBMODE_CMD_GET 0x02
|
||||
|
||||
#define WAN_FE_LBMODE_RC_SUCCESS 0x00
|
||||
#define WAN_FE_LBMODE_RC_PENDING 0x01
|
||||
#define WAN_FE_LBMODE_RC_FAILED 0x02
|
||||
#define WAN_FE_LBMODE_RC_SUCCESS 0x00
|
||||
#define WAN_FE_LBMODE_RC_PENDING 0x01
|
||||
#define WAN_FE_LBMODE_RC_FAILED 0x02
|
||||
#define WAN_FE_LBMODE_RC_LINKDOWN 0x03
|
||||
#define WAN_FE_LBMODE_RC_TXBUSY 0x04
|
||||
#define WAN_FE_LBMODE_RC_DECODE(rc) \
|
||||
((rc) == WAN_FE_LBMODE_RC_SUCCESS) ? "Done" : \
|
||||
((rc) == WAN_FE_LBMODE_RC_PENDING) ? "In progress" : \
|
||||
((rc) == WAN_FE_LBMODE_RC_FAILED) ? "Failed" : \
|
||||
((rc) == WAN_FE_LBMODE_RC_LINKDOWN) ? "Failed (Link Down)" : \
|
||||
((rc) == WAN_FE_LBMODE_RC_TXBUSY) ? "Failed (Busy)" : "Internal Error"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u_int8_t cmd;
|
||||
|
@ -273,11 +289,11 @@ typedef struct
|
|||
|
||||
} sdla_fe_lbmode_t;
|
||||
|
||||
|
||||
/* Front-End status */
|
||||
#define FE_STATUS_DECODE(fe_status) \
|
||||
(fe_status == FE_DISCONNECTED) ? "disconnected" :\
|
||||
(fe_status == FE_CONNECTED) ? "connected" : \
|
||||
#define FE_STATUS_DECODE(fe_status) \
|
||||
(fe_status == FE_UNITIALIZED) ? "unitialized" : \
|
||||
(fe_status == FE_DISCONNECTED) ? "disconnected": \
|
||||
(fe_status == FE_CONNECTED) ? "connected" : \
|
||||
"unknown"
|
||||
|
||||
#define WAN_FE_STATUS_DECODE(fe) FE_STATUS_DECODE((fe)->fe_status)
|
||||
|
@ -308,7 +324,8 @@ typedef struct
|
|||
#define WAN_FE_LINENO(fe) FE_LINENO(&((fe)->fe_cfg))
|
||||
#define WAN_FE_TXTRISTATE(fe) FE_TXTRISTATE(&((fe)->fe_cfg))
|
||||
#define WAN_FE_TDMV_LAW(fe) FE_TDMV_LAW(&((fe)->fe_cfg))
|
||||
#define WAN_FE_NETWORK_SYNC(fe) FE_NETWORK_SYNC(&((fe)->fe_cfg))
|
||||
|
||||
#define WAN_FE_NETWORK_SYNC(fe) FE_NETWORK_SYNC(&((fe)->fe_cfg))
|
||||
|
||||
#define FE_MEDIA_DECODE(fe) MEDIA_DECODE(&((fe)->fe_cfg))
|
||||
#define FE_LCODE_DECODE(fe) LCODE_DECODE(&((fe)->fe_cfg))
|
||||
|
@ -438,10 +455,18 @@ enum {
|
|||
AFT_LED_TOGGLE
|
||||
};
|
||||
|
||||
typedef struct sdla_fe_swirq_ {
|
||||
unsigned int pending;
|
||||
unsigned char subtype;
|
||||
int delay;
|
||||
wan_ticks_t start;
|
||||
} sdla_fe_swirq_t;
|
||||
|
||||
typedef struct sdla_fe_timer_event_ {
|
||||
unsigned char type;
|
||||
u_int8_t mode;
|
||||
int delay;
|
||||
wan_ticks_t start;
|
||||
union{
|
||||
#define te_event u_fe.te
|
||||
#define rm_event u_fe.rm
|
||||
|
@ -485,6 +510,9 @@ typedef struct {
|
|||
WAN_LIST_HEAD(, sdla_fe_timer_event_) event;
|
||||
#endif
|
||||
unsigned int event_map;
|
||||
|
||||
sdla_fe_swirq_t *swirq;
|
||||
unsigned int swirq_map;
|
||||
|
||||
int (*write_cpld)(void*, unsigned short, unsigned char);
|
||||
int (*read_cpld)(void*, unsigned short, unsigned char);
|
||||
|
@ -493,13 +521,9 @@ typedef struct {
|
|||
int (*write_framer)(void*,unsigned short,unsigned short);
|
||||
unsigned int (*read_framer)(void*,unsigned short);
|
||||
void (*reset_fe)(void*);
|
||||
|
||||
WRITE_FRONT_END_REG_T *write_fe_reg;
|
||||
READ_FRONT_END_REG_T *read_fe_reg;
|
||||
READ_FRONT_END_REG_T *__read_fe_reg;
|
||||
#if defined(__WINDOWS__)
|
||||
int remora_modules_counter;/* set in wp_remora_config() */
|
||||
#endif
|
||||
} sdla_fe_t;
|
||||
|
||||
/*
|
||||
|
@ -520,11 +544,7 @@ typedef struct {
|
|||
} sdla_fe_iface_t;
|
||||
#endif
|
||||
|
||||
#if defined(__LINUX__)
|
||||
# include <linux/wanpipe_events.h>
|
||||
#elif defined(__WINDOWS__)
|
||||
# include <wanpipe_events.h> /* for wan_event_ctrl_t */
|
||||
#endif
|
||||
#include "wanpipe_events.h"
|
||||
|
||||
/*
|
||||
** Sangoma Front-End interface structure (new version)
|
||||
|
@ -568,7 +588,7 @@ typedef struct {
|
|||
/* Get front end media type string */
|
||||
char* (*get_fe_media_string)(void);
|
||||
/* Set Line-loopback modes */
|
||||
int (*set_fe_lbmode)(sdla_fe_t*, unsigned char, unsigned char);
|
||||
int (*set_fe_lbmode)(sdla_fe_t*, u_int8_t, u_int8_t, u_int32_t);
|
||||
/* Update Alarm Status for proc file system */
|
||||
int (*update_alarm_info)(sdla_fe_t*, struct seq_file*, int*);
|
||||
/* Update PMON Status for proc file system */
|
||||
|
@ -599,7 +619,7 @@ typedef struct {
|
|||
/* Event Control */
|
||||
int (*event_ctrl)(sdla_fe_t*, wan_event_ctrl_t*);
|
||||
/* Front-End watchdog */
|
||||
int (*watchdog)(sdla_fe_t*);
|
||||
int (*watchdog)(sdla_fe_t *fe);
|
||||
/* Transmit ISDN BRI D-chan data */
|
||||
int (*isdn_bri_dchan_tx)(sdla_fe_t*, void*, unsigned int);
|
||||
/* Receive ISDN BRI D-chan data */
|
||||
|
|
|
@ -75,38 +75,72 @@
|
|||
#define WAN_TE_SIG_INTR 0x02
|
||||
|
||||
/* Framer Alarm bit mask */
|
||||
#define WAN_TE_BIT_FRAMER_ALARM_MASK 0x0000FFFF
|
||||
#define WAN_TE_BIT_LIU_ALARM_MASK 0x00F00000
|
||||
#define WAN_TE_BIT_ALOS_ALARM 0x00000001
|
||||
#define WAN_TE_BIT_LOS_ALARM 0x00000002
|
||||
#define WAN_TE_BIT_ALTLOS_ALARM 0x00000004
|
||||
#define WAN_TE_BIT_OOF_ALARM 0x00000008
|
||||
#define WAN_TE_BIT_RED_ALARM 0x00000010
|
||||
#define WAN_TE_BIT_AIS_ALARM 0x00000020
|
||||
#define WAN_TE_BIT_OOSMF_ALARM 0x00000040
|
||||
#define WAN_TE_BIT_OOCMF_ALARM 0x00000080
|
||||
#define WAN_TE_BIT_OOOF_ALARM 0x00000100
|
||||
#define WAN_TE_BIT_RAI_ALARM 0x00000200
|
||||
#define WAN_TE_BIT_YEL_ALARM 0x00000400
|
||||
#define WAN_TE_BIT_LOOPUP_CODE 0x00002000
|
||||
#define WAN_TE_BIT_LOOPDOWN_CODE 0x00004000
|
||||
#define WAN_TE_BIT_LIU_ALARM 0x00100000
|
||||
#define WAN_TE_BIT_LIU_ALARM_SC 0x00200000
|
||||
#define WAN_TE_BIT_LIU_ALARM_OC 0x00400000
|
||||
#define WAN_TE_BIT_LIU_ALARM_LOS 0x00800000
|
||||
#define WAN_TE_ALARM_LIU 0x80000000
|
||||
|
||||
#define WAN_TE_ALARM_FRAMER_MASK 0x0000FFFF
|
||||
#define WAN_TE_ALARM_LIU_MASK 0x00F00000
|
||||
#define WAN_TE_BIT_ALARM_ALOS 0x00000001
|
||||
#define WAN_TE_BIT_ALARM_LOS 0x00000002
|
||||
#define WAN_TE_BIT_ALARM_ALTLOS 0x00000004
|
||||
#define WAN_TE_BIT_ALARM_OOF 0x00000008
|
||||
#define WAN_TE_BIT_ALARM_RED 0x00000010
|
||||
#define WAN_TE_BIT_ALARM_AIS 0x00000020
|
||||
#define WAN_TE_BIT_ALARM_OOSMF 0x00000040
|
||||
#define WAN_TE_BIT_ALARM_OOCMF 0x00000080
|
||||
#define WAN_TE_BIT_ALARM_OOOF 0x00000100
|
||||
#define WAN_TE_BIT_ALARM_RAI 0x00000200
|
||||
#define WAN_TE_BIT_ALARM_YEL 0x00000400
|
||||
#define WAN_TE_BIT_ALARM_LOF 0x00000800
|
||||
#define WAN_TE_BIT_LOOPUP_CODE 0x00002000
|
||||
#define WAN_TE_BIT_LOOPDOWN_CODE 0x00004000
|
||||
#define WAN_TE_BIT_ALARM_LIU 0x00100000
|
||||
#define WAN_TE_BIT_ALARM_LIU_SC 0x00100000
|
||||
#define WAN_TE_BIT_ALARM_LIU_OC 0x00200000
|
||||
#define WAN_TE_BIT_ALARM_LIU_LOS 0x00400000
|
||||
|
||||
#define WAN_TE_BIT_TE1_ALARM 0x8000 /* for Windows only */
|
||||
#define IS_TE_ALARM(alarm, mask) (alarm & mask)
|
||||
#define IS_TE_ALOS_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALOS_ALARM)
|
||||
#define IS_TE_LOS_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_LOS_ALARM)
|
||||
#define IS_TE_OOF_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_OOF_ALARM)
|
||||
#define IS_TE_RED_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_RED_ALARM)
|
||||
#define IS_TE_AIS_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_AIS_ALARM)
|
||||
#define IS_TE_OOSMF_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_OOSMF_ALARM)
|
||||
#define IS_TE_OOCMF_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_OOCMF_ALARM)
|
||||
#define IS_TE_OOOF_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_OOOF_ALARM)
|
||||
#define IS_TE_RAI_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_RAI_ALARM)
|
||||
#define IS_TE_YEL_ALARM(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_YEL_ALARM)
|
||||
#define IS_TE_ALARM_ALOS(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_ALOS)
|
||||
#define IS_TE_ALARM_LOS(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_LOS)
|
||||
#define IS_TE_ALARM_OOF(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_OOF)
|
||||
#define IS_TE_ALARM_LOF(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_LOF)
|
||||
#define IS_TE_ALARM_RED(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_RED)
|
||||
#define IS_TE_ALARM_AIS(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_AIS)
|
||||
#define IS_TE_ALARM_OOSMF(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_OOSMF)
|
||||
#define IS_TE_ALARM_OOCMF(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_OOCMF)
|
||||
#define IS_TE_ALARM_OOOF(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_OOOF)
|
||||
#define IS_TE_ALARM_RAI(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_RAI)
|
||||
#define IS_TE_ALARM_YEL(alarm) IS_TE_ALARM(alarm, WAN_TE_BIT_ALARM_YEL)
|
||||
|
||||
/* Needed for backward compatibility */
|
||||
#ifndef IS_TE_ALOS_ALARM
|
||||
#define IS_TE_ALOS_ALARM IS_TE_ALARM_ALOS
|
||||
#endif
|
||||
|
||||
#ifndef IS_TE_LOS_ALARM
|
||||
#define IS_TE_LOS_ALARM IS_TE_ALARM_LOS
|
||||
#endif
|
||||
|
||||
#ifndef IS_TE_RED_ALARM
|
||||
#define IS_TE_RED_ALARM IS_TE_ALARM_RED
|
||||
#endif
|
||||
|
||||
#ifndef IS_TE_AIS_ALARM
|
||||
#define IS_TE_AIS_ALARM IS_TE_ALARM_AIS
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef IS_TE_RAI_ALARM
|
||||
#define IS_TE_RAI_ALARM IS_TE_ALARM_RAI
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef IS_TE_YEL_ALARM
|
||||
#define IS_TE_YEL_ALARM IS_TE_ALARM_YEL
|
||||
#endif
|
||||
|
||||
#ifndef IS_TE_OOF_ALARM
|
||||
#define IS_TE_OOF_ALARM IS_TE_ALARM_OOF
|
||||
#endif
|
||||
|
||||
/* Performance monitor counters bit mask */
|
||||
#define WAN_TE_BIT_PMON_LCV 0x01 /* line code violation counter */
|
||||
|
@ -147,7 +181,7 @@
|
|||
#define WAN_TE1_RX_SLEVEL_NONE 0
|
||||
#define WAN_TE1_RX_SLEVEL_43_DB 430 /* 43 dB E1, RMONEN=0 */
|
||||
#define WAN_TE1_RX_SLEVEL_36_DB 360 /* 36 dB T1, RMONEN=0 */
|
||||
#define WAN_TE1_RX_SLEVEL_30_DB 300 /* 30 dB RMONEN=0 | 1 */
|
||||
#define WAN_TE1_RX_SLEVEL_30_DB 300 /* 30 dB RMONEN=0 | 1 */
|
||||
#define WAN_TE1_RX_SLEVEL_225_DB 225 /* 22.5 dB RMONEN=1 */
|
||||
#define WAN_TE1_RX_SLEVEL_18_DB 180 /* 18 dB RMONEN=0 */
|
||||
#define WAN_TE1_RX_SLEVEL_175_DB 175 /* 17.5 dB RMONEN=1 */
|
||||
|
@ -226,16 +260,62 @@
|
|||
"Unsupported BOC"
|
||||
|
||||
/* Interrupt polling delay */
|
||||
#define POLLING_TE1_TIMER 1000 /* 1 sec */
|
||||
#define POLLING_TE1_TIMER 1 /* 1 sec */
|
||||
#define WAN_T1_ALARM_THRESHOLD_LOF_ON (3) /* 2-3 sec */
|
||||
#define WAN_T1_ALARM_THRESHOLD_LOF_OFF (10) /* 10 sec */
|
||||
#define WAN_T1_ALARM_THRESHOLD_AIS_ON (3) // must be 2.5s
|
||||
#define WAN_T1_ALARM_THRESHOLD_AIS_OFF (10) // must be 10s
|
||||
#define WAN_T1_ALARM_THRESHOLD_LOS_ON (3) // must be 2.5s
|
||||
#define WAN_T1_ALARM_THRESHOLD_LOS_OFF (10) // must be 10s
|
||||
|
||||
/* TE1 critical flag */
|
||||
#define TE_TIMER_RUNNING 0x01
|
||||
#define TE_TIMER_KILL 0x02
|
||||
#define LINELB_WAITING 0x03
|
||||
#define LINELB_CODE_BIT 0x04
|
||||
#define LINELB_CHANNEL_BIT 0x05
|
||||
#define TE_CONFIGURED 0x06
|
||||
#define TE_TIMER_EVENT_PENDING 0x07
|
||||
#define TE_TIMER_RUNNING 0x01
|
||||
#define TE_TIMER_KILL 0x02
|
||||
#define LINELB_WAITING 0x03
|
||||
#define LINELB_CODE_BIT 0x04
|
||||
#define LINELB_CHANNEL_BIT 0x05
|
||||
#define TE_CONFIGURED 0x06
|
||||
#define TE_TIMER_EVENT_PENDING 0x07
|
||||
#define TE_TIMER_EVENT_INPROGRESS 0x08
|
||||
|
||||
/* TE1 sw irq types */
|
||||
enum {
|
||||
WAN_TE1_SWIRQ_TYPE_NONE = 0,
|
||||
|
||||
WAN_TE1_SWIRQ_TYPE_LINK,
|
||||
WAN_TE1_SWIRQ_TYPE_ALARM_AIS,
|
||||
WAN_TE1_SWIRQ_TYPE_ALARM_LOS,
|
||||
WAN_TE1_SWIRQ_TYPE_ALARM_LOF,
|
||||
|
||||
WAN_TE1_SWIRQ_MAX
|
||||
};
|
||||
#define WAN_TE1_SWIRQ_TYPE_DECODE(type) \
|
||||
((type) == WAN_TE1_SWIRQ_TYPE_LINK) ? "T1/E1 Link" : \
|
||||
((type) == WAN_TE1_SWIRQ_TYPE_ALARM_AIS) ? "T1/E1 Alarm (AIS)" :\
|
||||
((type) == WAN_TE1_SWIRQ_TYPE_ALARM_LOS) ? "T1/E1 Alarm (LOS)" :\
|
||||
((type) == WAN_TE1_SWIRQ_TYPE_ALARM_LOF) ? "T1/E1 Alarm (LOF)" :\
|
||||
"Unknown"
|
||||
|
||||
enum {
|
||||
WAN_TE1_SWIRQ_SUBTYPE_NONE = 0,
|
||||
|
||||
WAN_TE1_SWIRQ_SUBTYPE_LINKDOWN,
|
||||
WAN_TE1_SWIRQ_SUBTYPE_LINKREADY,
|
||||
WAN_TE1_SWIRQ_SUBTYPE_LINKCRIT,
|
||||
WAN_TE1_SWIRQ_SUBTYPE_LINKUP,
|
||||
|
||||
WAN_TE1_SWIRQ_SUBTYPE_ALARM_ON,
|
||||
WAN_TE1_SWIRQ_SUBTYPE_ALARM_OFF
|
||||
};
|
||||
#define WAN_TE1_SWIRQ_SUBTYPE_DECODE(subtype) \
|
||||
((subtype) == WAN_TE1_SWIRQ_SUBTYPE_LINKDOWN) ? "Down" : \
|
||||
((subtype) == WAN_TE1_SWIRQ_SUBTYPE_LINKREADY) ? "Ready" : \
|
||||
((subtype) == WAN_TE1_SWIRQ_SUBTYPE_LINKCRIT) ? "Crit" : \
|
||||
((subtype) == WAN_TE1_SWIRQ_SUBTYPE_LINKUP) ? "UP" : \
|
||||
((subtype) == WAN_TE1_SWIRQ_SUBTYPE_ALARM_ON) ? "activating" : \
|
||||
((subtype) == WAN_TE1_SWIRQ_SUBTYPE_ALARM_OFF) ? "deactivating" : \
|
||||
"Unknown"
|
||||
|
||||
|
||||
/* TE1 timer flags (polling) */
|
||||
#define TE_LINELB_TIMER 0x01
|
||||
|
@ -255,6 +335,7 @@
|
|||
#define TE_LINKCRIT_TIMER 0x0F
|
||||
#define WAN_TE_POLL_LINKREADY 0x10
|
||||
#define WAN_TE_POLL_BERT 0x11
|
||||
#define WAN_TE_POLL_ALARM_PENDING 0x12
|
||||
|
||||
/* TE1 T1/E1 interrupt setting delay */
|
||||
#define INTR_TE1_TIMER 150 /* 50 ms */
|
||||
|
@ -286,22 +367,23 @@
|
|||
IS_E1_FEMEDIA(fe) ? NUM_OF_E1_CHANNELS :0)
|
||||
|
||||
|
||||
#define WAN_TE_ALARM(alarm, bit) ((alarm) & (bit)) ? "ON" : "OFF"
|
||||
#define WAN_TE_PRN_ALARM(alarm, bit) ((alarm) & (bit)) ? "ON" : "OFF"
|
||||
|
||||
#define WAN_TE_ALOS_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_ALOS_ALARM)
|
||||
#define WAN_TE_LOS_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LOS_ALARM)
|
||||
#define WAN_TE_OOF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOF_ALARM)
|
||||
#define WAN_TE_RED_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_RED_ALARM)
|
||||
#define WAN_TE_AIS_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_AIS_ALARM)
|
||||
#define WAN_TE_OOSMF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOSMF_ALARM)
|
||||
#define WAN_TE_OOCMF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOCMF_ALARM)
|
||||
#define WAN_TE_OOOF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOOF_ALARM)
|
||||
#define WAN_TE_RAI_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_RAI_ALARM)
|
||||
#define WAN_TE_YEL_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_YEL_ALARM)
|
||||
#define WAN_TE_PRN_ALARM_ALOS(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_ALOS)
|
||||
#define WAN_TE_PRN_ALARM_LOS(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_LOS)
|
||||
#define WAN_TE_PRN_ALARM_OOF(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_OOF)
|
||||
#define WAN_TE_PRN_ALARM_LOF(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_LOF)
|
||||
#define WAN_TE_PRN_ALARM_RED(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_RED)
|
||||
#define WAN_TE_PRN_ALARM_AIS(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_AIS)
|
||||
#define WAN_TE_PRN_ALARM_OOSMF(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_OOSMF)
|
||||
#define WAN_TE_PRN_ALARM_OOCMF(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_OOCMF)
|
||||
#define WAN_TE_PRN_ALARM_OOOF(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_OOOF)
|
||||
#define WAN_TE_PRN_ALARM_RAI(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_RAI)
|
||||
#define WAN_TE_PRN_ALARM_YEL(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_YEL)
|
||||
|
||||
#define WAN_TE_LIU_ALARM_SC(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LIU_ALARM_SC)
|
||||
#define WAN_TE_LIU_ALARM_OC(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LIU_ALARM_OC)
|
||||
#define WAN_TE_LIU_ALARM_LOS(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LIU_ALARM_LOS)
|
||||
#define WAN_TE_PRN_ALARM_LIU_SC(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_LIU_SC)
|
||||
#define WAN_TE_PRN_ALARM_LIU_OC(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_LIU_OC)
|
||||
#define WAN_TE_PRN_ALARM_LIU_LOS(alarm) WAN_TE_PRN_ALARM(alarm, WAN_TE_BIT_ALARM_LIU_LOS)
|
||||
|
||||
#define TECLK_DECODE(fe_cfg) \
|
||||
(FE_CLK(fe_cfg) == WAN_NORMAL_CLK) ? "Normal" : \
|
||||
|
@ -337,6 +419,9 @@
|
|||
"Unknown"
|
||||
|
||||
/* Front-End UDP command */
|
||||
|
||||
#define WAN_FE_SET_LB_MODE WAN_FE_LB_MODE
|
||||
|
||||
#define WAN_FE_GET_STAT (WAN_FE_UDP_CMD_START + 0)
|
||||
#define WAN_FE_LB_MODE (WAN_FE_UDP_CMD_START + 1)
|
||||
#define WAN_FE_FLUSH_PMON (WAN_FE_UDP_CMD_START + 2)
|
||||
|
@ -353,6 +438,7 @@
|
|||
#define WAN_TE_INTR_FXS_DTMF 0x08
|
||||
#define WAN_TE_INTR_PMON 0x10
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* T1/E1 configuration structures.
|
||||
*/
|
||||
|
@ -394,9 +480,6 @@ typedef struct {
|
|||
char rxlevel[WAN_TE_RXLEVEL_LEN];
|
||||
} sdla_te_stats_t;
|
||||
|
||||
/******************************************************************************
|
||||
** BERT definitions
|
||||
**/
|
||||
#define WAN_TE_BERT_CMD_NONE 0x00
|
||||
#define WAN_TE_BERT_CMD_STOP 0x01
|
||||
#define WAN_TE_BERT_CMD_START 0x02
|
||||
|
@ -539,7 +622,9 @@ typedef struct
|
|||
#ifdef WAN_KERNEL
|
||||
|
||||
/* Connection status threshold */
|
||||
#define WAN_TE1_STATUS_THRESHOLD 5
|
||||
/* Original 5
|
||||
** Note (May 7 2009: We are waiting at least 10 sec anyway for other alarms */
|
||||
#define WAN_TE1_STATUS_THRESHOLD 1
|
||||
|
||||
#define WAN_TE1_LBO(fe) FE_LBO(&((fe)->fe_cfg))
|
||||
#define WAN_TE1_CLK(fe) FE_CLK(&((fe)->fe_cfg))
|
||||
|
@ -640,7 +725,7 @@ typedef struct {
|
|||
unsigned char lb_tx_mode;
|
||||
unsigned char lb_tx_code;
|
||||
unsigned long lb_tx_cnt;
|
||||
|
||||
|
||||
unsigned long critical;
|
||||
|
||||
//unsigned char timer_cmd;
|
||||
|
@ -716,4 +801,40 @@ EXTERN int sdla_ds_te1_iface_init(void *p_fe, void *p_fe_iface);
|
|||
#undef EXTERN
|
||||
|
||||
|
||||
/* Deprecated defines */
|
||||
#define WAN_TE_ALARM_MASK_FRAMER WAN_TE_ALARM_FRAMER_MASK
|
||||
#define WAN_TE_ALARM_MASK_LIU WAN_TE_ALARM_LIU_MASK
|
||||
#define WAN_TE_BIT_ALOS_ALARM WAN_TE_BIT_ALARM_ALOS
|
||||
#define WAN_TE_BIT_LOS_ALARM WAN_TE_BIT_ALARM_LOS
|
||||
#define WAN_TE_BIT_ALTLOS_ALARM WAN_TE_BIT_ALARM_ALTLOS
|
||||
#define WAN_TE_BIT_OOF_ALARM WAN_TE_BIT_ALARM_OOF
|
||||
#define WAN_TE_BIT_RED_ALARM WAN_TE_BIT_ALARM_RED
|
||||
#define WAN_TE_BIT_AIS_ALARM WAN_TE_BIT_ALARM_AIS
|
||||
#define WAN_TE_BIT_OOSMF_ALARM WAN_TE_BIT_ALARM_OOSMF
|
||||
#define WAN_TE_BIT_OOCMF_ALARM WAN_TE_BIT_ALARM_OOCMF
|
||||
#define WAN_TE_BIT_OOOF_ALARM WAN_TE_BIT_ALARM_OOOF
|
||||
#define WAN_TE_BIT_RAI_ALARM WAN_TE_BIT_ALARM_RAI
|
||||
#define WAN_TE_BIT_YEL_ALARM WAN_TE_BIT_ALARM_YEL
|
||||
#define WAN_TE_BIT_LIU_ALARM WAN_TE_BIT_ALARM_LIU
|
||||
#define WAN_TE_BIT_LIU_ALARM_SC WAN_TE_BIT_ALARM_LIU_SC
|
||||
#define WAN_TE_BIT_LIU_ALARM_OC WAN_TE_BIT_ALARM_LIU_OC
|
||||
#define WAN_TE_BIT_LIU_ALARM_LOS WAN_TE_BIT_ALARM_LIU_LOS
|
||||
|
||||
#define WAN_TE_ALARM(alarm, bit) ((alarm) & (bit)) ? "ON" : "OFF"
|
||||
|
||||
#define WAN_TE_ALOS_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_ALOS_ALARM)
|
||||
#define WAN_TE_LOS_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LOS_ALARM)
|
||||
#define WAN_TE_OOF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOF_ALARM)
|
||||
#define WAN_TE_RED_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_RED_ALARM)
|
||||
#define WAN_TE_AIS_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_AIS_ALARM)
|
||||
#define WAN_TE_OOSMF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOSMF_ALARM)
|
||||
#define WAN_TE_OOCMF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOCMF_ALARM)
|
||||
#define WAN_TE_OOOF_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_OOOF_ALARM)
|
||||
#define WAN_TE_RAI_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_RAI_ALARM)
|
||||
#define WAN_TE_YEL_ALARM(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_YEL_ALARM)
|
||||
#define WAN_TE_LIU_ALARM_SC(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LIU_ALARM_SC)
|
||||
#define WAN_TE_LIU_ALARM_OC(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LIU_ALARM_OC)
|
||||
#define WAN_TE_LIU_ALARM_LOS(alarm) WAN_TE_ALARM(alarm, WAN_TE_BIT_LIU_ALARM_LOS)
|
||||
|
||||
|
||||
#endif /* _SDLA_TE1_H */
|
||||
|
|
|
@ -102,6 +102,13 @@
|
|||
#define BIT_T1RCR2_RAIIE 0x02
|
||||
#define BIT_T1RCR2_RD4RM 0x01
|
||||
|
||||
#define REG_E1RSAIMR 0x14
|
||||
#define BIT_E1RSAIMR_Rsa4IM 0x10
|
||||
#define BIT_E1RSAIMR_Rsa5IM 0x08
|
||||
#define BIT_E1RSAIMR_Rsa6IM 0x04
|
||||
#define BIT_E1RSAIMR_Rsa7IM 0x02
|
||||
#define BIT_E1RSAIMR_Rsa8IM 0x01
|
||||
|
||||
#define REG_T1RBOCC 0x15
|
||||
#define BIT_T1RBOCC_RBR 0x80
|
||||
#define BIT_T1RBOCC_RBD1 0x02
|
||||
|
@ -147,6 +154,15 @@
|
|||
#define REG_E1RNAF 0x65
|
||||
#define BIT_E1RNAF_A 0x20
|
||||
|
||||
#define REG_SaBITS 0x6E
|
||||
#define BIT_SaBITS_Sa4 0x10
|
||||
#define BIT_SaBITS_Sa5 0x08
|
||||
#define BIT_SaBITS_Sa6 0x04
|
||||
#define BIT_SaBITS_Sa7 0x02
|
||||
#define BIT_SaBITS_Sa8 0x01
|
||||
|
||||
#define REG_Sa6CODE 0x6F
|
||||
|
||||
#define REG_RMMR 0x80
|
||||
#define BIT_RMMR_FRM_EN 0x80
|
||||
#define BIT_RMMR_INIT_DONE 0x40
|
||||
|
@ -275,12 +291,14 @@
|
|||
#define REG_RLS6 0x95
|
||||
|
||||
#define REG_RLS7 0x96
|
||||
#define BIT_RLS7_RRAI_CI 0x20
|
||||
#define BIT_RLS7_RAIS_CI 0x10
|
||||
#define BIT_RLS7_RSLC96 0x08
|
||||
#define BIT_RLS7_RFDLF 0x04
|
||||
#define BIT_RLS7_BC 0x02
|
||||
#define BIT_RLS7_BD 0x01
|
||||
#define BIT_RLS7_T1_RRAI_CI 0x20
|
||||
#define BIT_RLS7_T1_RAIS_CI 0x10
|
||||
#define BIT_RLS7_T1_RSLC96 0x08
|
||||
#define BIT_RLS7_T1_RFDLF 0x04
|
||||
#define BIT_RLS7_T1_BC 0x02
|
||||
#define BIT_RLS7_T1_BD 0x01
|
||||
#define BIT_RLS7_E1_Sa6CD 0x02
|
||||
#define BIT_RLS7_E1_SaXCD 0x01
|
||||
|
||||
#define REG_RSS1 0x98
|
||||
#define BIT_RSS1_CH1 0x80
|
||||
|
@ -322,6 +340,9 @@
|
|||
#define BIT_RSS4_CH31 0x02
|
||||
#define BIT_RSS4_CH32 0x01
|
||||
|
||||
#define REG_T1RSCD1 0x9C
|
||||
#define REG_T1RSCD2 0x9D
|
||||
|
||||
#define REG_RIIR 0x9F
|
||||
#define BIT_RIIR_RLS7 0x40
|
||||
#define BIT_RIIR_RLS6 0x20
|
||||
|
@ -381,8 +402,8 @@
|
|||
#define BIT_RIM5_RNES 0x01
|
||||
|
||||
#define REG_RIM7 0xA6
|
||||
#define BIT_RIM7_RSLC96 0x08
|
||||
#define BIT_RIM7_RFDLF 0x04
|
||||
#define BIT_RIM7_T1_RSLC96 0x08
|
||||
#define BIT_RIM7_T1_RFDLF 0x04
|
||||
#define BIT_RIM7_T1_BC 0x02
|
||||
#define BIT_RIM7_T1_BD 0x01
|
||||
|
||||
|
@ -636,6 +657,9 @@
|
|||
((len)==7) ? BIT_TCR4_TC1 : \
|
||||
((len)==5) ? 0x00 : (BIT_TCR4_TC1|BIT_TCR4_TC0)
|
||||
|
||||
|
||||
|
||||
|
||||
#define REG_TXPC 0x18A
|
||||
#define BIT_TXPC_TBPDIR 0x04
|
||||
#define BIT_TXPC_TBPFUS 0x02
|
||||
|
|
|
@ -354,6 +354,7 @@ typedef struct {
|
|||
((ch)>=(unsigned)'a'&&(ch)<=(unsigned)'f')||\
|
||||
((ch)>=(unsigned)'A'&&(ch)<=(unsigned)'F'))?1:0)
|
||||
|
||||
#define AFT_A600_CARD(card) ((card)->adptr_type == AFT_ADPTR_A600)
|
||||
|
||||
/****** Data Structures *****************************************************/
|
||||
|
||||
|
@ -985,6 +986,7 @@ typedef struct sdla
|
|||
#endif
|
||||
|
||||
unsigned char wp_debug_chan_seq;
|
||||
unsigned int wp_gen_fifo_err;
|
||||
|
||||
#if defined(WANPIPE_PERFORMANCE_DEBUG)
|
||||
wan_ticks_t debug_timeout;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define WANPIPE_COMPANY "Sangoma Technologies Inc"
|
||||
|
||||
/********** LINUX **********/
|
||||
#define WANPIPE_VERSION "3.4.6"
|
||||
#define WANPIPE_VERSION "3.4.7"
|
||||
#define WANPIPE_SUB_VERSION "0"
|
||||
#define WANPIPE_VERSION_BETA 0
|
||||
#define WANPIPE_LITE_VERSION "1.1.1"
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
core_marker_format vmlinux name %s format %s
|
||||
ext4_allocate_blocks vmlinux dev %s block %llu flags %u len %u ino %lu logical %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu
|
||||
ext4_allocate_inode vmlinux dev %s ino %lu dir %lu mode %d
|
||||
ext4_da_write_begin vmlinux dev %s ino %lu pos %llu len %u flags %u
|
||||
ext4_da_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
ext4_da_writepage vmlinux dev %s ino %lu page_index %lu
|
||||
ext4_da_writepage_result vmlinux dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d
|
||||
ext4_da_writepages vmlinux dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d
|
||||
ext4_discard_blocks vmlinux dev %s blk %llu count %u
|
||||
ext4_discard_preallocations vmlinux dev %s ino %lu
|
||||
ext4_free_blocks vmlinux dev %s block %llu count %lu metadata %d ino %lu
|
||||
ext4_free_inode vmlinux dev %s ino %lu mode %d uid %lu gid %lu bocks %llu
|
||||
ext4_journalled_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
ext4_journalled_writepage vmlinux dev %s ino %lu page_index %lu
|
||||
ext4_mb_discard_preallocations vmlinux dev %s needed %d
|
||||
ext4_mb_new_group_pa vmlinux dev %s pstart %llu len %u lstart %u
|
||||
ext4_mb_new_inode_pa vmlinux dev %s ino %lu pstart %llu len %u lstart %u
|
||||
ext4_mb_release_group_pa vmlinux dev %s pstart %llu len %d
|
||||
ext4_mb_release_inode_pa vmlinux dev %s ino %lu block %llu count %u
|
||||
ext4_normal_writepage vmlinux dev %s ino %lu page_index %lu
|
||||
ext4_ordered_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
ext4_request_blocks vmlinux dev %s flags %u len %u ino %lu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu
|
||||
ext4_request_inode vmlinux dev %s dir %lu mode %d
|
||||
ext4_sync_file vmlinux dev %s datasync %d ino %ld parent %ld
|
||||
ext4_sync_fs vmlinux dev %s wait %d
|
||||
ext4_write_begin vmlinux dev %s ino %lu pos %llu len %u flags %u
|
||||
ext4_writeback_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
jbd2_checkpoint vmlinux dev %s need_checkpoint %d
|
||||
jbd2_end_commit vmlinux dev %s transaction %d head %d
|
||||
jbd2_start_commit vmlinux dev %s transaction %d
|
File diff suppressed because it is too large
Load Diff
|
@ -145,6 +145,13 @@
|
|||
# undef AFT_CLOCK_SYNC
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
#undef AFT_FIFO_GEN_DEBUG
|
||||
#else
|
||||
#warning "AFT_FIFO_GEN_DEBUG Enabled"
|
||||
#define AFT_FIFO_GEN_DEBUG
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
# warning "AFT_SERIAL_DEBUGGING is enabled"
|
||||
# define AFT_SINGLE_DMA_CHAIN 1
|
||||
|
@ -365,7 +372,7 @@ static void disable_comm (sdla_t *card);
|
|||
static WAN_IRQ_RETVAL wp_aft_global_isr (sdla_t* card);
|
||||
static void wp_aft_dma_per_port_isr(sdla_t *card);
|
||||
static void wp_aft_tdmv_per_port_isr(sdla_t *card);
|
||||
static void wp_aft_fifo_per_port_isr(sdla_t *card);
|
||||
static int wp_aft_fifo_per_port_isr(sdla_t *card);
|
||||
static void wp_aft_wdt_per_port_isr(sdla_t *card, int wdt_intr);
|
||||
static void wp_aft_serial_status_isr(sdla_t *card, u32 status);
|
||||
static void wp_aft_free_timer_status_isr(sdla_t *g_card, u32 free_run_intr_status);
|
||||
|
@ -3684,11 +3691,12 @@ static void if_tx_timeout (netdevice_t *dev)
|
|||
card->hw_iface.bus_read_4(card->hw,dma_ram_desc,®);
|
||||
cur_dma_ptr=aft_dmachain_get_tx_dma_addr(reg);
|
||||
|
||||
DEBUG_EVENT("%s: Chain TxPend=%d, TxCur=%d, TxPend=%d HwCur=%d TxA=%d TxC=%ld\n",
|
||||
chan->if_name,
|
||||
DEBUG_EVENT("%s: Chain TxPend=%d, TxCur=%d, TxPend=%d TxSize=%i HwCur=%d TxA=%d TxC=%ld\n",
|
||||
chan->if_name,
|
||||
wan_test_bit(TX_INTR_PENDING,&chan->dma_chain_status),
|
||||
chan->tx_chain_indx,
|
||||
chan->tx_pending_chain_indx,
|
||||
chan->tx_chain_sz,
|
||||
cur_dma_ptr,
|
||||
chan->tx_attempts,
|
||||
WAN_NETIF_STATS_TX_PACKETS(&chan->common));
|
||||
|
@ -4721,8 +4729,10 @@ static void aft_dma_tx_complete (sdla_t *card, private_area_t *chan, int wdt, in
|
|||
if (reset){
|
||||
return;
|
||||
}
|
||||
|
||||
aft_dma_tx(card,chan);
|
||||
|
||||
if (!wdt) {
|
||||
aft_dma_tx(card,chan);
|
||||
}
|
||||
|
||||
if (WAN_NETIF_QUEUE_STOPPED(chan->common.dev)){
|
||||
/* Wakeup stack also wakes up DCHAN,
|
||||
|
@ -4730,7 +4740,6 @@ static void aft_dma_tx_complete (sdla_t *card, private_area_t *chan, int wdt, in
|
|||
call the upper layer and let it decide
|
||||
what to do */
|
||||
wanpipe_wake_stack(chan);
|
||||
|
||||
}
|
||||
|
||||
if (chan->common.usedby == TDM_VOICE_DCHAN){
|
||||
|
@ -5507,9 +5516,9 @@ static void wp_bh_rx(private_area_t* chan, netskb_t *new_skb, u8 pkt_error, int
|
|||
|
||||
wan_skb_free(new_skb);
|
||||
|
||||
wan_skb_queue_tail(&chan->wp_tx_pending_list,tskb);
|
||||
|
||||
|
||||
wan_spin_lock_irq(&card->wandev.lock, &smp_flags);
|
||||
wan_skb_queue_tail(&chan->wp_tx_pending_list,tskb);
|
||||
aft_dma_tx(card,chan);
|
||||
wan_spin_unlock_irq(&card->wandev.lock, &smp_flags);
|
||||
#endif
|
||||
|
@ -5691,132 +5700,153 @@ static void wp_bh (void *data, int pending)
|
|||
*
|
||||
**********************************************************/
|
||||
|
||||
|
||||
|
||||
static void __wp_aft_fifo_per_port_isr(sdla_t *card, u32 rx_status, u32 tx_status)
|
||||
static int __wp_aft_fifo_per_port_isr(sdla_t *card, u32 rx_status, u32 tx_status)
|
||||
{
|
||||
int num_of_logic_ch;
|
||||
u32 tmp_fifo_reg;
|
||||
private_area_t *chan, *top_chan=NULL;
|
||||
int i,fifo=0;
|
||||
private_area_t *chan=NULL, *top_chan=NULL;
|
||||
int i,tx_fifo=0,rx_fifo=0;
|
||||
u8 chan_valid=0;
|
||||
u16 skip_tx_top_chan=0,skip_rx_top_chan=0;
|
||||
int irq_handled=0;
|
||||
|
||||
tx_status&=card->u.aft.active_ch_map;
|
||||
tx_status&=card->u.aft.logic_ch_map;
|
||||
|
||||
rx_status&=card->u.aft.active_ch_map;
|
||||
rx_status&=card->u.aft.logic_ch_map;
|
||||
|
||||
num_of_logic_ch=card->u.aft.num_of_time_slots;
|
||||
|
||||
#ifdef WANPIPE_PERFORMANCE_DEBUG
|
||||
if (rx_status) {
|
||||
AFT_PERF_STAT_INC(card,isr,fifo_rx);
|
||||
}
|
||||
|
||||
if (tx_status) {
|
||||
AFT_PERF_STAT_INC(card,isr,fifo_tx);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!tx_status && !rx_status) {
|
||||
return irq_handled;
|
||||
}
|
||||
|
||||
/* At this point we know that fifo interrupt is real */
|
||||
irq_handled=1;
|
||||
|
||||
if (!wan_test_bit(0,&card->u.aft.comm_enabled)){
|
||||
if (tx_status){
|
||||
card->wandev.stats.tx_aborted_errors++;
|
||||
WAN_NETIF_STATS_INC_TX_FIFO_ERRORS(&chan->common); //++chan->if_stats.tx_fifo_errors;
|
||||
}
|
||||
if (rx_status){
|
||||
card->wandev.stats.rx_over_errors++;
|
||||
|
||||
}
|
||||
return;
|
||||
return irq_handled;
|
||||
}
|
||||
|
||||
if (tx_status != 0){
|
||||
for (i=0;i<num_of_logic_ch;i++){
|
||||
if (wan_test_bit(i,&tx_status) && wan_test_bit(i,&card->u.aft.logic_ch_map)){
|
||||
|
||||
chan=(private_area_t*)card->u.aft.dev_to_ch_map[i];
|
||||
if (!chan){
|
||||
DEBUG_EVENT("Warning: ignoring tx fifo intr: no dev!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (wan_test_bit(0,&chan->interface_down)){
|
||||
continue;
|
||||
}
|
||||
#if 1
|
||||
if (!chan->hdlc_eng && !wan_test_bit(0,&chan->idle_start)){
|
||||
DEBUG_TEST("%s: Warning: ignoring tx fifo: dev idle start!\n",
|
||||
chan->if_name);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (IS_BRI_CARD(card) && chan->dchan_time_slot >= 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG_TEST("%s:%s: Warning TX Fifo Error on LogicCh=%ld Slot=%d!\n",
|
||||
card->devname,chan->if_name,chan->logic_ch_num,i);
|
||||
|
||||
#if 0
|
||||
for (i=0;i<num_of_logic_ch;i++){
|
||||
|
||||
chan_valid=0;
|
||||
|
||||
if (wan_test_bit(i,&tx_status)){
|
||||
|
||||
chan=(private_area_t*)card->u.aft.dev_to_ch_map[i];
|
||||
if (!chan){
|
||||
DEBUG_EVENT("Warning: ignoring tx fifo intr: no dev!\n");
|
||||
continue;
|
||||
}
|
||||
chan_valid=1;
|
||||
|
||||
if (wan_test_bit(0,&chan->interface_down)){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IS_BRI_CARD(card) && chan->dchan_time_slot >= 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_TEST("%s:%s: Warning TX Fifo Error on LogicCh=%ld Slot=%d!\n",
|
||||
card->devname,chan->if_name,chan->logic_ch_num,i);
|
||||
|
||||
#if 0
|
||||
{
|
||||
u32 dma_descr,tmp_reg;
|
||||
dma_descr=(chan->logic_ch_num<<4) +
|
||||
AFT_PORT_REG(card,AFT_TX_DMA_HI_DESCR_BASE_REG);
|
||||
u32 dma_descr,tmp_reg;
|
||||
dma_descr=(chan->logic_ch_num<<4) +
|
||||
AFT_PORT_REG(card,AFT_TX_DMA_HI_DESCR_BASE_REG);
|
||||
|
||||
|
||||
card->hw_iface.bus_read_4(card->hw,dma_descr, &tmp_reg);
|
||||
card->hw_iface.bus_read_4(card->hw,dma_descr, &tmp_reg);
|
||||
|
||||
DEBUG_EVENT("%s:%s: Warning TX Fifo Error on LogicCh=%ld Slot=%d Reg=0x%X!\n",
|
||||
card->devname,chan->if_name,chan->logic_ch_num,i,tmp_reg);
|
||||
DEBUG_EVENT("%s:%s: Warning TX Fifo Error on LogicCh=%ld Slot=%d Reg=0x%X!\n",
|
||||
card->devname,chan->if_name,chan->logic_ch_num,i,tmp_reg);
|
||||
|
||||
#if 1
|
||||
aft_list_tx_descriptors(chan);
|
||||
aft_critical_shutdown(card);
|
||||
aft_critical_trigger(card);
|
||||
break;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
fifo++;
|
||||
top_chan=wan_netif_priv(chan->common.dev);
|
||||
|
||||
aft_tx_fifo_under_recover(card,chan);
|
||||
WAN_NETIF_STATS_INC_TX_FIFO_ERRORS(&chan->common); //++chan->if_stats.tx_fifo_errors;
|
||||
card->wandev.stats.tx_aborted_errors++;
|
||||
__sdla_bus_read_4(card->hw,AFT_PORT_REG(card,AFT_TX_FIFO_INTR_PENDING_REG),&tmp_fifo_reg);
|
||||
top_chan=wan_netif_priv(chan->common.dev);
|
||||
if (top_chan == chan) {
|
||||
skip_tx_top_chan++;
|
||||
}
|
||||
|
||||
/* We must handle every fifo error otherwise
|
||||
we could go into an infinite loop */
|
||||
aft_tx_fifo_under_recover(card,chan);
|
||||
|
||||
tx_fifo++;
|
||||
|
||||
|
||||
WAN_NETIF_STATS_INC_TX_FIFO_ERRORS(&chan->common); //++chan->if_stats.tx_fifo_errors;
|
||||
__sdla_bus_read_4(card->hw,AFT_PORT_REG(card,AFT_TX_FIFO_INTR_PENDING_REG),&tmp_fifo_reg);
|
||||
}
|
||||
|
||||
if (fifo) {
|
||||
if (card->u.aft.global_tdm_irq) {
|
||||
if (top_chan) {
|
||||
WAN_NETIF_STATS_INC_TX_FIFO_ERRORS(&top_chan->common); //++chan->if_stats.tx_fifo_errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (wan_test_bit(i,&rx_status)){
|
||||
|
||||
fifo = 0;
|
||||
|
||||
if (rx_status != 0){
|
||||
for (i=0;i<num_of_logic_ch;i++){
|
||||
if (wan_test_bit(i,&rx_status) && wan_test_bit(i,&card->u.aft.logic_ch_map)){
|
||||
if (!chan_valid) {
|
||||
chan=(private_area_t*)card->u.aft.dev_to_ch_map[i];
|
||||
if (!chan){
|
||||
continue;
|
||||
}
|
||||
chan_valid=1;
|
||||
|
||||
if (wan_test_bit(0,&chan->interface_down)){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (IS_BRI_CARD(card) && chan->dchan_time_slot >= 0){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AFT_RX_FIFO_DEBUG
|
||||
{
|
||||
#ifdef AFT_RX_FIFO_DEBUG
|
||||
if (0){
|
||||
u32 dma_descr,tmp1_reg,tmp_reg,cur_dma_ptr;
|
||||
u32 dma_ram_desc=chan->logic_ch_num*4 +
|
||||
u32 dma_ram_desc=chan->logic_ch_num*4 +
|
||||
AFT_PORT_REG(card,AFT_DMA_CHAIN_RAM_BASE_REG);
|
||||
|
||||
|
||||
card->hw_iface.bus_read_4(card->hw,dma_ram_desc,&tmp_reg);
|
||||
cur_dma_ptr=aft_dmachain_get_rx_dma_addr(tmp_reg);
|
||||
|
||||
dma_descr=(chan->logic_ch_num<<4) + cur_dma_ptr*AFT_DMA_INDEX_OFFSET +
|
||||
AFT_PORT_REG(card,AFT_RX_DMA_HI_DESCR_BASE_REG);
|
||||
|
||||
card->hw_iface.bus_read_4(card->hw,dma_descr, &tmp_reg);
|
||||
card->hw_iface.bus_read_4(card->hw,(dma_descr-4), &tmp1_reg);
|
||||
|
||||
|
||||
|
||||
dma_descr=(chan->logic_ch_num<<4) + cur_dma_ptr*AFT_DMA_INDEX_OFFSET +
|
||||
AFT_PORT_REG(card,AFT_RX_DMA_HI_DESCR_BASE_REG);
|
||||
|
||||
card->hw_iface.bus_read_4(card->hw,dma_descr, &tmp_reg);
|
||||
card->hw_iface.bus_read_4(card->hw,(dma_descr-4), &tmp1_reg);
|
||||
|
||||
|
||||
if (wan_test_bit(AFT_RXDMA_HI_GO_BIT,&tmp_reg)){
|
||||
DEBUG_EVENT("%s: Rx Fifo Go Bit Set DMA=%d Addr=0x%X : HI=0x%08X LO=0x%08X OLO=0x%08X Cfg=0x%08X!\n",
|
||||
card->devname,
|
||||
|
@ -5826,57 +5856,65 @@ static void __wp_aft_fifo_per_port_isr(sdla_t *card, u32 rx_status, u32 tx_statu
|
|||
chan->rx_dma_chain_table[chan->rx_chain_indx].dma_addr,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
DEBUG_EVENT("%s:%s: Warning RX Fifo Error on Ch=%ld End=%d Cur=%d: Reg=0x%X Addr=0x%X!\n",
|
||||
card->devname,chan->if_name,chan->logic_ch_num,
|
||||
card->devname,chan->if_name,chan->logic_ch_num,
|
||||
chan->rx_chain_indx,cur_dma_ptr,tmp_reg,dma_descr);
|
||||
|
||||
}
|
||||
#if 0
|
||||
aft_display_chain_history(chan);
|
||||
aft_list_descriptors(chan);
|
||||
#endif
|
||||
#endif
|
||||
WAN_NETIF_STATS_INC_RX_FIFO_ERRORS(&chan->common); //++chan->if_stats.rx_fifo_errors;
|
||||
WAN_NETIF_STATS_INC_RX_OVER_ERRORS(&chan->common); //++chan->if_stats.rx_over_errors;
|
||||
chan->errstats.Rx_overrun_err_count++;
|
||||
card->wandev.stats.rx_over_errors++;
|
||||
|
||||
fifo++;
|
||||
top_chan=wan_netif_priv(chan->common.dev);
|
||||
|
||||
aft_rx_fifo_over_recover(card,chan);
|
||||
wan_set_bit(WP_FIFO_ERROR_BIT, &chan->pkt_error);
|
||||
|
||||
__sdla_bus_read_4(card->hw,AFT_PORT_REG(card,AFT_RX_FIFO_INTR_PENDING_REG),&tmp_fifo_reg);
|
||||
#if 0
|
||||
/* Debuging Code used to stop the line in
|
||||
* case of fifo errors */
|
||||
aft_list_descriptors(chan);
|
||||
|
||||
aft_critical_shutdown(card);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if (0) {
|
||||
aft_display_chain_history(chan);
|
||||
aft_list_descriptors(chan);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
rx_fifo++;
|
||||
top_chan=wan_netif_priv(chan->common.dev);
|
||||
if (top_chan == chan) {
|
||||
skip_rx_top_chan++;
|
||||
}
|
||||
|
||||
if (fifo) {
|
||||
if (card->u.aft.global_tdm_irq) {
|
||||
if (top_chan) {
|
||||
WAN_NETIF_STATS_INC_RX_FIFO_ERRORS(&chan->common); //++chan->if_stats.rx_fifo_errors;
|
||||
WAN_NETIF_STATS_INC_RX_OVER_ERRORS(&chan->common); //++chan->if_stats.rx_over_errors;
|
||||
chan->errstats.Rx_overrun_err_count++;
|
||||
card->wandev.stats.rx_over_errors++;
|
||||
|
||||
aft_rx_fifo_over_recover(card,chan);
|
||||
wan_set_bit(WP_FIFO_ERROR_BIT, &chan->pkt_error);
|
||||
|
||||
__sdla_bus_read_4(card->hw,AFT_PORT_REG(card,AFT_RX_FIFO_INTR_PENDING_REG),&tmp_fifo_reg);
|
||||
#if 0
|
||||
/* Debuging Code used to stop the line in
|
||||
* case of fifo errors */
|
||||
aft_list_descriptors(chan);
|
||||
|
||||
aft_critical_trigger(card);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (tx_fifo || rx_fifo) {
|
||||
if (card->u.aft.global_tdm_irq) {
|
||||
if (top_chan) {
|
||||
if (tx_fifo && !skip_tx_top_chan) {
|
||||
WAN_NETIF_STATS_INC_TX_FIFO_ERRORS(&top_chan->common); //++chan->if_stats.tx_fifo_errors;
|
||||
} else if (rx_fifo && !skip_rx_top_chan) {
|
||||
WAN_NETIF_STATS_INC_RX_FIFO_ERRORS(&top_chan->common); //++chan->if_stats.rx_fifo_errors;
|
||||
WAN_NETIF_STATS_INC_RX_OVER_ERRORS(&top_chan->common); //++chan->if_stats.rx_over_errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
return irq_handled;
|
||||
}
|
||||
|
||||
static void wp_aft_fifo_per_port_isr(sdla_t *card)
|
||||
static int wp_aft_fifo_per_port_isr(sdla_t *card)
|
||||
{
|
||||
u32 rx_status=0, tx_status=0;
|
||||
u32 rx_status=0, tx_status=0;
|
||||
u32 i;
|
||||
int irq=0;
|
||||
|
||||
/* Clear HDLC pending registers */
|
||||
__sdla_bus_read_4(card->hw, AFT_PORT_REG(card,AFT_TX_FIFO_INTR_PENDING_REG),&tx_status);
|
||||
|
@ -5890,14 +5928,14 @@ static void wp_aft_fifo_per_port_isr(sdla_t *card)
|
|||
tmp_card=(sdla_t*)card_list[i];
|
||||
if (tmp_card &&
|
||||
!wan_test_bit(CARD_DOWN,&tmp_card->wandev.critical)) {
|
||||
__wp_aft_fifo_per_port_isr(tmp_card,rx_status,tx_status);
|
||||
irq+=__wp_aft_fifo_per_port_isr(tmp_card,rx_status,tx_status);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
__wp_aft_fifo_per_port_isr(card,rx_status,tx_status);
|
||||
irq=__wp_aft_fifo_per_port_isr(card,rx_status,tx_status);
|
||||
}
|
||||
|
||||
return;
|
||||
return irq;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6218,20 +6256,23 @@ if (serial_reg) {
|
|||
|
||||
if (wan_test_bit(AFT_LCFG_FIFO_INTR_BIT,&card->u.aft.lcfg_reg) &&
|
||||
wan_test_bit(card->wandev.comm_port,&fifo_port_intr)){
|
||||
int irq;
|
||||
#ifdef AFT_IRQ_STAT_DEBUG
|
||||
card->wandev.stats.multicast++;
|
||||
#endif
|
||||
|
||||
wp_aft_fifo_per_port_isr(card);
|
||||
wan_set_bit(card->wandev.comm_port,&dma_port_intr);
|
||||
|
||||
WAN_IRQ_RETVAL_SET(irq_ret, WAN_IRQ_HANDLED);
|
||||
irq=wp_aft_fifo_per_port_isr(card);
|
||||
if (irq) {
|
||||
WAN_IRQ_RETVAL_SET(irq_ret, WAN_IRQ_HANDLED);
|
||||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
if (wan_test_bit(AFT_LCFG_DMA_INTR_BIT,&card->u.aft.lcfg_reg) &&
|
||||
wan_test_bit(card->wandev.comm_port,&dma_port_intr)){
|
||||
int handle_dma=1;
|
||||
|
||||
/* This is our interrupt ack it */
|
||||
WAN_IRQ_RETVAL_SET(irq_ret, WAN_IRQ_HANDLED);
|
||||
|
||||
#if !defined(__WINDOWS__)
|
||||
/* Skip the dma per port and run it in loop below */
|
||||
|
@ -6241,13 +6282,9 @@ if (serial_reg) {
|
|||
#endif
|
||||
|
||||
if (handle_dma) {
|
||||
WAN_IRQ_RETVAL_SET(irq_ret, WAN_IRQ_HANDLED);
|
||||
wp_aft_dma_per_port_isr(card);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#else
|
||||
#warning "NCDEBUG DMA IGNORED"
|
||||
#endif
|
||||
|
@ -6396,10 +6433,12 @@ if (serial_reg) {
|
|||
}
|
||||
|
||||
if (status_port_intr) {
|
||||
WAN_IRQ_RETVAL_SET(irq_ret, WAN_IRQ_HANDLED);
|
||||
wp_aft_serial_status_isr(card, status_port_intr);
|
||||
}
|
||||
|
||||
if (free_port_intr) {
|
||||
WAN_IRQ_RETVAL_SET(irq_ret, WAN_IRQ_HANDLED);
|
||||
wp_aft_free_timer_status_isr(card, free_port_intr);
|
||||
}
|
||||
|
||||
|
@ -6762,20 +6801,40 @@ static void wp_aft_serial_status_isr(sdla_t *top_card, u32 serial_intr_status)
|
|||
|
||||
static void __wp_aft_per_per_port_isr(sdla_t *card, u32 dma_rx_reg, u32 dma_tx_reg)
|
||||
{
|
||||
private_area_t *chan;
|
||||
u32 dma_tx_voice=0;
|
||||
int i;
|
||||
|
||||
private_area_t *chan=NULL;
|
||||
int i, chan_valid=0;
|
||||
#if 0
|
||||
int timer_wakeup=0;
|
||||
#endif
|
||||
|
||||
dma_rx_reg &= card->u.aft.active_ch_map;
|
||||
dma_rx_reg &= card->u.aft.logic_ch_map;
|
||||
dma_rx_reg &= ~(card->u.aft.tdm_logic_ch_map);
|
||||
|
||||
if (!dma_rx_reg) {
|
||||
goto isr_skb_rx;
|
||||
dma_tx_reg &= card->u.aft.active_ch_map;
|
||||
dma_tx_reg &= card->u.aft.logic_ch_map;
|
||||
dma_tx_reg &= ~(card->u.aft.tdm_logic_ch_map);
|
||||
|
||||
if (!dma_rx_reg && !dma_tx_reg) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WANPIPE_PERFORMANCE_DEBUG
|
||||
if (dma_rx_reg) {
|
||||
AFT_PERF_STAT_INC(card,isr,dma_rx);
|
||||
AFT_PERFT_TIMING_STOP_AND_CALC(card,kernel_isr_latency);
|
||||
AFT_PERFT_TIMING_START(card,kernel_isr_latency);
|
||||
}
|
||||
|
||||
if (dma_tx_reg) {
|
||||
AFT_PERF_STAT_INC(card,isr,dma_tx);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i=0; i<card->u.aft.num_of_time_slots;i++){
|
||||
|
||||
chan_valid=0;
|
||||
|
||||
if (wan_test_bit(i,&dma_rx_reg)) {
|
||||
chan=(private_area_t*)card->u.aft.dev_to_ch_map[i];
|
||||
if (!chan){
|
||||
|
@ -6783,13 +6842,13 @@ static void __wp_aft_per_per_port_isr(sdla_t *card, u32 dma_rx_reg, u32 dma_tx_r
|
|||
card->devname,i);
|
||||
continue;
|
||||
}
|
||||
chan_valid=1;
|
||||
|
||||
if (!wan_test_bit(0,&chan->up)){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (chan->channelized_cfg && !chan->hdlc_eng){
|
||||
wan_set_bit(i,&dma_tx_voice);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -6797,74 +6856,57 @@ static void __wp_aft_per_per_port_isr(sdla_t *card, u32 dma_rx_reg, u32 dma_tx_r
|
|||
continue;
|
||||
}
|
||||
|
||||
#if 0
|
||||
WAN_NETIF_STATS_INC_RX_FRAME_ERRORS(&chan->common); //chan->if_stats.rx_frame_errors++;
|
||||
#endif
|
||||
|
||||
DEBUG_TEST("%s: RX Interrupt pend. \n", card->devname);
|
||||
|
||||
aft_dma_rx_complete(card,chan,0);
|
||||
|
||||
if (chan->tdm_span_voice_api) {
|
||||
wan_set_bit(i,&dma_tx_voice);
|
||||
aft_dma_tx_complete(card,chan,0,0);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if (chan->cfg.tdmv_master_if && !chan->tdmv_irq_cfg){
|
||||
aft_channel_rxintr_ctrl(card,chan,1);
|
||||
DEBUG_EVENT("%s: Master dev %s Synched to master irq\n",
|
||||
card->devname,chan->if_name);
|
||||
chan->tdmv_irq_cfg=1;
|
||||
wan_debug_update_timediff(&card->wan_debug_rx_interrupt_timing, __FUNCTION__);
|
||||
#endif
|
||||
aft_dma_rx_complete(card,chan,0);
|
||||
|
||||
#ifdef AFT_SPAN_SINGLE_IRQ
|
||||
if (chan->wp_api_op_mode && !chan->hdlc_eng) {
|
||||
wan_clear_bit(i,&dma_tx_reg);
|
||||
aft_dma_tx_complete(card,chan,0,0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
isr_skb_rx:
|
||||
|
||||
dma_tx_reg&=card->u.aft.active_ch_map;
|
||||
dma_tx_reg&=~dma_tx_voice;
|
||||
dma_tx_reg &= card->u.aft.logic_ch_map;
|
||||
dma_tx_reg &= ~(card->u.aft.tdm_logic_ch_map);
|
||||
|
||||
if (dma_tx_reg == 0){
|
||||
goto isr_skb_tx;
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i<card->u.aft.num_of_time_slots ;i++){
|
||||
if (wan_test_bit(i,&dma_tx_reg)) {
|
||||
|
||||
chan=(private_area_t*)card->u.aft.dev_to_ch_map[i];
|
||||
if (!chan){
|
||||
DEBUG_EVENT("%s: Error: No Dev for Tx logical ch=%d\n",
|
||||
card->devname,i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (chan->channelized_cfg && !chan->hdlc_eng){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IS_BRI_CARD(card) && chan->dchan_time_slot >= 0){
|
||||
continue;
|
||||
if (!chan_valid) {
|
||||
chan=(private_area_t*)card->u.aft.dev_to_ch_map[i];
|
||||
if (!chan){
|
||||
DEBUG_EVENT("%s: Error: No Dev for Rx logical ch=%d\n",
|
||||
card->devname,i);
|
||||
continue;
|
||||
}
|
||||
chan_valid=1;
|
||||
|
||||
if (!wan_test_bit(0,&chan->up)){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (chan->channelized_cfg && !chan->hdlc_eng){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IS_BRI_CARD(card) && chan->dchan_time_slot >= 0){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_ISR("---- TX Interrupt pend. --\n");
|
||||
#if 0
|
||||
wan_debug_update_timediff(&card->wan_debug_tx_interrupt_timing, __FUNCTION__);
|
||||
#endif
|
||||
aft_dma_tx_complete(card,chan,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
isr_skb_tx:
|
||||
DEBUG_ISR("---- ISR SKB TX end.-------------------\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void wp_aft_dma_per_port_isr(sdla_t *card)
|
||||
{
|
||||
int i;
|
||||
|
@ -7495,6 +7537,10 @@ static int process_udp_mgmt_pkt(sdla_t* card, netdevice_t* dev,
|
|||
chan->router_up_time;
|
||||
wan_udp_pkt->wan_udp_data_len = sizeof(unsigned long);
|
||||
wan_udp_pkt->wan_udp_return_code = 0;
|
||||
|
||||
#ifdef AFT_FIFO_GEN_DEBUG
|
||||
card->wp_gen_fifo_err=1;
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if 0
|
||||
|
@ -8630,8 +8676,16 @@ static void aft_rx_fifo_over_recover(sdla_t *card, private_area_t *chan)
|
|||
wanpipe_wake_stack(chan);
|
||||
}
|
||||
|
||||
|
||||
static void aft_tx_fifo_under_recover (sdla_t *card, private_area_t *chan)
|
||||
{
|
||||
{
|
||||
#ifdef AFT_FIFO_GEN_DEBUG
|
||||
if (card->wp_gen_fifo_err) {
|
||||
DEBUG_EVENT("%s: TX FIFO ERROR\n", card->devname);
|
||||
card->wp_gen_fifo_err=0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Igore fifo errors in transpared mode. There is nothing
|
||||
that we can do to make it better. */
|
||||
if (!chan->hdlc_eng && chan->channelized_cfg){
|
||||
|
@ -8641,6 +8695,7 @@ static void aft_tx_fifo_under_recover (sdla_t *card, private_area_t *chan)
|
|||
/* Stream re-synchronization is not necessary when
|
||||
running on single time slot bitstreaming. Equivalent to channelized mode. */
|
||||
if (!chan->hdlc_eng && chan->num_of_time_slots == 1) {
|
||||
wan_clear_bit(0,&chan->idle_start);
|
||||
aft_dma_tx_complete(card,chan,0, 1);
|
||||
aft_free_tx_descriptors(chan);
|
||||
aft_dma_tx(card,chan);
|
||||
|
@ -9163,6 +9218,7 @@ static void aft_tx_dma_chain_handler(unsigned long data, int wdt, int reset)
|
|||
sdla_t *card = chan->card;
|
||||
u32 reg,dma_descr;
|
||||
wan_dma_descr_t *dma_chain;
|
||||
int idle=0;
|
||||
|
||||
if (wan_test_and_set_bit(TX_HANDLER_BUSY,&chan->dma_status)){
|
||||
DEBUG_EVENT("%s: SMP Critical in %s\n",
|
||||
|
@ -9174,6 +9230,8 @@ static void aft_tx_dma_chain_handler(unsigned long data, int wdt, int reset)
|
|||
|
||||
for (;;){
|
||||
|
||||
idle=0;
|
||||
|
||||
/* If the current DMA chain is in use,then
|
||||
* all chains are busy */
|
||||
if (!wan_test_bit(0,&dma_chain->init)){
|
||||
|
@ -9228,11 +9286,22 @@ static void aft_tx_dma_chain_handler(unsigned long data, int wdt, int reset)
|
|||
aft_tx_dma_skb_init(chan,dma_chain->skb);
|
||||
|
||||
dma_chain->skb=NULL;
|
||||
} else {
|
||||
idle=1;
|
||||
}
|
||||
}
|
||||
|
||||
aft_tx_dma_chain_init(chan,dma_chain);
|
||||
|
||||
|
||||
if (!idle && chan->tx_chain_data_sz > 0) {
|
||||
chan->tx_chain_data_sz--;
|
||||
}
|
||||
|
||||
if (chan->tx_chain_sz > 0) {
|
||||
chan->tx_chain_sz--;
|
||||
}
|
||||
|
||||
if (chan->dma_chain_opmode == WAN_AFT_DMA_CHAIN_SINGLE){
|
||||
break;
|
||||
}
|
||||
|
@ -9572,11 +9641,23 @@ static int aft_dma_tx (sdla_t *card,private_area_t *chan)
|
|||
wan_dma_descr_t *dma_chain;
|
||||
int tx_data_cnt=0;
|
||||
netskb_t *skb=NULL;
|
||||
int idle=0;
|
||||
|
||||
|
||||
if (chan->channelized_cfg && !chan->hdlc_eng){
|
||||
return aft_dma_voice_tx(card,chan);
|
||||
}
|
||||
|
||||
|
||||
#ifdef AFT_FIFO_GEN_DEBUG
|
||||
if (card->wp_gen_fifo_err) {
|
||||
card->wp_gen_fifo_err++;
|
||||
if (card->wp_gen_fifo_err < 3) {
|
||||
DEBUG_EVENT("%s: Causing TX FIFO ERROR\n", card->devname);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (wan_test_and_set_bit(TX_DMA_BUSY,&chan->dma_status)){
|
||||
DEBUG_EVENT("%s: SMP Critical in %s\n",
|
||||
chan->if_name,__FUNCTION__);
|
||||
|
@ -9614,12 +9695,13 @@ static int aft_dma_tx (sdla_t *card,private_area_t *chan)
|
|||
skb=atm_tx_skb_dequeue(&chan->wp_tx_pending_list, chan->tx_idle_skb, chan->if_name);
|
||||
}
|
||||
|
||||
idle=0;
|
||||
|
||||
if (!skb){
|
||||
if (!chan->hdlc_eng){
|
||||
|
||||
if (chan->dma_chain_opmode == WAN_AFT_DMA_CHAIN_IRQ_ALL){
|
||||
int chain_diff=aft_tx_dma_chain_chain_len(chan);
|
||||
if (chain_diff >= 2 || tx_data_cnt) {
|
||||
if (chan->tx_chain_sz > 0 || tx_data_cnt) {
|
||||
wan_clear_bit(0,&dma_chain->init);
|
||||
wan_clear_bit(TX_DMA_BUSY,&chan->dma_status);
|
||||
break;
|
||||
|
@ -9627,6 +9709,7 @@ static int aft_dma_tx (sdla_t *card,private_area_t *chan)
|
|||
tx_data_cnt++;
|
||||
}
|
||||
|
||||
idle=1;
|
||||
|
||||
skb=chan->tx_idle_skb;
|
||||
if (!skb){
|
||||
|
@ -9761,6 +9844,11 @@ static int aft_dma_tx (sdla_t *card,private_area_t *chan)
|
|||
wan_capture_trace_packet(card, &chan->trace_info, skb, TRC_OUTGOING_FRM);
|
||||
}
|
||||
|
||||
if (!idle) {
|
||||
chan->tx_chain_data_sz++;
|
||||
}
|
||||
chan->tx_chain_sz++;
|
||||
|
||||
if (chan->dma_chain_opmode == WAN_AFT_DMA_CHAIN_SINGLE){
|
||||
break;
|
||||
}else{
|
||||
|
@ -10685,13 +10773,13 @@ static void aft_reset_tx_chain_cnt(private_area_t *chan)
|
|||
card->hw_iface.bus_read_4(card->hw,dma_ram_desc,®);
|
||||
cur_dma_ptr=aft_dmachain_get_tx_dma_addr(reg);
|
||||
chan->tx_pending_chain_indx = chan->tx_chain_indx = cur_dma_ptr;
|
||||
chan->tx_chain_data_sz=0;
|
||||
chan->tx_chain_sz=0;
|
||||
DEBUG_TEST("%s: Setting Tx Index to %d\n",
|
||||
chan->if_name,cur_dma_ptr);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void aft_free_tx_descriptors(private_area_t *chan)
|
||||
{
|
||||
u32 reg,dma_descr;
|
||||
|
@ -10700,6 +10788,8 @@ static void aft_free_tx_descriptors(private_area_t *chan)
|
|||
int i;
|
||||
void *skb;
|
||||
unsigned int dma_cnt=MAX_AFT_DMA_CHAINS;
|
||||
int limit=2;
|
||||
int q_size;
|
||||
|
||||
if (chan->dma_chain_opmode == WAN_AFT_DMA_CHAIN_SINGLE){
|
||||
dma_cnt=1;
|
||||
|
@ -10731,7 +10821,7 @@ static void aft_free_tx_descriptors(private_area_t *chan)
|
|||
aft_tx_dma_chain_init(chan, dma_chain);
|
||||
}
|
||||
|
||||
chan->tx_chain_indx = chan->tx_pending_chain_indx;
|
||||
aft_reset_tx_chain_cnt(chan);
|
||||
|
||||
while((skb=wan_skb_dequeue(&chan->wp_tx_complete_list)) != NULL){
|
||||
if (!chan->hdlc_eng) {
|
||||
|
@ -10740,6 +10830,32 @@ static void aft_free_tx_descriptors(private_area_t *chan)
|
|||
wan_skb_free(skb);
|
||||
}
|
||||
}
|
||||
|
||||
if (chan->common.usedby == XMTP2_API) {
|
||||
limit=4;
|
||||
}
|
||||
|
||||
q_size=wan_skb_queue_len(&chan->wp_tx_pending_list);
|
||||
|
||||
if (q_size > limit) {
|
||||
while((skb=wan_skb_dequeue(&chan->wp_tx_pending_list)) != NULL){
|
||||
if (!chan->hdlc_eng) {
|
||||
aft_tx_dma_skb_init(chan,skb);
|
||||
} else {
|
||||
wan_skb_free(skb);
|
||||
}
|
||||
q_size--;
|
||||
if (q_size <= limit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_TEST("%s:%s: Tx: Freeing Descripors: Comp=%i Pend=%i Chain=%i\n",
|
||||
card->devname,chan->if_name,
|
||||
wan_skb_queue_len(&chan->wp_tx_complete_list),
|
||||
wan_skb_queue_len(&chan->wp_tx_pending_list),
|
||||
chan->tx_chain_sz);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -657,12 +657,17 @@ static int wp_tdmv_state(void* pcard, int state)
|
|||
|
||||
switch(state){
|
||||
case WAN_CONNECTED:
|
||||
wp->rbs_rx_pending = wp->sig_timeslot_map;
|
||||
wp->rbs_tx_status = 0;
|
||||
wp->rbs_tx1_status = 0;
|
||||
wan_set_bit(WP_TDMV_UP, &wp->flags);
|
||||
break;
|
||||
|
||||
case WAN_DISCONNECTED:
|
||||
wan_clear_bit(WP_TDMV_UP, &wp->flags);
|
||||
wp->rbs_rx_pending = wp->sig_timeslot_map;
|
||||
wp->rbs_tx_status = 0;
|
||||
wp->rbs_tx1_status = 0;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -817,11 +822,11 @@ static void wp_tdmv_report_alarms(void* pcard, unsigned long te_alarm)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_DDLB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE,ENABLE_ALL_CHANNELS);
|
||||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_LINELB_MODE,
|
||||
WAN_TE1_LB_ENABLE);
|
||||
WAN_TE1_LB_ENABLE,ENABLE_ALL_CHANNELS);
|
||||
wp->span.maintstat = ZT_MAINT_REMOTELOOP;
|
||||
}
|
||||
}else{
|
||||
|
@ -834,11 +839,11 @@ static void wp_tdmv_report_alarms(void* pcard, unsigned long te_alarm)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_DDLB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE,ENABLE_ALL_CHANNELS);
|
||||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_LINELB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE,ENABLE_ALL_CHANNELS);
|
||||
wp->span.maintstat = ZT_MAINT_NONE;
|
||||
}
|
||||
}else{
|
||||
|
@ -1357,11 +1362,11 @@ static int wp_tdmv_maint(struct zt_span *span, int cmd)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_DDLB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE,ENABLE_ALL_CHANNELS);
|
||||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_LINELB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE,ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
case ZT_MAINT_LOCALLOOP:
|
||||
DEBUG_EVENT("%s: T1: Set to local loopback mode (local/no remote loop)\n",
|
||||
|
@ -1369,11 +1374,11 @@ static int wp_tdmv_maint(struct zt_span *span, int cmd)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_LINELB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE, ENABLE_ALL_CHANNELS);
|
||||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_DDLB_MODE,
|
||||
WAN_TE1_LB_ENABLE);
|
||||
WAN_TE1_LB_ENABLE, ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
case ZT_MAINT_REMOTELOOP:
|
||||
DEBUG_EVENT("%s: T1: Set to remote loopback mode (no local/remote loop)\n",
|
||||
|
@ -1381,11 +1386,11 @@ static int wp_tdmv_maint(struct zt_span *span, int cmd)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_LINELB_MODE,
|
||||
WAN_TE1_LB_ENABLE);
|
||||
WAN_TE1_LB_ENABLE, ENABLE_ALL_CHANNELS);
|
||||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_LINELB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE, ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
case ZT_MAINT_LOOPUP:
|
||||
DEBUG_EVENT("%s: T1: Send loopup code\n",
|
||||
|
@ -1393,7 +1398,7 @@ static int wp_tdmv_maint(struct zt_span *span, int cmd)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_TX_LINELB_MODE,
|
||||
WAN_TE1_LB_ENABLE);
|
||||
WAN_TE1_LB_ENABLE, ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
case ZT_MAINT_LOOPDOWN:
|
||||
DEBUG_EVENT("%s: T1: Send loopdown code\n",
|
||||
|
@ -1401,7 +1406,7 @@ static int wp_tdmv_maint(struct zt_span *span, int cmd)
|
|||
card->wandev.fe_iface.set_fe_lbmode(
|
||||
&wp->card->fe,
|
||||
WAN_TE1_TX_LINELB_MODE,
|
||||
WAN_TE1_LB_DISABLE);
|
||||
WAN_TE1_LB_DISABLE, ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
case ZT_MAINT_LOOPSTOP:
|
||||
DEBUG_EVENT("%s: T1: Stop sending loop code\n",
|
||||
|
@ -1631,22 +1636,18 @@ static int wp_tdmv_rbsbits(struct zt_chan *chan, int bits)
|
|||
wp_tdmv_softc_t *wp = NULL;
|
||||
sdla_t *card = NULL;
|
||||
unsigned char ABCD_bits = 0x00;
|
||||
wan_smp_flag_t smp_flags;
|
||||
|
||||
/* Byte offset */
|
||||
WAN_ASSERT2(chan == NULL, 0);
|
||||
if ((wp = chan->pvt) == NULL) return 0;
|
||||
WAN_ASSERT2(wp->card == NULL, 0);
|
||||
card = (sdla_t*)wp->card;
|
||||
|
||||
if (!wan_test_bit(chan->chanpos-1, &wp->timeslot_map)){
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!wan_test_bit(WP_TDMV_SIG_ENABLE, &wp->flags)){
|
||||
if (!wan_test_bit(WP_TDMV_SIG_ENABLE, &wp->flags)){
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
if (bits & ZT_ABIT) ABCD_bits |= WAN_RBS_SIG_A;
|
||||
if (bits & ZT_BBIT) ABCD_bits |= WAN_RBS_SIG_B;
|
||||
if (bits & ZT_CBIT) ABCD_bits |= WAN_RBS_SIG_C;
|
||||
|
@ -1665,20 +1666,44 @@ static int wp_tdmv_rbsbits(struct zt_chan *chan, int bits)
|
|||
(ABCD_bits & WAN_RBS_SIG_C) ? 1 : 0,
|
||||
(ABCD_bits & WAN_RBS_SIG_D) ? 1 : 0);
|
||||
|
||||
|
||||
card->hw_iface.hw_lock(card->hw,&smp_flags);
|
||||
if (card->wandev.fe_iface.set_rbsbits) {
|
||||
card->wandev.fe_iface.set_rbsbits(
|
||||
&wp->card->fe,
|
||||
chan->chanpos,
|
||||
ABCD_bits);
|
||||
}
|
||||
card->hw_iface.hw_unlock(card->hw,&smp_flags);
|
||||
|
||||
if (wan_test_and_set_bit(chan->chanpos-1, &wp->rbs_tx_status)){
|
||||
if (ABCD_bits == wp->rbs_tx[chan->chanpos-1]){
|
||||
return 0;
|
||||
}
|
||||
if (wan_test_and_set_bit(chan->chanpos-1, &wp->rbs_tx1_status)){
|
||||
if (ABCD_bits == wp->rbs_tx1[chan->chanpos-1]){
|
||||
return 0;
|
||||
}
|
||||
DEBUG_EVENT("%s: Critical Error: TX RBS overrun for channel %d\n",
|
||||
wp->devname,
|
||||
chan->chanpos);
|
||||
}
|
||||
wp->rbs_tx1[chan->chanpos-1] = ABCD_bits;
|
||||
}else{
|
||||
wp->rbs_tx[chan->chanpos-1] = ABCD_bits;
|
||||
}
|
||||
#if 0
|
||||
wan_set_bit(7, &ABCD_bits);
|
||||
if (wan_test_and_set_bit(7, &wp->rbs_tx[chan->chanpos-1])){
|
||||
if (ABCD_bits == wp->rbs_tx[chan->chanpos-1]){
|
||||
return 0;
|
||||
}
|
||||
if (wan_test_and_set_bit(7, &wp->rbs_tx1[chan->chanpos-1])){
|
||||
if (ABCD_bits == wp->rbs_tx1[chan->chanpos-1]){
|
||||
return 0;
|
||||
}
|
||||
DEBUG_EVENT("%s: Critical Error: TX RBS for channel %d\n",
|
||||
wp->devname,
|
||||
chan->chanpos);
|
||||
}
|
||||
wp->rbs_tx1[chan->chanpos-1] = ABCD_bits;
|
||||
}else{
|
||||
wp->rbs_tx[chan->chanpos-1] = ABCD_bits;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
** wp_tdmv_is_rbsbits() -
|
||||
**
|
||||
|
|
|
@ -54,34 +54,20 @@
|
|||
/******************************************************************************
|
||||
* INCLUDE FILES
|
||||
******************************************************************************/
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
# include <wanpipe_includes.h>
|
||||
# if !defined(CONFIG_PRODUCT_WANPIPE_GENERIC)
|
||||
# include <wanpipe_snmp.h>
|
||||
# endif
|
||||
# include <sdla_te1_pmc.h>
|
||||
# include <wanpipe.h> /* WANPIPE common user API definitions */
|
||||
# include <wanproc.h>
|
||||
#elif (defined __WINDOWS__)
|
||||
# include <wanpipe_includes.h>
|
||||
# include <wanpipe.h> /* WANPIPE common user API definitions */
|
||||
# include <wanpipe_snmp.h>
|
||||
# include <sdla_te1_pmc.h>
|
||||
|
||||
#define _DEBUG_EVENT DEBUG_EVENT
|
||||
#elif (defined __LINUX__) || (defined __KERNEL__)
|
||||
# include <linux/wanpipe_includes.h>
|
||||
# include <linux/wanpipe_defines.h>
|
||||
# include <linux/wanpipe_debug.h>
|
||||
# include <linux/wanproc.h>
|
||||
|
||||
# include "wanpipe_includes.h"
|
||||
# include "wanpipe_defines.h"
|
||||
# include "wanpipe_debug.h"
|
||||
# include "wanproc.h"
|
||||
|
||||
# if !defined(CONFIG_PRODUCT_WANPIPE_GENERIC)
|
||||
# include <linux/wanpipe_snmp.h>
|
||||
# include "wanpipe_snmp.h"
|
||||
# endif
|
||||
# include <linux/sdla_te1_pmc.h>
|
||||
# include <linux/wanpipe.h> /* WANPIPE common user API definitions */
|
||||
#else
|
||||
# error "No OS Defined"
|
||||
#endif
|
||||
|
||||
# include "sdla_te1_pmc.h"
|
||||
# include "wanpipe.h" /* WANPIPE common user API definitions */
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* DEFINES AND MACROS
|
||||
|
@ -209,21 +195,21 @@ static int te_reg_verify = 0;
|
|||
#endif
|
||||
|
||||
|
||||
#define WAN_TE1_FRAMED_ALARMS (WAN_TE_BIT_RED_ALARM | WAN_TE_BIT_OOF_ALARM)
|
||||
#define WAN_TE1_FRAMED_ALARMS (WAN_TE_BIT_ALARM_RED | WAN_TE_BIT_ALARM_OOF)
|
||||
/* Nov 21, 2007 AF */
|
||||
#define WAN_TE1_UNFRAMED_ALARMS (WAN_TE_BIT_RED_ALARM|WAN_TE_BIT_LOS_ALARM)
|
||||
#define WAN_TE1_UNFRAMED_ALARMS (WAN_TE_BIT_ALARM_RED | WAN_TE_BIT_ALARM_LOS)
|
||||
|
||||
#if 0
|
||||
#define TE1_FRAME_ALARM (\
|
||||
WAN_TE_BIT_RED_ALARM | \
|
||||
WAN_TE_BIT_AIS_ALARM | \
|
||||
WAN_TE_BIT_OOF_ALARM | \
|
||||
WAN_TE_BIT_LOS_ALARM)
|
||||
WAN_TE_BIT_ALARM_RED | \
|
||||
WAN_TE_BIT_ALARM_AIS | \
|
||||
WAN_TE_BIT_ALARM_OOF | \
|
||||
WAN_TE_BIT_ALARM_LOS)
|
||||
|
||||
#define TE1_UNFRAME_ALARM (\
|
||||
WAN_TE_BIT_RED_ALARM | \
|
||||
WAN_TE_BIT_AIS_ALARM | \
|
||||
WAN_TE_BIT_LOS_ALARM)
|
||||
WAN_TE_BIT_ALARM_RED | \
|
||||
WAN_TE_BIT_ALARM_AIS | \
|
||||
WAN_TE_BIT_ALARM_LOS)
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -2306,13 +2292,13 @@ static int sdla_te_polling(sdla_fe_t*);
|
|||
static int sdla_te_udp(sdla_fe_t*, void*, unsigned char*);
|
||||
static void sdla_te_set_status(sdla_fe_t*, u_int32_t );
|
||||
static int sdla_te_get_snmp_data(sdla_fe_t* fe, void* pdev, void* data);
|
||||
static int sdla_te_set_lbmode(sdla_fe_t*, u_int8_t, u_int8_t);
|
||||
static int sdla_te_set_lbmode(sdla_fe_t*, u_int8_t, u_int8_t, u_int32_t);
|
||||
static int sdla_t1_boc(sdla_fe_t *fe, u_int8_t boc_status);
|
||||
|
||||
static int sdla_te_linelb(sdla_fe_t*, unsigned char);
|
||||
static int sdla_te_paylb(sdla_fe_t*, unsigned char);
|
||||
static int sdla_te_ddlb(sdla_fe_t*, unsigned char);
|
||||
static int sdla_te_tx_lb(sdla_fe_t*, u_int8_t, u_int8_t);
|
||||
static int sdla_te_tx_lb(sdla_fe_t*, unsigned char, unsigned char);
|
||||
static int sdla_te_txlbcode_done(sdla_fe_t *fe);
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
static void sdla_te_timer(void*);
|
||||
|
@ -3463,11 +3449,11 @@ static int sdla_pmc4351_te_config(sdla_fe_t *fe, u16 adapter_type)
|
|||
/* Global Configuration (Reg 0x00) */
|
||||
value = READ_REG(REG_GLOBAL_CFG);
|
||||
if (IS_E1_FEMEDIA(fe)){
|
||||
if (adapter_type & A101_ADPTR_TE1_MASK){
|
||||
if (adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1){
|
||||
value |= BIT_GLOBAL_TRKEN;
|
||||
}
|
||||
}else{
|
||||
if (adapter_type & A101_ADPTR_TE1_MASK){
|
||||
if (adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1){
|
||||
value |= BIT_GLOBAL_TRKEN;
|
||||
}
|
||||
}
|
||||
|
@ -3584,7 +3570,7 @@ static int sdla_pmc4351_te_config(sdla_fe_t *fe, u16 adapter_type)
|
|||
if (IS_E1_FEMEDIA(fe)){
|
||||
value |= BIT_BTIF_RATE0;
|
||||
}
|
||||
if (!(adapter_type & A101_ADPTR_TE1_MASK)){
|
||||
if (!(adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1)){
|
||||
if (WAN_FE_LCODE(fe) == WAN_LCODE_AMI){
|
||||
value |= BIT_BTIF_NXDS0_0;
|
||||
}
|
||||
|
@ -3592,7 +3578,7 @@ static int sdla_pmc4351_te_config(sdla_fe_t *fe, u16 adapter_type)
|
|||
if (WAN_FE_FRAME(fe) != WAN_FR_UNFRAMED){
|
||||
value |= BIT_BTIF_NXDS0_1;
|
||||
}
|
||||
if (adapter_type & A101_ADPTR_TE1_MASK){
|
||||
if (adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1){
|
||||
value |= (BIT_BTIF_CMODE | BIT_BTIF_DE | BIT_BTIF_FE);
|
||||
}
|
||||
WRITE_REG(REG_BTIF_CFG, value);
|
||||
|
@ -3605,7 +3591,7 @@ static int sdla_pmc4351_te_config(sdla_fe_t *fe, u16 adapter_type)
|
|||
if (IS_E1_FEMEDIA(fe)){
|
||||
value |= BIT_BRIF_RATE0;
|
||||
}
|
||||
if (!(adapter_type & A101_ADPTR_TE1_MASK)){
|
||||
if (!(adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1)){
|
||||
if (WAN_FE_LCODE(fe) == WAN_LCODE_AMI){
|
||||
value |= BIT_BRIF_NXDS0_0;
|
||||
}
|
||||
|
@ -3613,14 +3599,14 @@ static int sdla_pmc4351_te_config(sdla_fe_t *fe, u16 adapter_type)
|
|||
if (WAN_FE_FRAME(fe) != WAN_FR_UNFRAMED){
|
||||
value |= BIT_BRIF_NXDS0_1;
|
||||
}
|
||||
if (adapter_type & A101_ADPTR_TE1_MASK){
|
||||
if (adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1){
|
||||
value |= BIT_BRIF_CMODE;
|
||||
}
|
||||
WRITE_REG(REG_BRIF_CFG, value);
|
||||
|
||||
/* BRIF Frame Pulse Configuration (Reg. 0x31) */
|
||||
value = 0x00;
|
||||
if (adapter_type & A101_ADPTR_TE1_MASK){
|
||||
if (adapter_type == A101_ADPTR_1TE1 || adapter_type == A101_ADPTR_2TE1){
|
||||
value |= BIT_BRIF_FPMODE;
|
||||
}
|
||||
WRITE_REG(REG_BRIF_FR_PULSE_CFG, value);
|
||||
|
@ -4316,6 +4302,7 @@ static int sdla_te_chip_config(sdla_fe_t *fe)
|
|||
card->hw_iface.getcfg(card->hw, SDLA_ADAPTERTYPE, &adapter_type);
|
||||
fe->te_param.max_channels =
|
||||
(IS_E1_FEMEDIA(fe)) ? NUM_OF_E1_TIMESLOTS: NUM_OF_T1_CHANNELS;
|
||||
//fe->te_param.lb_rx_code = LINELB_DS1LINE_DISABLE;
|
||||
switch(fe->fe_chip_id){
|
||||
case CHIP_ID_COMET:
|
||||
sdla_pmc4351_te_config(fe, adapter_type);
|
||||
|
@ -4534,6 +4521,9 @@ static int sdla_te_post_init(void *pfe)
|
|||
wan_clear_bit(TE_TIMER_KILL,(void*)&fe->te_param.critical);
|
||||
wan_clear_bit(TE_TIMER_RUNNING,(void*)&fe->te_param.critical);
|
||||
|
||||
/* Jan 6, 2009 Always enable BOC detection */
|
||||
WRITE_REG(REG_T1_RBOC_ENABLE, READ_REG(REG_T1_RBOC_ENABLE) | BIT_T1_RBOC_ENABLE_BOCE);
|
||||
|
||||
fe_event.type = TE_LINKDOWN_TIMER;
|
||||
fe_event.delay = POLLING_TE1_TIMER;
|
||||
sdla_te_add_event(fe, &fe_event);
|
||||
|
@ -4664,8 +4654,8 @@ static void sdla_te_clear_intr(sdla_fe_t* fe)
|
|||
/* Enable RBOC interrupt */
|
||||
WRITE_REG(REG_T1_RBOC_ENABLE,
|
||||
READ_REG(REG_T1_RBOC_ENABLE) &
|
||||
~(BIT_T1_RBOC_ENABLE_IDLE |
|
||||
BIT_T1_RBOC_ENABLE_BOCE));
|
||||
~(BIT_T1_RBOC_ENABLE_IDLE/* |
|
||||
BIT_T1_RBOC_ENABLE_BOCE*/));
|
||||
/* Enable interrupt on RED, AIS, YEL alarms */
|
||||
WRITE_REG(REG_T1_ALMI_INT_EN,
|
||||
READ_REG(REG_T1_ALMI_INT_EN) &
|
||||
|
@ -4863,7 +4853,7 @@ static u_int32_t sdla_te_is_t1_alarm(sdla_fe_t *fe, u_int32_t alarms)
|
|||
u_int32_t alarm_mask = WAN_TE1_FRAMED_ALARMS;
|
||||
|
||||
if (fe->fe_cfg.cfg.te_cfg.ignore_yel_alarm == WANOPT_NO){
|
||||
alarm_mask |= WAN_TE_BIT_RAI_ALARM;
|
||||
alarm_mask |= WAN_TE_BIT_ALARM_RAI;
|
||||
}
|
||||
return (alarms & alarm_mask);
|
||||
}
|
||||
|
@ -4904,18 +4894,18 @@ static void sdla_te_set_status(sdla_fe_t* fe, u_int32_t alarms)
|
|||
|
||||
if (valid_rx_alarms){
|
||||
if (fe->fe_status != FE_DISCONNECTED){
|
||||
if (!(valid_rx_alarms & WAN_TE_BIT_RAI_ALARM)){
|
||||
sdla_te_set_alarms(fe, WAN_TE_BIT_YEL_ALARM);
|
||||
if (!(valid_rx_alarms & WAN_TE_BIT_ALARM_RAI)){
|
||||
sdla_te_set_alarms(fe, WAN_TE_BIT_ALARM_YEL);
|
||||
}
|
||||
fe->fe_status = FE_DISCONNECTED;
|
||||
}else if (fe->te_param.tx_yel_alarm && valid_rx_alarms == WAN_TE_BIT_RAI_ALARM){
|
||||
}else if (fe->te_param.tx_yel_alarm && valid_rx_alarms == WAN_TE_BIT_ALARM_RAI){
|
||||
/* Special case for loopback */
|
||||
sdla_te_clear_alarms(fe, WAN_TE_BIT_YEL_ALARM);
|
||||
sdla_te_clear_alarms(fe, WAN_TE_BIT_ALARM_YEL);
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_status != FE_CONNECTED){
|
||||
if (fe->te_param.tx_yel_alarm){
|
||||
sdla_te_clear_alarms(fe, WAN_TE_BIT_YEL_ALARM);
|
||||
sdla_te_clear_alarms(fe, WAN_TE_BIT_ALARM_YEL);
|
||||
}
|
||||
fe->fe_status = FE_CONNECTED;
|
||||
}
|
||||
|
@ -5067,19 +5057,19 @@ static u_int32_t sdla_te_read_alarms(sdla_fe_t *fe, int action)
|
|||
** Reg 0xF8 (ALOSI = 1) */
|
||||
if (READ_REG(REG_RLPS_ALOS_DET_PER) &&
|
||||
(READ_REG(REG_RLPS_CFG_STATUS) & BIT_RLPS_CFG_STATUS_ALOSV)){
|
||||
new_alarms |= WAN_TE_BIT_ALOS_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_ALOS;
|
||||
}
|
||||
|
||||
/* 2. LOS alarm
|
||||
** Reg 0x12 */
|
||||
if (READ_REG(REG_CDRC_INT_STATUS) & BIT_CDRC_INT_STATUS_LOSV){
|
||||
new_alarms |= WAN_TE_BIT_LOS_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_LOS;
|
||||
}
|
||||
|
||||
/* 3. ALTLOS alarm ??????????????????
|
||||
** Reg 0x13 */
|
||||
if (READ_REG(REG_ALTLOS_STATUS) & BIT_ALTLOS_STATUS_ALTLOS){
|
||||
new_alarms |= WAN_TE_BIT_ALTLOS_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_ALTLOS;
|
||||
}
|
||||
|
||||
/* Check specific E1 and T1 alarms */
|
||||
|
@ -5091,36 +5081,36 @@ static u_int32_t sdla_te_read_alarms(sdla_fe_t *fe, int action)
|
|||
/* 4. OOF alarm */
|
||||
if (WAN_FE_FRAME(fe) != WAN_FR_UNFRAMED){
|
||||
if (e1_status & BIT_E1_FRMR_FR_STATUS_OOFV){
|
||||
new_alarms |= WAN_TE_BIT_OOF_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_OOF;
|
||||
}
|
||||
}
|
||||
/* 5. OOSMF alarm */
|
||||
if (e1_status & BIT_E1_FRMR_FR_STATUS_OOSMFV){
|
||||
new_alarms |= WAN_TE_BIT_OOSMF_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_OOSMF;
|
||||
}
|
||||
/* 6. OOCMF alarm */
|
||||
if (e1_status & BIT_E1_FRMR_FR_STATUS_OOCMFV){
|
||||
new_alarms |= WAN_TE_BIT_OOCMF_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_OOCMF;
|
||||
}
|
||||
/* 7. OOOF alarm */
|
||||
if (e1_status & BIT_E1_FRMR_FR_STATUS_OOOFV){
|
||||
new_alarms |= WAN_TE_BIT_OOOF_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_OOOF;
|
||||
}
|
||||
/* 8. RAI alarm */
|
||||
if (e1_mnt_status & BIT_E1_FRMR_MAINT_STATUS_RAIV){
|
||||
new_alarms |= WAN_TE_BIT_RAI_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_RAI;
|
||||
}
|
||||
/* 9. RED alarm
|
||||
** Reg 0x97 (REDD) */
|
||||
if (e1_mnt_status & BIT_E1_FRMR_MAINT_STATUS_RED){
|
||||
new_alarms |= WAN_TE_BIT_RED_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_RED;
|
||||
}
|
||||
/* 10. AIS alarm
|
||||
** Reg 0x91 (AISC)
|
||||
** Reg 0x97 (AIS) */
|
||||
if ((READ_REG(REG_E1_FRMR_MAINT_OPT) & BIT_E1_FRMR_MAINT_OPT_AISC) &&
|
||||
(e1_mnt_status & BIT_E1_FRMR_MAINT_STATUS_AIS)){
|
||||
new_alarms |= WAN_TE_BIT_AIS_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_AIS;
|
||||
}
|
||||
} else {
|
||||
u_int8_t t1_status = 0x00, t1_alm_status = 0x00;
|
||||
|
@ -5128,7 +5118,7 @@ static u_int32_t sdla_te_read_alarms(sdla_fe_t *fe, int action)
|
|||
/* 4. OOF alarm
|
||||
** Reg 0x4A (INFR=0 T1 mode) */
|
||||
if (!(READ_REG(REG_T1_FRMR_INT_STATUS) & BIT_T1_FRMR_INT_STATUS_INFR)){
|
||||
new_alarms |= WAN_TE_BIT_OOF_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_OOF;
|
||||
}
|
||||
t1_alm_status = READ_REG(REG_T1_ALMI_INT_STATUS);
|
||||
t1_status = READ_REG(REG_T1_ALMI_DET_STATUS);
|
||||
|
@ -5137,19 +5127,19 @@ static u_int32_t sdla_te_read_alarms(sdla_fe_t *fe, int action)
|
|||
** Reg 0x62 (AIS)
|
||||
** Reg 0x63 (AISD) */
|
||||
if (t1_status & BIT_T1_ALMI_DET_STATUS_AISD){
|
||||
new_alarms |= WAN_TE_BIT_AIS_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_AIS;
|
||||
}
|
||||
/* 6. RED alarm
|
||||
** Reg 0x63 (REDD) */
|
||||
if ((t1_status & BIT_T1_ALMI_DET_STATUS_REDD) ||
|
||||
(t1_alm_status & BIT_T1_ALMI_INT_STATUS_RED)){
|
||||
new_alarms |= WAN_TE_BIT_RED_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_RED;
|
||||
}
|
||||
/* 7. YEL alarm
|
||||
** Reg 0x62 (YEL)
|
||||
** Reg 0x63 (YELD) */
|
||||
if (t1_status & BIT_T1_ALMI_DET_STATUS_YELD){
|
||||
new_alarms |= WAN_TE_BIT_RAI_ALARM; //WAN_TE_BIT_YEL_ALARM;
|
||||
new_alarms |= WAN_TE_BIT_ALARM_RAI; //WAN_TE_BIT_ALARM_YEL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5187,28 +5177,28 @@ static int sdla_te_print_alarms(sdla_fe_t* fe, u_int32_t alarms)
|
|||
fe->name,
|
||||
FE_MEDIA_DECODE(fe));
|
||||
|
||||
if (alarms & WAN_TE_BIT_ALOS_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_ALOS){
|
||||
DEBUG_EVENT("%s: ALOS : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_LOS_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_LOS){
|
||||
DEBUG_EVENT("%s: LOS : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_ALTLOS_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_ALTLOS){
|
||||
DEBUG_EVENT("%s: ALTLOS : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_OOF_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_OOF){
|
||||
DEBUG_EVENT("%s: OOF : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_RAI_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_RAI){
|
||||
DEBUG_EVENT("%s: RAI : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_RED_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_RED){
|
||||
DEBUG_EVENT("%s: RED : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_AIS_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_AIS){
|
||||
DEBUG_EVENT("%s: AIS : ON\n", fe->name);
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_YEL_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_YEL){
|
||||
DEBUG_EVENT("%s: YEL : ON\n", fe->name);
|
||||
}
|
||||
return 0;
|
||||
|
@ -5226,7 +5216,7 @@ static int sdla_te_set_alarms(sdla_fe_t* fe, u_int32_t alarms)
|
|||
{
|
||||
unsigned char value = 0x00;
|
||||
|
||||
if (alarms & WAN_TE_BIT_YEL_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_YEL){
|
||||
if (IS_T1_FEMEDIA(fe)) {
|
||||
value = READ_REG(REG_T1_XBAS_ALARM_TX);
|
||||
if (!(value & BIT_T1_XBAS_ALARM_TX_XYEL)){
|
||||
|
@ -5252,7 +5242,7 @@ static int sdla_te_clear_alarms(sdla_fe_t* fe, u_int32_t alarms)
|
|||
{
|
||||
unsigned char value = 0x00;
|
||||
|
||||
if (alarms & WAN_TE_BIT_YEL_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_YEL){
|
||||
if (IS_T1_FEMEDIA(fe)) {
|
||||
value = READ_REG(REG_T1_XBAS_ALARM_TX);
|
||||
if (value & BIT_T1_XBAS_ALARM_TX_XYEL){
|
||||
|
@ -5592,46 +5582,46 @@ static void sdla_t1_rx_intr(sdla_fe_t* fe)
|
|||
status = READ_REG(REG_T1_ALMI_INT_STATUS);
|
||||
if (status & BIT_T1_ALMI_INT_STATUS_YELI){
|
||||
if (status & BIT_T1_ALMI_INT_STATUS_YEL){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_YEL_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_YEL)){
|
||||
DEBUG_EVENT("%s: RAI alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_RAI_ALARM; //WAN_TE_BIT_YEL_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_RAI; //WAN_TE_BIT_ALARM_YEL;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_YEL_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_YEL){
|
||||
DEBUG_EVENT("%s: RAI alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_RAI_ALARM; //~WAN_TE_BIT_YEL_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_RAI; //~WAN_TE_BIT_ALARM_YEL;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (status & BIT_T1_ALMI_INT_STATUS_REDI){
|
||||
if (status & BIT_T1_ALMI_INT_STATUS_RED){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_RED_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_RED)){
|
||||
DEBUG_EVENT("%s: RED alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_RED_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_RED;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_RED_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_RED){
|
||||
DEBUG_EVENT("%s: RED alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_RED_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_RED;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (status & BIT_T1_ALMI_INT_STATUS_AISI){
|
||||
if (status & BIT_T1_ALMI_INT_STATUS_AIS){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_AIS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_AIS)){
|
||||
DEBUG_EVENT("%s: AIS alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_AIS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_AIS;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_AIS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_AIS){
|
||||
DEBUG_EVENT("%s: AIS alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_AIS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_AIS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5641,7 +5631,9 @@ static void sdla_t1_rx_intr(sdla_fe_t* fe)
|
|||
if (fe->te_param.intr_src3 & BIT_INT_SRC_3_RBOC){
|
||||
status = READ_REG(REG_T1_RBOC_CODE_STATUS);
|
||||
if (status & BIT_T1_RBOC_CODE_STATUS_BOCI){
|
||||
|
||||
sdla_t1_boc(fe, status);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5651,16 +5643,16 @@ static void sdla_t1_rx_intr(sdla_fe_t* fe)
|
|||
if ((READ_REG(REG_T1_FRMR_INT_EN) & BIT_T1_FRMR_INT_EN_INFRE) &&
|
||||
(status & BIT_T1_FRMR_INT_STATUS_INFRI)){
|
||||
if (status & BIT_T1_FRMR_INT_STATUS_INFR){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_OOF_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_OOF)){
|
||||
DEBUG_EVENT("%s: OOF alarm is ON!\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_OOF_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_OOF;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_OOF_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_OOF){
|
||||
DEBUG_EVENT("%s: OOF alarm is OFF!\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_OOF_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_OOF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5671,20 +5663,20 @@ static void sdla_t1_rx_intr(sdla_fe_t* fe)
|
|||
status = READ_REG(REG_RLPS_CFG_STATUS);
|
||||
if ((status & BIT_RLPS_CFG_STATUS_ALOSE) && (status & BIT_RLPS_CFG_STATUS_ALOSI)){
|
||||
if (status & BIT_RLPS_CFG_STATUS_ALOSV){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALOS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_ALOS)){
|
||||
if (WAN_NET_RATELIMIT()){
|
||||
DEBUG_EVENT("%s: ALOS alarm is ON\n",
|
||||
fe->name);
|
||||
}
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALOS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_ALOS;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALOS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_ALOS){
|
||||
if (WAN_NET_RATELIMIT()){
|
||||
DEBUG_EVENT("%s: ALOS alarm is OFF\n",
|
||||
fe->name);
|
||||
}
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_ALOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5696,20 +5688,20 @@ static void sdla_t1_rx_intr(sdla_fe_t* fe)
|
|||
if ((READ_REG(REG_CDRC_INT_EN) & BIT_CDRC_INT_EN_LOSE) &&
|
||||
(status & BIT_CDRC_INT_STATUS_LOSI)){
|
||||
if (status & BIT_CDRC_INT_STATUS_LOSV){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_LOS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_LOS)){
|
||||
if (WAN_NET_RATELIMIT()){
|
||||
DEBUG_EVENT("%s: LOS alarm is ON\n",
|
||||
fe->name);
|
||||
}
|
||||
fe->fe_alarm |= WAN_TE_BIT_LOS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_LOS;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_LOS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_LOS){
|
||||
if (WAN_NET_RATELIMIT()){
|
||||
DEBUG_EVENT("%s: LOS alarm is OFF\n",
|
||||
fe->name);
|
||||
}
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_LOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_LOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5731,16 +5723,16 @@ static void sdla_t1_rx_intr(sdla_fe_t* fe)
|
|||
status = READ_REG(REG_ALTLOS_STATUS);
|
||||
if ((status & BIT_ALTLOS_STATUS_ALTLOSI) && (status & BIT_ALTLOS_STATUS_ALTLOSE)){
|
||||
if (status & BIT_ALTLOS_STATUS_ALTLOS){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALTLOS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_ALTLOS)){
|
||||
DEBUG_EVENT("%s: ALTLOS alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALTLOS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_ALTLOS;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALTLOS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_ALTLOS){
|
||||
DEBUG_EVENT("%s: ALTLOS alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALTLOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_ALTLOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5874,16 +5866,16 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
/* Always ignore OOF alarm (even it is ON) */
|
||||
if (WAN_FE_FRAME(fe) != WAN_FR_UNFRAMED){
|
||||
if (status & BIT_E1_FRMR_FR_STATUS_OOFV){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_OOF_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_OOF)){
|
||||
DEBUG_EVENT("%s: OOF alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_OOF_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_OOF;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_OOF_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_OOF){
|
||||
DEBUG_EVENT("%s: OOF alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_OOF_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_OOF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5894,11 +5886,11 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
if (status & BIT_E1_FRMR_FR_STATUS_OOSMFV){
|
||||
DEBUG_EVENT("%s: OOSMF alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_OOSMF_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_OOSMF;
|
||||
}else{
|
||||
DEBUG_EVENT("%s: OOSMF alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_OOSMF_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_OOSMF;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5907,11 +5899,11 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
if (status & BIT_E1_FRMR_FR_STATUS_OOCMFV){
|
||||
DEBUG_EVENT("%s: OOCMF alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_OOCMF_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_OOCMF;
|
||||
}else{
|
||||
DEBUG_EVENT("%s: OOCMF alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_OOCMF_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_OOCMF;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5922,11 +5914,11 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
if (READ_REG(REG_E1_FRMR_FR_STATUS) & BIT_E1_FRMR_FR_STATUS_OOOFV){
|
||||
DEBUG_EVENT("%s: OOOF alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_OOOF_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_OOOF;
|
||||
}else{
|
||||
DEBUG_EVENT("%s: OOOF alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_OOOF_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_OOOF;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5941,17 +5933,17 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
(int_status & BIT_E1_FRMR_M_A_INT_IND_REDI)){
|
||||
if (status & BIT_E1_FRMR_MAINT_STATUS_RED){
|
||||
DEBUG_EVENT("%s: RED alarm is ON\n", fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_RED_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_RED;
|
||||
}else{
|
||||
DEBUG_EVENT("%s: RED alarm is OFF\n", fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_RED_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_RED;
|
||||
}
|
||||
}
|
||||
if ((int_en & BIT_E1_FRMR_M_A_INT_EN_AISE) &&
|
||||
(int_status & BIT_E1_FRMR_M_A_INT_IND_AISI)){
|
||||
if (status & BIT_E1_FRMR_MAINT_STATUS_AIS){
|
||||
DEBUG_EVENT("%s: AIS alarm is ON\n", fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_AIS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_AIS;
|
||||
/* AS/ACIF S016 Clause 5.2.3 */
|
||||
WRITE_REG(REG_E1_TRAN_TX_ALARM_CTRL,
|
||||
READ_REG(REG_E1_TRAN_TX_ALARM_CTRL) |
|
||||
|
@ -5961,7 +5953,7 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
}
|
||||
}else{
|
||||
DEBUG_EVENT("%s: AIS alarm is OFF\n", fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_AIS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_AIS;
|
||||
/* AS/ACIF S016 Clause 5.2.3 */
|
||||
WRITE_REG(REG_E1_TRAN_TX_ALARM_CTRL,
|
||||
READ_REG(REG_E1_TRAN_TX_ALARM_CTRL) &
|
||||
|
@ -5975,10 +5967,10 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
(int_status & BIT_E1_FRMR_M_A_INT_IND_RAII)){
|
||||
if (status & BIT_E1_FRMR_MAINT_STATUS_RAIV){
|
||||
DEBUG_EVENT("%s: RAI alarm is ON\n", fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_RAI_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_RAI;
|
||||
}else{
|
||||
DEBUG_EVENT("%s: RAI alarm is OFF\n", fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_RAI_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_RAI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5990,20 +5982,20 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
if ((status & BIT_RLPS_CFG_STATUS_ALOSE) &&
|
||||
(status & BIT_RLPS_CFG_STATUS_ALOSI)){
|
||||
if (status & BIT_RLPS_CFG_STATUS_ALOSV){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALOS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_ALOS)){
|
||||
DEBUG_EVENT("%s: ALOS alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALOS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_ALOS;
|
||||
/* AS/ACIF S016 Clause 5.2.3 */
|
||||
WRITE_REG(REG_E1_TRAN_TX_ALARM_CTRL,
|
||||
READ_REG(REG_E1_TRAN_TX_ALARM_CTRL) |
|
||||
BIT_E1_TRAN_TX_ALARM_RAI);
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALOS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_ALOS){
|
||||
DEBUG_EVENT("%s: ALOS alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_ALOS;
|
||||
/* AS/ACIF S016 Clause 5.2.3 */
|
||||
WRITE_REG(REG_E1_TRAN_TX_ALARM_CTRL,
|
||||
READ_REG(REG_E1_TRAN_TX_ALARM_CTRL) &
|
||||
|
@ -6019,14 +6011,14 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
if ((READ_REG(REG_CDRC_INT_EN) & BIT_CDRC_INT_EN_LOSE) &&
|
||||
(status & BIT_CDRC_INT_STATUS_LOSI)){
|
||||
if (status & BIT_CDRC_INT_STATUS_LOSV){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_LOS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_LOS)){
|
||||
DEBUG_EVENT("%s: LOS alarm is ON\n", fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_LOS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_LOS;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_LOS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_LOS){
|
||||
DEBUG_EVENT("%s: LOS alarm is OFF\n", fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_LOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_LOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6046,16 +6038,16 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
if ((status & BIT_ALTLOS_STATUS_ALTLOSI) &&
|
||||
(status & BIT_ALTLOS_STATUS_ALTLOSE)){
|
||||
if (status & BIT_ALTLOS_STATUS_ALTLOS){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALTLOS_ALARM)){
|
||||
if (!(fe->fe_alarm & WAN_TE_BIT_ALARM_ALTLOS)){
|
||||
DEBUG_EVENT("%s: E1 Alternate Loss of Signal alarm is ON\n",
|
||||
fe->name);
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALTLOS_ALARM;
|
||||
fe->fe_alarm |= WAN_TE_BIT_ALARM_ALTLOS;
|
||||
}
|
||||
}else{
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALTLOS_ALARM){
|
||||
if (fe->fe_alarm & WAN_TE_BIT_ALARM_ALTLOS){
|
||||
DEBUG_EVENT("%s: E1 Alternate Loss of Signal alarm is OFF\n",
|
||||
fe->name);
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALTLOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_ALTLOS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6091,11 +6083,12 @@ static void sdla_e1_rx_intr(sdla_fe_t* fe)
|
|||
}
|
||||
#endif
|
||||
if (!(READ_REG(REG_RLPS_CFG_STATUS) & BIT_RLPS_CFG_STATUS_ALOSV)){
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALOS_ALARM;
|
||||
fe->fe_alarm &= ~WAN_TE_BIT_ALARM_ALOS;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* sdla_t1_boc()
|
||||
*
|
||||
|
@ -6143,14 +6136,14 @@ static int sdla_t1_boc(sdla_fe_t *fe, u_int8_t boc_value)
|
|||
fe->name,
|
||||
WAN_TE1_LB_ACTION_DECODE(lb_cmd),
|
||||
WAN_TE1_LB_MODE_DECODE(lb_mode));
|
||||
sdla_te_set_lbmode(fe, lb_mode, lb_cmd);
|
||||
sdla_te_set_lbmode(fe, lb_mode, lb_cmd, ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
|
||||
case UNIVLB_DEACTIVATE_CODE:
|
||||
DEBUG_TE1("%s: Received T1 %s code from far end.\n",
|
||||
fe->name, WAN_TE1_BOC_LB_CODE_DECODE(boc_value));
|
||||
sdla_te_set_lbmode(fe, WAN_TE1_LINELB_MODE, WAN_TE1_LB_DISABLE);
|
||||
sdla_te_set_lbmode(fe, WAN_TE1_PAYLB_MODE, WAN_TE1_LB_DISABLE);
|
||||
sdla_te_set_lbmode(fe, WAN_TE1_LINELB_MODE, WAN_TE1_LB_DISABLE, ENABLE_ALL_CHANNELS);
|
||||
sdla_te_set_lbmode(fe, WAN_TE1_PAYLB_MODE, WAN_TE1_LB_DISABLE, ENABLE_ALL_CHANNELS);
|
||||
break;
|
||||
|
||||
case BITS_T1_XBOC_DISABLE:
|
||||
|
@ -6171,6 +6164,7 @@ static int sdla_t1_boc(sdla_fe_t *fe, u_int8_t boc_value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
******************************************************************************
|
||||
* sdla_te_set_lbmode()
|
||||
|
@ -6181,7 +6175,7 @@ static int sdla_t1_boc(sdla_fe_t *fe, u_int8_t boc_value)
|
|||
******************************************************************************
|
||||
*/
|
||||
static int
|
||||
sdla_te_set_lbmode(sdla_fe_t *fe, u_int8_t mode, u_int8_t enable)
|
||||
sdla_te_set_lbmode(sdla_fe_t *fe, u_int8_t mode, u_int8_t enable, u_int32_t chan_map)
|
||||
{
|
||||
int err = 1;
|
||||
|
||||
|
@ -6295,7 +6289,7 @@ static int sdla_te_ddlb(sdla_fe_t* fe, unsigned char mode)
|
|||
*****************************************************************************/
|
||||
static u32 sdla_te_get_lbmode(sdla_fe_t *fe)
|
||||
{
|
||||
u32 mode = 0x00;
|
||||
u32 type_map = 0x00;
|
||||
u8 master = 0x00;
|
||||
|
||||
WAN_ASSERT(fe->write_fe_reg == NULL);
|
||||
|
@ -6303,15 +6297,15 @@ static u32 sdla_te_get_lbmode(sdla_fe_t *fe)
|
|||
|
||||
master = READ_REG(REG_MASTER_DIAG);
|
||||
if (master & BIT_MASTER_DIAG_LINELB){
|
||||
wan_set_bit(WAN_TE1_LINELB_MODE, &mode);
|
||||
wan_set_bit(WAN_TE1_LINELB_MODE, &type_map);
|
||||
}
|
||||
if (master & BIT_MASTER_DIAG_PAYLB){
|
||||
wan_set_bit(WAN_TE1_PAYLB_MODE, &mode);
|
||||
wan_set_bit(WAN_TE1_PAYLB_MODE, &type_map);
|
||||
}
|
||||
if (master & BIT_MASTER_DIAG_DDLB){
|
||||
wan_set_bit(WAN_TE1_DDLB_MODE, &mode);
|
||||
wan_set_bit(WAN_TE1_DDLB_MODE, &type_map);
|
||||
}
|
||||
return mode;
|
||||
return type_map;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -6337,12 +6331,10 @@ static void sdla_te_timer(unsigned long pfe)
|
|||
wan_smp_flag_t smp_flags;
|
||||
int empty = 1;
|
||||
|
||||
DEBUG_TIMER("%s: %s timer!\n",
|
||||
DEBUG_TE1("%s: %s timer!\n",
|
||||
fe->name,
|
||||
FE_MEDIA_DECODE(fe));
|
||||
|
||||
DEBUG_TE1("%s(): line: %d\n", __FUNCTION__, __LINE__);
|
||||
|
||||
if (wan_test_bit(TE_TIMER_KILL,(void*)&fe->te_param.critical)){
|
||||
wan_clear_bit(TE_TIMER_RUNNING,(void*)&fe->te_param.critical);
|
||||
|
||||
|
@ -6446,12 +6438,7 @@ static int sdla_te_add_timer(sdla_fe_t* fe, unsigned long delay)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
/* delay is in MS, so it can be used directly by wan_add_timer() */
|
||||
err = wan_add_timer(&fe->timer, delay);
|
||||
#else
|
||||
err = wan_add_timer(&fe->timer, delay * HZ / 1000);
|
||||
#endif
|
||||
err = wan_add_timer(&fe->timer, delay * HZ);
|
||||
if (err){
|
||||
/* Failed to add timer */
|
||||
return -EINVAL;
|
||||
|
@ -6502,10 +6489,8 @@ static int sdla_te_polling(sdla_fe_t* fe)
|
|||
|
||||
switch(fe_event->type){
|
||||
case TE_LINELB_TIMER:
|
||||
|
||||
if (IS_T1_FEMEDIA(fe)){
|
||||
sdla_te_txlbcode_done(fe);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -6621,9 +6606,9 @@ static int sdla_te_txlbcode_done(sdla_fe_t *fe)
|
|||
|
||||
WRITE_REG(REG_T1_XBOC_CODE, BITS_T1_XBOC_DISABLE);
|
||||
DEBUG_EVENT("%s: T1 loopback %s %s code sent.\n",
|
||||
fe->name,
|
||||
WAN_TE1_LB_ACTION_DECODE(fe->te_param.lb_tx_cmd),
|
||||
WAN_TE1_LB_MODE_DECODE(fe->te_param.lb_tx_mode));
|
||||
fe->name,
|
||||
WAN_TE1_LB_ACTION_DECODE(fe->te_param.lb_tx_cmd),
|
||||
WAN_TE1_LB_MODE_DECODE(fe->te_param.lb_tx_mode));
|
||||
wan_clear_bit(LINELB_WAITING,(void*)&fe->te_param.critical);
|
||||
fe->te_param.lb_tx_cmd = 0x00;
|
||||
return 0;
|
||||
|
@ -6705,7 +6690,7 @@ static int sdla_te_udp_lbmode(sdla_fe_t *fe, unsigned char* data)
|
|||
sdla_fe_lbmode_t *lbmode = (sdla_fe_lbmode_t*)data;
|
||||
|
||||
if (lbmode->cmd == WAN_FE_LBMODE_CMD_SET){
|
||||
sdla_te_set_lbmode(fe, lbmode->type, lbmode->mode);
|
||||
sdla_te_set_lbmode(fe, lbmode->type, lbmode->mode, ENABLE_ALL_CHANNELS);
|
||||
}else if (lbmode->cmd == WAN_FE_LBMODE_CMD_GET){
|
||||
lbmode->type_map = sdla_te_get_lbmode(fe);
|
||||
}
|
||||
|
@ -7578,16 +7563,16 @@ static int sdla_te_get_snmp_data(sdla_fe_t* fe, void* pdev, void* data)
|
|||
case DSX1LINESTATUS:
|
||||
alarms = fe->fe_alarm;
|
||||
snmp->snmp_val = 0;
|
||||
if (alarms & WAN_TE_BIT_YEL_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_YEL){
|
||||
snmp->snmp_val |= SNMP_DSX1_RCVFARENDLOF;
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_AIS_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_AIS){
|
||||
snmp->snmp_val |= SNMP_DSX1_RCVAIS;
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_RED_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_RED){
|
||||
snmp->snmp_val |= SNMP_DSX1_LOSSOFFRAME;
|
||||
}
|
||||
if (alarms & WAN_TE_BIT_LOS_ALARM){
|
||||
if (alarms & WAN_TE_BIT_ALARM_LOS){
|
||||
snmp->snmp_val |= SNMP_DSX1_LOSSOFSIGNAL;
|
||||
}
|
||||
|
||||
|
@ -7668,21 +7653,21 @@ sdla_te_update_alarm_info(sdla_fe_t* fe, struct seq_file* m, int* stop_cnt)
|
|||
FE_MEDIA_DECODE(fe));
|
||||
PROC_ADD_LINE(m,
|
||||
PROC_STATS_ALARM_FORMAT,
|
||||
"ALOS", WAN_TE_ALOS_ALARM(fe->fe_alarm),
|
||||
"LOS", WAN_TE_LOS_ALARM(fe->fe_alarm));
|
||||
"ALOS", WAN_TE_PRN_ALARM_ALOS(fe->fe_alarm),
|
||||
"LOS", WAN_TE_PRN_ALARM_LOS(fe->fe_alarm));
|
||||
PROC_ADD_LINE(m,
|
||||
PROC_STATS_ALARM_FORMAT,
|
||||
"RED", WAN_TE_RED_ALARM(fe->fe_alarm),
|
||||
"AIS", WAN_TE_AIS_ALARM(fe->fe_alarm));
|
||||
"RED", WAN_TE_PRN_ALARM_RED(fe->fe_alarm),
|
||||
"AIS", WAN_TE_PRN_ALARM_AIS(fe->fe_alarm));
|
||||
if (IS_T1_FEMEDIA(fe)){
|
||||
PROC_ADD_LINE(m,
|
||||
PROC_STATS_ALARM_FORMAT,
|
||||
"YEL", WAN_TE_YEL_ALARM(fe->fe_alarm),
|
||||
"OOF", WAN_TE_OOF_ALARM(fe->fe_alarm));
|
||||
"YEL", WAN_TE_PRN_ALARM_YEL(fe->fe_alarm),
|
||||
"OOF", WAN_TE_PRN_ALARM_OOF(fe->fe_alarm));
|
||||
}else{
|
||||
PROC_ADD_LINE(m,
|
||||
PROC_STATS_ALARM_FORMAT,
|
||||
"OOF", WAN_TE_OOF_ALARM(fe->fe_alarm),
|
||||
"OOF", WAN_TE_PRN_ALARM_OOF(fe->fe_alarm),
|
||||
"", "");
|
||||
}
|
||||
return m->count;
|
||||
|
|
|
@ -1491,7 +1491,7 @@ int wanpipe_tdm_api_ioctl(wanpipe_tdm_api_dev_t *tdm_api, struct ifreq *ifr)
|
|||
|
||||
|
||||
case SIOC_WP_TDM_ENABLE_HWEC:
|
||||
if (card && card->wandev.ec_enable) {
|
||||
if (card && card->wandev.ec_enable && card->wandev.ec_dev) {
|
||||
wan_smp_flag_t smp_flags1;
|
||||
card->hw_iface.hw_lock(card->hw,&smp_flags1);
|
||||
card->wandev.ec_enable(card, 1, tdm_api->tdm_chan);
|
||||
|
@ -1500,7 +1500,7 @@ int wanpipe_tdm_api_ioctl(wanpipe_tdm_api_dev_t *tdm_api, struct ifreq *ifr)
|
|||
break;
|
||||
|
||||
case SIOC_WP_TDM_DISABLE_HWEC:
|
||||
if (card && card->wandev.ec_enable) {
|
||||
if (card && card->wandev.ec_enable && card->wandev.ec_dev) {
|
||||
wan_smp_flag_t smp_flags1;
|
||||
card->hw_iface.hw_lock(card->hw,&smp_flags1);
|
||||
card->wandev.ec_enable(card, 0, tdm_api->tdm_chan);
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
core_marker_format vmlinux name %s format %s
|
||||
ext4_allocate_blocks vmlinux dev %s block %llu flags %u len %u ino %lu logical %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu
|
||||
ext4_allocate_inode vmlinux dev %s ino %lu dir %lu mode %d
|
||||
ext4_da_write_begin vmlinux dev %s ino %lu pos %llu len %u flags %u
|
||||
ext4_da_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
ext4_da_writepage vmlinux dev %s ino %lu page_index %lu
|
||||
ext4_da_writepage_result vmlinux dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d
|
||||
ext4_da_writepages vmlinux dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d
|
||||
ext4_discard_blocks vmlinux dev %s blk %llu count %u
|
||||
ext4_discard_preallocations vmlinux dev %s ino %lu
|
||||
ext4_free_blocks vmlinux dev %s block %llu count %lu metadata %d ino %lu
|
||||
ext4_free_inode vmlinux dev %s ino %lu mode %d uid %lu gid %lu bocks %llu
|
||||
ext4_journalled_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
ext4_journalled_writepage vmlinux dev %s ino %lu page_index %lu
|
||||
ext4_mb_discard_preallocations vmlinux dev %s needed %d
|
||||
ext4_mb_new_group_pa vmlinux dev %s pstart %llu len %u lstart %u
|
||||
ext4_mb_new_inode_pa vmlinux dev %s ino %lu pstart %llu len %u lstart %u
|
||||
ext4_mb_release_group_pa vmlinux dev %s pstart %llu len %d
|
||||
ext4_mb_release_inode_pa vmlinux dev %s ino %lu block %llu count %u
|
||||
ext4_normal_writepage vmlinux dev %s ino %lu page_index %lu
|
||||
ext4_ordered_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
ext4_request_blocks vmlinux dev %s flags %u len %u ino %lu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu
|
||||
ext4_request_inode vmlinux dev %s dir %lu mode %d
|
||||
ext4_sync_file vmlinux dev %s datasync %d ino %ld parent %ld
|
||||
ext4_sync_fs vmlinux dev %s wait %d
|
||||
ext4_write_begin vmlinux dev %s ino %lu pos %llu len %u flags %u
|
||||
ext4_writeback_write_end vmlinux dev %s ino %lu pos %llu len %u copied %u
|
||||
jbd2_checkpoint vmlinux dev %s need_checkpoint %d
|
||||
jbd2_end_commit vmlinux dev %s transaction %d head %d
|
||||
jbd2_start_commit vmlinux dev %s transaction %d
|
|
@ -1,6 +1,6 @@
|
|||
%define WANPIPE_VER wanpipe-modules
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.4.6
|
||||
%define version 3.4.7
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define MODULES_DIR /lib/modules
|
||||
|
@ -51,15 +51,37 @@ echo "Wanpipe Modules located in %{MODULES_DIR}/%{KVERSION}"
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Sep 18 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.6
|
||||
=====================================================================
|
||||
* Wed Nov 05 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.5
|
||||
=====================================================================
|
||||
* Tue Sep 16 2009 Nenad Corbic <ncorbic@sangoma.com> - 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
|
||||
|
@ -78,14 +100,14 @@ echo "Wanpipe Modules located in %{MODULES_DIR}/%{KVERSION}"
|
|||
- Updated for 2.6.30 kernel
|
||||
|
||||
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.4
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.3
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.3
|
||||
=====================================================================
|
||||
|
||||
- New firmware
|
||||
|
@ -151,7 +173,7 @@ echo "Wanpipe Modules located in %{MODULES_DIR}/%{KVERSION}"
|
|||
Added Asterisk Load balancing using extension information.
|
||||
|
||||
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.1
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.1
|
||||
=======================================================================
|
||||
|
||||
- Updated wancfg_zaptel configuration utility
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%define KERNEL_VERSION %{?kern_ver}
|
||||
%define WANPIPE_VER wanpipe-util
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.4.6
|
||||
%define version 3.4.7
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define ETC_DIR /etc
|
||||
|
@ -328,15 +328,37 @@ enable_smg_log;
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Sep 18 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.6
|
||||
=====================================================================
|
||||
* Wed Nov 05 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.5
|
||||
=====================================================================
|
||||
* Tue Sep 16 2009 Nenad Corbic <ncorbic@sangoma.com> - 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
|
||||
|
@ -355,14 +377,14 @@ enable_smg_log;
|
|||
- Updated for 2.6.30 kernel
|
||||
|
||||
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.4
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.3
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.3
|
||||
=====================================================================
|
||||
|
||||
- New firmware
|
||||
|
@ -428,7 +450,7 @@ enable_smg_log;
|
|||
Added Asterisk Load balancing using extension information.
|
||||
|
||||
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.1
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.1
|
||||
=======================================================================
|
||||
|
||||
- Updated wancfg_zaptel configuration utility
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%define KERNEL_VERSION %{?kern_ver}
|
||||
%define WANPIPE_VER wanpipe
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.4.6
|
||||
%define version 3.4.7
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define UTILS_DIR /usr/sbin
|
||||
|
@ -255,15 +255,37 @@ install_init;
|
|||
|
||||
%changelog
|
||||
|
||||
* Tue Sep 18 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.6
|
||||
=====================================================================
|
||||
* Wed Nov 05 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.5
|
||||
=====================================================================
|
||||
* Tue Sep 16 2009 Nenad Corbic <ncorbic@sangoma.com> - 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
|
||||
|
@ -282,14 +304,14 @@ install_init;
|
|||
- Updated for 2.6.30 kernel
|
||||
|
||||
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.4
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - 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 <ncorbic@sangoma.com> - Stable - 3.4.3
|
||||
* Fri Jun 17 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.3
|
||||
=====================================================================
|
||||
|
||||
- New firmware
|
||||
|
@ -355,7 +377,7 @@ install_init;
|
|||
Added Asterisk Load balancing using extension information.
|
||||
|
||||
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Stable - 3.4.1
|
||||
* Fri Apr 30 2009 Nenad Corbic <ncorbic@sangoma.com> - Feature Frozen - 3.4.1
|
||||
=======================================================================
|
||||
|
||||
- Updated wancfg_zaptel configuration utility
|
||||
|
|
|
@ -2195,7 +2195,7 @@ init_global_params()
|
|||
{
|
||||
|
||||
if [ $OSYSTEM = "Linux" ]; then
|
||||
ROUTER_VERSION=3.4.6
|
||||
ROUTER_VERSION=3.4.7
|
||||
IFCONFIG_LIST=ifconfig
|
||||
MODULE_STAT=lsmod
|
||||
WAN_DRIVERS="wanpipe"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#!/bin/sh
|
||||
|
||||
make CFLAGS=" -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dlinux -D__KERNEL__ -I/lib/modules/2.6.18-92.1.22.el5/build/include -DMODULE -DAF_WANPIPE_2612_FORCE_UPDATE -DWANPIPE_MOD_266_FORCE_UPDATE -m32 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -Os -pipe -msoft-float -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -mtune=generic -mregparm=3 -ffreestanding -I/lib/modules/2.6.18-92.1.22.el5/build/include/asm-i386/mach-generic -I/lib/modules/2.6.18-92.1.22.el5/build/include/asm-i386/mach-default -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D__KERNEL__ -Iinclude -include include/linux/autoconf.h " PROTOCOL_DEFINES="-DCONFIG_PRODUCT_WANPIPE_BASE -DCONFIG_PRODUCT_WANPIPE_XMTP2 -DAFT_XMTP2_API_SUPPORT -I/root/3.4/wanpipe/patches/kdrivers/src/xmtp2km -DCONFIG_PRODUCT_WANPIPE_AFT -DCONFIG_PRODUCT_WANPIPE_AFT_CORE -DCONFIG_PRODUCT_WANPIPE_AFT_TE1 -DCONFIG_PRODUCT_WANPIPE_AFT_56K -DCONFIG_PRODUCT_WANPIPE_AFT_RM -DCONFIG_PRODUCT_WANPIPE_CODEC_SLINEAR_LAW -DCONFIG_PRODUCT_WANPIPE_AFT_BRI -DCONFIG_PRODUCT_WANPIPE_AFT_SERIAL -DCONFIG_PRODUCT_WANPIPE_AFT_A600 -DWANPIPE_USE_I_PRIVATE -DCONFIG_WANPIPE_HWEC "
|
||||
make CFLAGS=" -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dlinux -D__KERNEL__ -I/lib/modules/2.6.18-164.el5/build/include -DMODULE -DAF_WANPIPE_2612_FORCE_UPDATE -DWANPIPE_MOD_266_FORCE_UPDATE -m32 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -fwrapv -Os -pipe -msoft-float -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -mtune=generic -mregparm=3 -ffreestanding -I/lib/modules/2.6.18-164.el5/build/include/asm-i386/mach-generic -I/lib/modules/2.6.18-164.el5/build/include/asm-i386/mach-default -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -I/usr/src/dahdi" PROTOCOL_DEFINES="-DCONFIG_PRODUCT_WANPIPE_BASE -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN_ZAPTEL -DDAHDI_ISSUES -DCONFIG_PRODUCT_WANPIPE_FR -DCONFIG_PRODUCT_WANPIPE_CHDLC -DCONFIG_PRODUCT_WANPIPE_PPP -DCONFIG_PRODUCT_WANPIPE_X25 -DCONFIG_PRODUCT_WANPIPE_ADSL -DCONFIG_PRODUCT_WANPIPE_LIP_ATM -DCONFIG_PRODUCT_WANPIPE_ATM -DCONFIG_PRODUCT_WANPIPE_MULTFR -DCONFIG_PRODUCT_WANPIPE_MULTPROT -DCONFIG_PRODUCT_WANPIPE_AFT -DCONFIG_PRODUCT_WANPIPE_AFT_CORE -DCONFIG_PRODUCT_WANPIPE_AFT_TE1 -DCONFIG_PRODUCT_WANPIPE_AFT_56K -DCONFIG_PRODUCT_WANPIPE_AFT_RM -DCONFIG_PRODUCT_WANPIPE_CODEC_SLINEAR_LAW -DCONFIG_PRODUCT_WANPIPE_AFT_BRI -DCONFIG_PRODUCT_WANPIPE_AFT_SERIAL -DCONFIG_PRODUCT_WANPIPE_AFT_A600 -DCONFIG_PRODUCT_WANPIPE_AFT_TE3 -DWANPIPE_USE_I_PRIVATE -DCONFIG_WANPIPE_HWEC "
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 35
|
||||
/svn/sangoma_mgd/!svn/ver/204/trunk
|
||||
/svn/sangoma_mgd/!svn/ver/232/trunk
|
||||
END
|
||||
sigboost.h
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 46
|
||||
/svn/sangoma_mgd/!svn/ver/204/trunk/sigboost.h
|
||||
/svn/sangoma_mgd/!svn/ver/230/trunk/sigboost.h
|
||||
END
|
||||
switch_buffer.h
|
||||
K 25
|
||||
|
@ -19,7 +19,7 @@ sangoma_mgd.conf.sample
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 59
|
||||
/svn/sangoma_mgd/!svn/ver/157/trunk/sangoma_mgd.conf.sample
|
||||
/svn/sangoma_mgd/!svn/ver/221/trunk/sangoma_mgd.conf.sample
|
||||
END
|
||||
sound.raw
|
||||
K 25
|
||||
|
@ -31,7 +31,7 @@ safe_sangoma
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 48
|
||||
/svn/sangoma_mgd/!svn/ver/174/trunk/safe_sangoma
|
||||
/svn/sangoma_mgd/!svn/ver/232/trunk/safe_sangoma
|
||||
END
|
||||
callgettest.sh
|
||||
K 25
|
||||
|
@ -55,7 +55,7 @@ call_signal.c
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 49
|
||||
/svn/sangoma_mgd/!svn/ver/202/trunk/call_signal.c
|
||||
/svn/sangoma_mgd/!svn/ver/222/trunk/call_signal.c
|
||||
END
|
||||
re-sync.sh
|
||||
K 25
|
||||
|
@ -73,7 +73,7 @@ sangoma_mgd.c
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 49
|
||||
/svn/sangoma_mgd/!svn/ver/204/trunk/sangoma_mgd.c
|
||||
/svn/sangoma_mgd/!svn/ver/222/trunk/sangoma_mgd.c
|
||||
END
|
||||
woomera.conf
|
||||
K 25
|
||||
|
@ -93,6 +93,12 @@ svn:wc:ra_dav:version-url
|
|||
V 42
|
||||
/svn/sangoma_mgd/!svn/ver/133/trunk/list.h
|
||||
END
|
||||
sangoma_mgd_ip_bridge.c
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 59
|
||||
/svn/sangoma_mgd/!svn/ver/228/trunk/sangoma_mgd_ip_bridge.c
|
||||
END
|
||||
Changelog.sangoma_mgd
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
|
@ -103,7 +109,7 @@ sangoma_mgd.h
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 49
|
||||
/svn/sangoma_mgd/!svn/ver/204/trunk/sangoma_mgd.h
|
||||
/svn/sangoma_mgd/!svn/ver/222/trunk/sangoma_mgd.h
|
||||
END
|
||||
q931_cause.h
|
||||
K 25
|
||||
|
@ -121,7 +127,7 @@ install
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 43
|
||||
/svn/sangoma_mgd/!svn/ver/186/trunk/install
|
||||
/svn/sangoma_mgd/!svn/ver/222/trunk/install
|
||||
END
|
||||
sangoma_mgd_memdbg.c
|
||||
K 25
|
||||
|
@ -139,7 +145,7 @@ smg_ctrl
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 44
|
||||
/svn/sangoma_mgd/!svn/ver/198/trunk/smg_ctrl
|
||||
/svn/sangoma_mgd/!svn/ver/232/trunk/smg_ctrl
|
||||
END
|
||||
switch_buffer.c
|
||||
K 25
|
||||
|
@ -151,7 +157,7 @@ Makefile
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 44
|
||||
/svn/sangoma_mgd/!svn/ver/203/trunk/Makefile
|
||||
/svn/sangoma_mgd/!svn/ver/232/trunk/Makefile
|
||||
END
|
||||
sangoma_mgd_memdbg.h
|
||||
K 25
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
||||
|
||||
2009-09-18T20:42:35.794839Z
|
||||
204
|
||||
2009-11-21T18:46:33.894854Z
|
||||
232
|
||||
ncorbic
|
||||
|
||||
|
||||
|
@ -35,11 +35,11 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-18T19:50:52.000000Z
|
||||
2f5277bc3255aa10d68b1df0a63b2de6
|
||||
2009-09-18T20:42:35.794839Z
|
||||
204
|
||||
ncorbic
|
||||
2009-11-24T17:29:10.000000Z
|
||||
d98d37fe45e4f153c4999487391b302b
|
||||
2009-11-20T22:07:01.823461Z
|
||||
230
|
||||
davidy
|
||||
|
||||
app
|
||||
dir
|
||||
|
@ -62,10 +62,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-04-30T20:22:39.000000Z
|
||||
93628c98a30a5b4897dd901064d2e937
|
||||
2009-03-28T00:40:33.375650Z
|
||||
157
|
||||
2009-11-12T18:45:27.000000Z
|
||||
c4decb82150b5bdc447c662bf1d29eb9
|
||||
2009-10-31T16:39:27.344728Z
|
||||
221
|
||||
ncorbic
|
||||
|
||||
conf_bri
|
||||
|
@ -77,10 +77,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-05-13T19:31:42.000000Z
|
||||
1c73ae51836adae50fc242f5a117bf1c
|
||||
2009-05-13T20:38:52.699491Z
|
||||
174
|
||||
2009-11-24T17:29:10.000000Z
|
||||
3d813e0a45e749dd5eaa956f1c4150ea
|
||||
2009-11-21T18:46:33.894854Z
|
||||
232
|
||||
ncorbic
|
||||
has-props
|
||||
|
||||
|
@ -112,10 +112,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-17T20:37:35.000000Z
|
||||
94b43fda8af2fc13879f7071793a12dc
|
||||
2009-09-17T21:31:23.869639Z
|
||||
202
|
||||
2009-11-12T18:45:27.000000Z
|
||||
9aeab0754b523946644b3c27a09b3403
|
||||
2009-11-11T21:54:38.630069Z
|
||||
222
|
||||
ncorbic
|
||||
|
||||
re-sync.sh
|
||||
|
@ -143,6 +143,18 @@ file
|
|||
105
|
||||
ncorbic
|
||||
|
||||
sangoma_mgd_ip_bridge.c
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-11-18T22:36:48.000000Z
|
||||
056608fa90a921a6753c8c49f05678f2
|
||||
2009-11-19T00:43:00.203201Z
|
||||
228
|
||||
ncorbic
|
||||
|
||||
Changelog.sangoma_mgd
|
||||
file
|
||||
|
||||
|
@ -197,18 +209,6 @@ file
|
|||
189
|
||||
davidy
|
||||
|
||||
Makefile
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-09-17T20:37:35.000000Z
|
||||
756ba033691b157a7d8af99d59af9346
|
||||
2009-09-17T21:48:55.845572Z
|
||||
203
|
||||
ncorbic
|
||||
|
||||
sangoma_mgd_memdbg.h
|
||||
file
|
||||
|
||||
|
@ -221,6 +221,18 @@ file
|
|||
62
|
||||
ncorbic
|
||||
|
||||
Makefile
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-11-24T17:29:10.000000Z
|
||||
69042fbb71f5c3d7057721ff7bec81be
|
||||
2009-11-21T18:46:33.894854Z
|
||||
232
|
||||
ncorbic
|
||||
|
||||
sound.raw
|
||||
file
|
||||
|
||||
|
@ -271,18 +283,6 @@ e37c1c63f8594ae025098e6510327ee0
|
|||
189
|
||||
davidy
|
||||
|
||||
sangoma_mgd.c
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-09-18T19:50:52.000000Z
|
||||
0df244b0c94f5fadfeb4a6c5110f7f6a
|
||||
2009-09-18T20:42:35.794839Z
|
||||
204
|
||||
ncorbic
|
||||
|
||||
woomera.conf
|
||||
file
|
||||
|
||||
|
@ -295,6 +295,18 @@ file
|
|||
1
|
||||
root
|
||||
|
||||
sangoma_mgd.c
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-10-29T20:55:16.000000Z
|
||||
3ba30b11311bbae04f80014854510bf4
|
||||
2009-11-11T21:54:38.630069Z
|
||||
222
|
||||
ncorbic
|
||||
|
||||
list.h
|
||||
file
|
||||
|
||||
|
@ -313,10 +325,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-18T19:50:52.000000Z
|
||||
10830f87ebeabb8913c8a46405750f03
|
||||
2009-09-18T20:42:35.794839Z
|
||||
204
|
||||
2009-11-12T18:45:27.000000Z
|
||||
b23164289d388193d834e3b66470e2f2
|
||||
2009-11-11T21:54:38.630069Z
|
||||
222
|
||||
ncorbic
|
||||
|
||||
q931_cause.h
|
||||
|
@ -337,10 +349,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-07-17T14:59:38.000000Z
|
||||
3c105b0995d2039c5cc25b4fe22c2b46
|
||||
2009-07-16T21:35:39.883599Z
|
||||
186
|
||||
2009-11-12T18:45:27.000000Z
|
||||
2dd2f13d45e11b6b85749d9c7fee4cef
|
||||
2009-11-11T21:54:38.630069Z
|
||||
222
|
||||
ncorbic
|
||||
has-props
|
||||
|
||||
|
@ -350,10 +362,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-17T20:37:35.000000Z
|
||||
3c25c0a7952abb4488eb6dc3dc356700
|
||||
2009-09-01T18:37:52.119878Z
|
||||
198
|
||||
2009-11-24T17:29:10.000000Z
|
||||
d2d1437dda0c6a3d0e2ddaca840d8708
|
||||
2009-11-21T18:46:33.894854Z
|
||||
232
|
||||
ncorbic
|
||||
has-props
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@ ifndef DESTDIR
|
|||
endif
|
||||
endif
|
||||
|
||||
SAFE_D=/etc/wanpipe/safe_sangoma.d
|
||||
SMGCTRL_D=/etc/wanpipe/smg_ctrl.d
|
||||
|
||||
INCLUDES = -I ../../ssmg/libsangoma.trunk -I. -I ../../patches/kdrivers/include -I ../../patches/kdrivers/wanec/oct6100_api/include -I ../../patches/kdrivers/wanec -I/usr/local/include -I../../patches/kdrivers/include -I/usr/include/wanpipe -Ilib/libteletone/src
|
||||
|
||||
CFLAGS = -D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -O6
|
||||
|
@ -91,12 +94,15 @@ sangoma_mgd_memdbg.o: sangoma_mgd_memdbg.c sangoma_mgd_memdbg.h
|
|||
sangoma_mgd_logger.o: sangoma_mgd_logger.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sangoma_mgd_logger.o sangoma_mgd_logger.c
|
||||
|
||||
sangoma_mgd_ip_bridge.o: sangoma_mgd_ip_bridge.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sangoma_mgd_ip_bridge.o sangoma_mgd_ip_bridge.c
|
||||
|
||||
sangoma_mgd.o: sangoma_mgd.c sangoma_mgd.h sigboost.h
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sangoma_mgd.o sangoma_mgd.c
|
||||
|
||||
sangoma_mgd: sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o call_signal.o switch_buffer.o sigboost.h sangoma_mgd_memdbg.h
|
||||
sangoma_mgd: sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o sangoma_mgd_ip_bridge.o call_signal.o switch_buffer.o sigboost.h sangoma_mgd_memdbg.h
|
||||
rm -fr core*
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -o sangoma_mgd sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o switch_buffer.o call_signal.o $(LDFLAGS)
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -o sangoma_mgd sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o sangoma_mgd_ip_bridge.o switch_buffer.o call_signal.o $(LDFLAGS)
|
||||
|
||||
|
||||
|
||||
|
@ -117,8 +123,17 @@ install_smg: old_cleanup
|
|||
fi
|
||||
|
||||
install -D -m 755 ./safe_sangoma $(DESTDIR)/usr/sbin/safe_sangoma
|
||||
install -D -m 755 ./rc/safe_sangoma.rc $(DESTDIR)/etc/wanpipe/safe_sangoma.rc
|
||||
install -D -m 755 ./smg_ctrl $(DESTDIR)/usr/sbin/smg_ctrl
|
||||
|
||||
@if [ ! -d ${SAFE_D} ]; then \
|
||||
mkdir -p ${SAFE_D}; \
|
||||
fi
|
||||
@if [ ! -d ${SMGCTRL_D} ]; then \
|
||||
mkdir -p ${SMGCTRL_D}; \
|
||||
fi
|
||||
|
||||
|
||||
ifeq "${PRI}" "YES"
|
||||
@echo "PRI control scripts installed"
|
||||
@if [ ! -e $(DESTDIR)/etc/sangoma_mgd.conf ]; then \
|
||||
|
|
|
@ -120,23 +120,24 @@ static int smg_event_dbg=SMG_LOG_BOOST;
|
|||
static void clog_print_event_call(call_signal_connection_t *mcon,call_signal_event_t *event, int priority, int dir)
|
||||
{
|
||||
clog_printf((event->event_id==SIGBOOST_EVENT_HEARTBEAT)?SMG_LOG_DEBUG_CALL:smg_event_dbg, mcon->log,
|
||||
"%s EVENT (%s): %s:(%X) [w%dg%d] CSid=%i Seq=%i Cn=[%s] Cd=[%s] Ci=[%s]\n",
|
||||
"%s EVENT (%s): %s:(%X) [s%dc%d] Tg=%i CSid=%i Seq=%i Cn=[%s] Cd=[%s] Ci=[%s]\n",
|
||||
dir ? "TX":"RX",
|
||||
priority ? "P":"N",
|
||||
call_signal_event_id_name(event->event_id),
|
||||
event->event_id,
|
||||
event->span+1,
|
||||
event->chan+1,
|
||||
event->trunk_group,
|
||||
event->call_setup_id,
|
||||
event->fseqno,
|
||||
strlen(event->calling_name)?event->calling_name:"N/A",
|
||||
strlen(event->calling_name)?event->calling_name:"N/A",
|
||||
(event->called_number_digits_count ? (char *) event->called_number_digits : "N/A"),
|
||||
(event->calling_number_digits_count ? (char *) event->calling_number_digits : "N/A"));
|
||||
}
|
||||
static void clog_print_event_short(call_signal_connection_t *mcon,short_signal_event_t *event, int priority, int dir)
|
||||
{
|
||||
clog_printf((event->event_id==SIGBOOST_EVENT_HEARTBEAT)?SMG_LOG_DEBUG_CALL:smg_event_dbg, mcon->log,
|
||||
"%s EVENT (%s): %s:(%X) [w%dg%d] Rc=%i CSid=%i Seq=%i \n",
|
||||
"%s EVENT (%s): %s:(%X) [s%dc%d] Rc=%i CSid=%i Seq=%i \n",
|
||||
dir ? "TX":"RX",
|
||||
priority ? "P":"N",
|
||||
call_signal_event_id_name(event->event_id),
|
||||
|
|
|
@ -49,7 +49,7 @@ cfgdir="/etc/asterisk"
|
|||
mysyslog=" "
|
||||
smg_installed=0
|
||||
chan_woomera_installed=0
|
||||
|
||||
no_woomera="false"
|
||||
|
||||
|
||||
while [ ! -z $1 ]
|
||||
|
@ -62,6 +62,9 @@ do
|
|||
noss7="flase"
|
||||
elif [ $1 = '-bri' ]; then
|
||||
noss7="true"
|
||||
elif [ $1 = '-no_woomera' ]; then
|
||||
noss7="true"
|
||||
no_woomera="true"
|
||||
elif [ $1 = '-pri' ]; then
|
||||
noss7="true"
|
||||
pri="true"
|
||||
|
@ -242,7 +245,7 @@ if [ ! -e /usr/include/netinet/sctp.h ] && [ ! -e /usr/include/sctp.h ]; then
|
|||
echo
|
||||
echo "Error: lksctp-tools-devel package missing"
|
||||
echo "Please install sctp using a package manager"
|
||||
echo "eg: yum install ksctp-tools-devel"
|
||||
echo "eg: yum install lksctp-tools-devel"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
@ -325,42 +328,44 @@ else
|
|||
smg_installed=1;
|
||||
fi
|
||||
|
||||
if [ -d chan_woomera.trunk ]; then
|
||||
if [ "$no_woomera" == "false" ]; then
|
||||
if [ -d chan_woomera.trunk ]; then
|
||||
|
||||
cd chan_woomera.trunk
|
||||
cd chan_woomera.trunk
|
||||
|
||||
echo "Compiling Woomera Channel ..."
|
||||
echo "Compiling Woomera Channel ..."
|
||||
|
||||
if [ ! -e $pbxdir ]; then
|
||||
echo
|
||||
echo "Error: $pbxdir directory does not exist!"
|
||||
echo " Please provide the path to Asterik or CallWeaver source."
|
||||
echo " Then re-run eg: ./install -pbxdir /usr/src/asterisk "
|
||||
echo
|
||||
getyn "Would you like to continue installation?"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
if [ ! -e $pbxdir ]; then
|
||||
echo
|
||||
echo "Error: $pbxdir directory does not exist!"
|
||||
echo " Please provide the path to Asterik or CallWeaver source."
|
||||
echo " Then re-run eg: ./install -pbxdir /usr/src/asterisk "
|
||||
echo
|
||||
getyn "Would you like to continue installation?"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
else
|
||||
eval "make clean 2> /dev/null > /dev/null"
|
||||
eval "make PBXDIR=$pbxdir"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
make INSTALLPREFIX=$rootdir install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Error: Failed to compile chan_woomera into PBX source!"
|
||||
echo
|
||||
exit 1;
|
||||
fi
|
||||
echo "Ok."
|
||||
chan_woomera_installed=1;
|
||||
fi
|
||||
|
||||
else
|
||||
eval "make clean 2> /dev/null > /dev/null"
|
||||
eval "make PBXDIR=$pbxdir"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
make INSTALLPREFIX=$rootdir install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Error: Failed to compile chan_woomera into PBX source!"
|
||||
echo
|
||||
exit 1;
|
||||
fi
|
||||
echo "Ok."
|
||||
chan_woomera_installed=1;
|
||||
echo "Warning: chan_woomera directory does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Warning: chan_woomera directory does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $smg_installed -eq 1 ]; then
|
||||
|
@ -389,6 +394,10 @@ if [ $chan_woomera_installed -eq 1 ]; then
|
|||
echo "--> Start: start $pbxd (part of $pbxd)"
|
||||
echo
|
||||
echo "---------------------------------"
|
||||
elif [ $no_woomera = "true" ];then
|
||||
echo
|
||||
echo " You chose not to install Chan Woomera"
|
||||
echo
|
||||
else
|
||||
echo
|
||||
echo " Chan Woomera Installatin Failed"
|
||||
|
|
|
@ -7,31 +7,46 @@ shift
|
|||
APPARGS="$*" # Grab any args passed to safe_sangoma
|
||||
TTY= # TTY (if you want one) for APP to run on
|
||||
CONSOLE=no # Whether or not you want a console
|
||||
#NOTIFY=user@email.com # Who to notify about crashes
|
||||
#EXEC=/path/to/somescript # Run this command if Asterisk crashes
|
||||
MACHINE=`hostname` # To specify which machine has crashed when getting the mail
|
||||
DUMPDROP=/tmp
|
||||
SLEEPSECS=2
|
||||
BINDIR=/usr/sbin
|
||||
BINDIR_SS7="/usr/local/ss7box"
|
||||
PIDFILE=/var/run/$APP.pid
|
||||
CORENAME=$(cat /proc/sys/kernel/core_pattern)
|
||||
VARDIR=/var/log
|
||||
PROD="safe_sangoma"
|
||||
|
||||
WAN_HOME=/etc/wanpipe
|
||||
META_SMG_CONF=$WAN_HOME/safe_sangoma.rc
|
||||
|
||||
# Read meta-configuration file.
|
||||
# metconf file should define NOTIFY or EXEC path script
|
||||
# to run
|
||||
if [ -f $META_SMG_CONF ]
|
||||
then . $META_SMG_CONF
|
||||
fi
|
||||
|
||||
if [ -z $APP ]; then
|
||||
echo
|
||||
echo "Error: APP argument not specified"
|
||||
logit "Error: APP argument not specified"
|
||||
echo
|
||||
echo "Usage: safe_sangoma <app_name> <app arguments>"
|
||||
logit "Usage: safe_sangoma <app_name> <app arguments>"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e $BINDIR_SS7/$APP ]; then
|
||||
BINDIR=$BINDIR_SS7
|
||||
fi
|
||||
|
||||
if [ ! -e $BINDIR/$APP ]; then
|
||||
echo
|
||||
echo "Error: APP not found: $BINDIR/$APP"
|
||||
logit "Error: APP not found: $BINDIR/$APP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# run APP with this priority
|
||||
PRIORITY=0
|
||||
|
||||
|
@ -46,12 +61,12 @@ MAXFILES=32768
|
|||
# starting safe_sangoma when APP is running is very bad.
|
||||
PID=`pidof $APP`
|
||||
if [ ! -z $PID ]; then
|
||||
echo "Error: $APP already running. $0 will exit now."
|
||||
logit "Error: $APP already running. $0 will exit now."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $PIDFILE ]; then
|
||||
echo "Error: $APP pid file $PIDFILE exists!. $0 will exit now."
|
||||
logit "Error: $APP pid file $PIDFILE exists!. $0 will exit now."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -61,8 +76,8 @@ fi
|
|||
# if we're not root, fall back to standard everything.
|
||||
if [ `id -u` != 0 ]
|
||||
then
|
||||
echo "Oops. I'm not root. Falling back to standard prio and file max." >&2
|
||||
echo "This is NOT suitable for large systems." >&2
|
||||
logit "Oops. I'm not root. Falling back to standard prio and file max." >&2
|
||||
logit "This is NOT suitable for large systems." >&2
|
||||
PRIORITY=0
|
||||
else
|
||||
if `echo $OSTYPE | grep linux 2>&1 > /dev/null `
|
||||
|
@ -124,7 +139,7 @@ ulimit -c unlimited
|
|||
#fi
|
||||
|
||||
if [ ! -w ${DUMPDROP} ]; then
|
||||
echo "Cannot write to ${DUMPDROP}" >&2
|
||||
logit "Cannot write to ${DUMPDROP}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -136,15 +151,24 @@ trap '' PIPE
|
|||
#
|
||||
# Run scripts to set any environment variables or do any other system-specific setup needed
|
||||
#
|
||||
|
||||
if [ -d /etc/wanpipe/safe_startup.d ]; then
|
||||
for script in /etc/wanpipe/safe_startup.d/*.sh; do
|
||||
if [ -x ${script} ]; then
|
||||
source ${script}
|
||||
if [ -x $script ]; then
|
||||
logit "Executing startup script: $script"
|
||||
source $script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
logit()
|
||||
{
|
||||
local data="$1"
|
||||
|
||||
echo "$PROD: $data"
|
||||
logger "$PROD: $data"
|
||||
}
|
||||
|
||||
run_sangoma()
|
||||
{
|
||||
while :; do
|
||||
|
@ -153,26 +177,38 @@ run_sangoma()
|
|||
nice -n $PRIORITY ${BINDIR}/$APP ${APPARGS}
|
||||
|
||||
EXITSTATUS=$?
|
||||
echo "$APP ended with exit status $EXITSTATUS"
|
||||
logit "$APP ended with exit status $EXITSTATUS"
|
||||
if [ "$EXITSTATUS" = "0" ]; then
|
||||
# Properly shutdown....
|
||||
echo "$APP shutdown normally."
|
||||
logit "$APP shutdown normally."
|
||||
exit 0
|
||||
elif [ $EXITSTATUS -gt 128 ]; then
|
||||
let EXITSIGNAL=EXITSTATUS-128
|
||||
echo "$APP exited on signal $EXITSIGNAL."
|
||||
logit "$APP exited on signal $EXITSIGNAL."
|
||||
else
|
||||
echo "$APP died with code $EXITSTATUS."
|
||||
logit "$APP died with code $EXITSTATUS."
|
||||
fi
|
||||
|
||||
if [ "$NOTIFY" != "" ]; then
|
||||
echo "$APP on $MACHINE exited on signal $EXITSIGNAL. Might want to take a peek." | \
|
||||
mail -s "$APP Died" $NOTIFY
|
||||
logfile="/etc/wanpipe/safe_sangoma_crash_"$APP"_"$$".log"
|
||||
echo > $logfile
|
||||
date >> $logfile
|
||||
echo >> $logfile
|
||||
echo "$APP on $MACHINE exited on signal $EXITSIGNAL. " >> $logfile
|
||||
echo >> $logfile
|
||||
echo "/var/log/messages" >> $logfile
|
||||
echo "====================" >> $logfile
|
||||
tail -n 50 /var/log/messages >> $logfile
|
||||
echo "====================" >> $logfile
|
||||
echo >> $logfile
|
||||
cat $logfile | \
|
||||
mail -s "$APP on $MACHINE Died" $NOTIFY
|
||||
ret=$?
|
||||
logit "Email sent to $NOTIFY result $ret"
|
||||
fi
|
||||
if [ "$EXEC" != "" ]; then
|
||||
$EXEC
|
||||
fi
|
||||
|
||||
PID=`cat ${PIDFILE}`
|
||||
if [ -f /tmp/$CORENAME.${PID} ]; then
|
||||
mv /tmp/$CORENAME.${PID} ${DUMPDROP}/core.$APP.`hostname`-`date -Iseconds` &
|
||||
|
@ -180,7 +216,7 @@ run_sangoma()
|
|||
mv /tmp/$CORENAME ${DUMPDROP}/core.$APP.`hostname`-`date -Iseconds` &
|
||||
fi
|
||||
|
||||
echo "Automatically restarting $APP."
|
||||
logit "Automatically restarting $APP."
|
||||
sleep $SLEEPSECS
|
||||
\rm -f ${PIDFILE}
|
||||
done
|
||||
|
|
|
@ -9,6 +9,21 @@
|
|||
*
|
||||
* =============================================
|
||||
*
|
||||
* v1.59 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Changed w1g1 to s1c1
|
||||
*
|
||||
* v1.58 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Added bridge tdm to ip functionality
|
||||
*
|
||||
* v1.57 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Support for woomera multiple profiles
|
||||
*
|
||||
* v1.56 David Yat Sin <dyatsin@sangoma.com>
|
||||
* Changed BRI to run with HWEC in non-persist mode
|
||||
*
|
||||
* v1.55 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Updated the base media port to 10000 and max media ports to 5000
|
||||
*
|
||||
* v1.54 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Bug added in 1.51 release causing call on channel 31 to fail.
|
||||
*
|
||||
|
@ -299,14 +314,24 @@ static char ps_progname[]="sangoma_mgd";
|
|||
|
||||
static struct woomera_interface woomera_dead_dev;
|
||||
|
||||
|
||||
/* For 3.4. release always set to 1 */
|
||||
#ifdef BRI_PROT
|
||||
static unsigned char tdmv_hwec_persist = 0;
|
||||
#else
|
||||
static unsigned char tdmv_hwec_persist = 1;
|
||||
#endif
|
||||
struct woomera_server server;
|
||||
|
||||
struct smg_tdm_ip_bridge g_smg_ip_bridge_idx[MAX_SMG_BRIDGE];
|
||||
pthread_mutex_t g_smg_ip_bridge_lock;
|
||||
|
||||
#if 0
|
||||
#define DOTRACE
|
||||
#endif
|
||||
|
||||
|
||||
#define SMG_VERSION "v1.54"
|
||||
#define SMG_VERSION "v1.59"
|
||||
|
||||
/* enable early media */
|
||||
#if 1
|
||||
|
@ -356,7 +381,7 @@ static int drop_seq=0;
|
|||
|
||||
const char WELCOME_TEXT[] =
|
||||
"================================================================================\n"
|
||||
"Sangoma Media Gateway Daemon v1.54 \n"
|
||||
"Sangoma Media Gateway Daemon v1.59 \n"
|
||||
"\n"
|
||||
"TDM Signal Media Gateway for Sangoma/Wanpipe Cards\n"
|
||||
"Copyright 2005, 2006, 2007 \n"
|
||||
|
@ -485,8 +510,14 @@ isup_exec_cmd_retry:
|
|||
static int get_span_chan_from_interface(char* interface, int *span_ptr, int *chan_ptr)
|
||||
{
|
||||
int span, chan;
|
||||
int err;
|
||||
|
||||
if (sscanf(interface, "w%dg%d", &span, &chan) == 2) {
|
||||
err=sscanf(interface, "s%dc%d", &span, &chan);
|
||||
if (err!=2) {
|
||||
err=sscanf(interface, "w%dg%d", &span, &chan);
|
||||
}
|
||||
|
||||
if (err==2) {
|
||||
if (smg_validate_span_chan(span,chan) != 0) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log,
|
||||
"WOOMERA Warning invalid span chan in interface %s\n",
|
||||
|
@ -975,7 +1006,7 @@ waitfor_socket_tryagain:
|
|||
}
|
||||
|
||||
|
||||
static int waitfor_2sockets(int fda, int fdb, char *a, char *b, int timeout)
|
||||
int waitfor_2sockets(int fda, int fdb, char *a, char *b, int timeout)
|
||||
{
|
||||
struct pollfd pfds[2];
|
||||
int res = 0;
|
||||
|
@ -999,8 +1030,6 @@ waitfor_2sockets_tryagain:
|
|||
pfds[0].events = POLLIN | errflags;
|
||||
pfds[1].events = POLLIN | errflags;
|
||||
|
||||
|
||||
|
||||
res = poll(pfds, 2, timeout);
|
||||
|
||||
if (res > 0) {
|
||||
|
@ -1073,7 +1102,7 @@ static struct media_session *media_session_new(struct woomera_interface *woomera
|
|||
/* Setup artificial DTMF stuff */
|
||||
memset(&ms->tone_session, 0, sizeof(ms->tone_session));
|
||||
if (teletone_init_session(&ms->tone_session, 0, NULL, NULL)) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Failed to initialize TONE [w%ig%i]!\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Failed to initialize TONE [s%ic%i]!\n",
|
||||
span+1,chan+1);
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1113,7 @@ static struct media_session *media_session_new(struct woomera_interface *woomera
|
|||
teletone_dtmf_detect_init (&ms->dtmf_detect, SMG_DTMF_RATE);
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Memory Alloc Failed [w%ig%i]!\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Memory Alloc Failed [s%ic%i]!\n",
|
||||
span+1,chan+1);
|
||||
}
|
||||
|
||||
|
@ -1300,7 +1329,7 @@ retry_loop:
|
|||
usleep(500000);
|
||||
goto retry_loop;
|
||||
}
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE MEDIA Socket Error (%s) if=[%s] [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE MEDIA Socket Error (%s) if=[%s] [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
|
||||
} else {
|
||||
|
@ -1337,7 +1366,7 @@ retry_loop:
|
|||
}
|
||||
|
||||
if (server.loop_trace) {
|
||||
sprintf(filename,"/smg/w%ig%i-loop.trace",woomera->span+1,woomera->chan+1);
|
||||
sprintf(filename,"/smg/s%ic%i-loop.trace",woomera->span+1,woomera->chan+1);
|
||||
unlink(filename);
|
||||
filed = safe_fopen(filename, "w");
|
||||
}
|
||||
|
@ -1451,7 +1480,9 @@ static void *media_thread_run(void *obj)
|
|||
wanpipe_tdm_api_t tdm_api;
|
||||
FILE *tx_fd=NULL;
|
||||
int sock_timeout=200;
|
||||
int hwec_reenable=0;
|
||||
|
||||
int hwec_enabled=0, hwec_reenable=0;
|
||||
|
||||
int open_cnt = 0;
|
||||
|
||||
open_cnt=0;
|
||||
|
@ -1523,13 +1554,13 @@ media_retry:
|
|||
if (!woomera_test_flag(woomera, WFLAG_MEDIA_END)) {
|
||||
media_retry_cnt++;
|
||||
if (media_retry_cnt < 5) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Retry [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Retry [s%ic%i]\n",
|
||||
woomera->span+1, woomera->chan+1);
|
||||
usleep(100000);
|
||||
goto media_retry;
|
||||
}
|
||||
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Error (%s) if=[%s] [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Error (%s) if=[%s] [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
|
||||
/* Switch Congestion */
|
||||
|
@ -1571,15 +1602,15 @@ media_retry:
|
|||
# ifdef LIBSANGOMA_GET_HWDTMF
|
||||
ms->hw_dtmf=sangoma_tdm_get_hw_dtmf(ms->sangoma_sock, &tdm_api);
|
||||
if (ms->hw_dtmf) {
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Supported [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Supported [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
} else {
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
}
|
||||
#else
|
||||
ms->hw_dtmf=0;
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
# warning "libsangoma missing hwdtmf feature: not up to date!"
|
||||
|
||||
|
@ -1592,16 +1623,30 @@ media_retry:
|
|||
ms->oob_disable = 1;
|
||||
}
|
||||
#endif
|
||||
if (!bearer_cap_is_audio(woomera->bearer_cap)) {
|
||||
int err;
|
||||
err=sangoma_tdm_disable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err == 0) {
|
||||
hwec_reenable=1;
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Disabling hwec Ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Disabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
|
||||
if (!tdmv_hwec_persist) {
|
||||
// BRI cards start with HWEC in bypass disable state
|
||||
if (bearer_cap_is_audio(woomera->bearer_cap)) {
|
||||
int err;
|
||||
err=sangoma_tdm_enable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err == 0) {
|
||||
hwec_enabled=1;
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Enabling hwec Ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Enabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!bearer_cap_is_audio(woomera->bearer_cap)) {
|
||||
int err;
|
||||
err=sangoma_tdm_disable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err == 0) {
|
||||
hwec_reenable=1;
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Disabling hwec Ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Disabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sangoma_frame_len = sangoma_tdm_get_usr_mtu_mru(ms->sangoma_sock,&tdm_api);
|
||||
|
@ -1878,13 +1923,25 @@ media_retry:
|
|||
|
||||
media_thread_exit:
|
||||
|
||||
if (hwec_reenable) {
|
||||
int err;
|
||||
err=sangoma_tdm_enable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err==0) {
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Re-enabling hwec ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Re-enabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
if (!tdmv_hwec_persist) {
|
||||
if (hwec_enabled) {
|
||||
int err;
|
||||
err=sangoma_tdm_disable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err==0) {
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] disabling hwec ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] disabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (hwec_reenable) {
|
||||
int err;
|
||||
err=sangoma_tdm_enable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err==0) {
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Re-enabling hwec ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Re-enabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2167,9 +2224,9 @@ static struct woomera_interface * launch_woomera_loop_thread(short_signal_event_
|
|||
struct woomera_interface *woomera = NULL;
|
||||
char callid[20];
|
||||
|
||||
sprintf(callid, "w%dg%d", event->span+1,event->chan+1);
|
||||
sprintf(callid, "s%dc%d", event->span+1,event->chan+1);
|
||||
|
||||
if ((woomera = alloc_woomera())) {
|
||||
if ((woomera = alloc_woomera())) {
|
||||
|
||||
woomera->chan = event->chan;
|
||||
woomera->span = event->span;
|
||||
|
@ -2790,7 +2847,7 @@ static int handle_woomera_media_accept_answer(struct woomera_interface *woomera,
|
|||
SIGBOOST_EVENT_CALL_ANSWERED,
|
||||
0);
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log,
|
||||
"Sent SIGBOOST_EVENT_CALL_ANSWERED [w%dg%d]\n",
|
||||
"Sent SIGBOOST_EVENT_CALL_ANSWERED [s%dc%d]\n",
|
||||
woomera->span+1,woomera->chan+1);
|
||||
} else {
|
||||
struct woomera_event wevent;
|
||||
|
@ -2860,6 +2917,7 @@ static int handle_woomera_call_start (struct woomera_interface *woomera,
|
|||
char *uil1p = woomera_message_header(wmsg, "uil1p");
|
||||
char *called = wmsg->callid;
|
||||
char *grp = wmsg->callid;
|
||||
char *profile;
|
||||
char *p;
|
||||
int cause = 34;
|
||||
int tg = 0;
|
||||
|
@ -2887,7 +2945,15 @@ static int handle_woomera_call_start (struct woomera_interface *woomera,
|
|||
}
|
||||
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "New Call %d/%d\n", server.call_count, server.max_calls);
|
||||
/* Remove profile name out of destiantion */
|
||||
if ((profile = strchr(called, ':'))) {
|
||||
profile++;
|
||||
called=profile;
|
||||
grp=profile;
|
||||
}
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "New Call %d/%d origdest=%s newdest=%s\n",
|
||||
server.call_count, server.max_calls, wmsg->callid, called);
|
||||
|
||||
switch(called[0]) {
|
||||
case 'g':
|
||||
|
@ -3166,8 +3232,13 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
char *session=NULL;
|
||||
int span, chan;
|
||||
char ifname[100];
|
||||
int err;
|
||||
|
||||
/* If session does not exist this is an incoming call */
|
||||
sscanf(unique_id, "w%dg%d", &span, &chan);
|
||||
err=sscanf(unique_id, "s%dc%d", &span, &chan);
|
||||
if (err!=2) {
|
||||
err=sscanf(unique_id, "w%dg%d", &span, &chan);
|
||||
}
|
||||
span--;
|
||||
chan--;
|
||||
|
||||
|
@ -3254,14 +3325,14 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
int clients=server.process_table[span][chan].clients;
|
||||
if (server.process_table[span][chan].clients < 0) {
|
||||
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "WOOMERA CMD: Warning Clients (%i) Race condition on Hangup [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "WOOMERA CMD: Warning Clients (%i) Race condition on Hangup [s%dc%d]\n",
|
||||
clients, span+1,chan+1);
|
||||
|
||||
} else if (server.process_table[span][chan].clients > 1) {
|
||||
server.process_table[span][chan].clients--;
|
||||
pthread_mutex_unlock(&server.process_lock);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Got Hungup on Multiple Clients %i, skipping hangup [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Got Hungup on Multiple Clients %i, skipping hangup [s%dc%d]\n",
|
||||
clients, span+1,chan+1);
|
||||
|
||||
cause=16;
|
||||
|
@ -3280,14 +3351,14 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
woomera_set_flag(woomera, WFLAG_HANGUP);
|
||||
return;
|
||||
}
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Hanging up channel [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Hanging up channel [s%dc%d]\n",
|
||||
span+1,chan+1);
|
||||
}
|
||||
#endif
|
||||
|
||||
server.process_table[span][chan].dev=woomera;
|
||||
strncpy(woomera->session,unique_id,sizeof(woomera->session));
|
||||
sprintf(ifname,"w%dg%d",span+1,chan+1);
|
||||
sprintf(ifname,"s%dc%d",span+1,chan+1);
|
||||
woomera_set_interface(woomera, ifname);
|
||||
|
||||
woomera->span=span;
|
||||
|
@ -3365,7 +3436,7 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
}
|
||||
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "Hangup Received: [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "Hangup Received: [s%dc%d]\n",
|
||||
span+1,chan+1);
|
||||
|
||||
|
||||
|
@ -3468,7 +3539,7 @@ static void handle_call_answer(short_signal_event_t *event)
|
|||
} else {
|
||||
int err;
|
||||
err=0;
|
||||
sprintf(callid, "w%dg%d", event->span + 1, event->chan + 1);
|
||||
sprintf(callid, "s%dc%d", event->span + 1, event->chan + 1);
|
||||
woomera_set_interface(woomera, callid);
|
||||
#ifndef WOOMERA_EARLY_MEDIA
|
||||
err=launch_media_thread(woomera);
|
||||
|
@ -3506,7 +3577,7 @@ static void handle_call_answer(short_signal_event_t *event)
|
|||
#endif
|
||||
|
||||
if (!kill) {
|
||||
new_woomera_event_printf(&wevent, "EVENT CONNECT w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT CONNECT s%dc%d%s"
|
||||
"Unique-Call-Id: %s%s",
|
||||
event->span+1,
|
||||
event->chan+1,
|
||||
|
@ -3518,7 +3589,7 @@ static void handle_call_answer(short_signal_event_t *event)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "Answer requested on non-existant session. [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_PROD, server.log, "Answer requested on non-existant session. [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
kill++;
|
||||
}
|
||||
|
@ -3539,10 +3610,10 @@ handle_call_answer_end:
|
|||
SIGBOOST_EVENT_CALL_STOPPED,
|
||||
SIGBOOST_RELEASE_CAUSE_NORMAL);
|
||||
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to Answer without session [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to Answer without session [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
#endif
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Received Answer with no session [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Received Answer with no session [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -3564,7 +3635,7 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
int err, span, chan;
|
||||
|
||||
pull_from_holding_tank(event->call_setup_id,event->span,event->chan);
|
||||
sprintf(callid, "w%dg%d", event->span + 1, event->chan + 1);
|
||||
sprintf(callid, "s%dc%d", event->span + 1, event->chan + 1);
|
||||
|
||||
span = event->span;
|
||||
chan = event->chan;
|
||||
|
@ -3578,7 +3649,7 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
struct woomera_interface *tmp_woomera = server.process_table[span][chan].dev;
|
||||
woomera_set_flag(tmp_woomera,WFLAG_HANGUP);
|
||||
woomera_set_flag(tmp_woomera,WFLAG_MEDIA_END);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [w%dg%d] - Call ACK!\n", event->span+1, event->chan+1);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [s%dc%d] - Call ACK!\n", event->span+1, event->chan+1);
|
||||
kill++;
|
||||
}
|
||||
|
||||
|
@ -3636,7 +3707,7 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
#endif
|
||||
if (!kill) {
|
||||
|
||||
new_woomera_event_printf(&wevent, "EVENT PROCEED w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT PROCEED s%dc%d%s"
|
||||
"Channel-Name: g%d/%d%s"
|
||||
"Unique-Call-Id: %s%s",
|
||||
event->span+1,
|
||||
|
@ -3659,13 +3730,13 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
|
||||
enqueue_event(woomera, &wevent,EVENT_FREE_DATA);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Call Answered Event ID = %d Device = w%dg%d!\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Call Answered Event ID = %d Device = s%dc%d!\n",
|
||||
event->call_setup_id,woomera->span+1,woomera->chan+1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log,
|
||||
"Event (START ACK) %d referrs to a non-existant session (%d) [w%dg%d]!\n",
|
||||
"Event (START ACK) %d referrs to a non-existant session (%d) [s%dc%d]!\n",
|
||||
event->event_id, event->call_setup_id,event->span+1, event->chan+1);
|
||||
kill++;
|
||||
}
|
||||
|
@ -3681,7 +3752,7 @@ woomera_call_ack_skip:
|
|||
SIGBOOST_EVENT_CALL_STOPPED,
|
||||
SIGBOOST_RELEASE_CAUSE_NORMAL);
|
||||
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to CALL START ACK without session [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to CALL START ACK without session [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -3721,7 +3792,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
woomera_set_cause_topbx(woomera,event->release_cause);
|
||||
woomera_set_flag(woomera, (WFLAG_HANGUP|WFLAG_HANGUP_NACK_ACK));
|
||||
|
||||
new_woomera_event_printf(&wevent, "EVENT HANGUP w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT HANGUP s%dc%d%s"
|
||||
"Unique-Call-Id: %s%s"
|
||||
"Cause: %s%s"
|
||||
"Q931-Cause-Code: %d%s",
|
||||
|
@ -3780,7 +3851,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
|
||||
if (woomera) {
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event START NACK on w%dg%d ptr=%p ms=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event START NACK on s%dc%d ptr=%p ms=%p\n",
|
||||
woomera->span+1,woomera->chan+1,woomera,woomera->ms);
|
||||
|
||||
if (!woomera_test_flag(woomera,WFLAG_HANGUP)){
|
||||
|
@ -3800,13 +3871,13 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
} else {
|
||||
/* Valid state when we are not in autoacm mode */
|
||||
ack++;
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event: NACK no woomera on span chan [w%dg%d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event: NACK no woomera on span chan [s%dc%d]!\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Error: Start Nack Invalid State Should not happen [%d] [w%dg%d]!\n",
|
||||
"Error: Start Nack Invalid State Should not happen [%d] [s%dc%d]!\n",
|
||||
event->call_setup_id, event->span+1, event->chan+1);
|
||||
ack++;
|
||||
}
|
||||
|
@ -3816,7 +3887,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
log_printf(SMG_LOG_ALL, server.log, "WARNING: All ckt busy Timeout=%i!\n",server.all_ckt_busy);
|
||||
}
|
||||
if (event->release_cause == SIGBOOST_CALL_SETUP_CSUPID_DBL_USE) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Double use on [w%ig%i] setup id %i!\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Double use on [s%ic%i] setup id %i!\n",
|
||||
event->span+1,event->chan+1,event->call_setup_id);
|
||||
}
|
||||
|
||||
|
@ -3843,7 +3914,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
0);
|
||||
|
||||
if (!woomera) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event (NACK ACK) %d referrs to a non-existant session (%d) [w%dg%d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event (NACK ACK) %d referrs to a non-existant session (%d) [s%dc%d]!\n",
|
||||
event->event_id,event->call_setup_id, event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -3866,7 +3937,7 @@ static void handle_call_loop_start(short_signal_event_t *event)
|
|||
|
||||
|
||||
log_printf(SMG_LOG_PROD, server.log,
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [w%dg] ptr=%d\n",
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [s%dc%d] ptr=%d\n",
|
||||
event->span+1, event->chan+1, server.process_table[event->span][event->chan].dev);
|
||||
|
||||
pthread_mutex_unlock(&server.process_lock);
|
||||
|
@ -3874,7 +3945,7 @@ static void handle_call_loop_start(short_signal_event_t *event)
|
|||
|
||||
}
|
||||
|
||||
sprintf(callid, "w%dg%d", event->span+1,event->chan+1);
|
||||
sprintf(callid, "s%dc%d", event->span+1,event->chan+1);
|
||||
sprintf(server.process_table[event->span][event->chan].session,
|
||||
"%s-%i-%i",callid,rand(),rand());
|
||||
session=server.process_table[event->span][event->chan].session;
|
||||
|
@ -3890,7 +3961,7 @@ static void handle_call_loop_start(short_signal_event_t *event)
|
|||
SIGBOOST_EVENT_CALL_START_NACK,
|
||||
17);
|
||||
log_printf(SMG_LOG_PROD, server.log,
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [w%dg] ptr=%d\n",
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [s%dc%d] ptr=%d\n",
|
||||
event->span+1, event->chan+1, server.process_table[event->span][event->chan].dev);
|
||||
}
|
||||
|
||||
|
@ -3918,7 +3989,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
|
||||
if (smg_validate_span_chan(event->span,event->chan)) {
|
||||
log_printf(0,server.log,
|
||||
"Error: invalid span=% chan=%i on incoming call [w%dg%d] - Call START!\n",
|
||||
"Error: invalid span=% chan=%i on incoming call [s%dc%d] - Call START!\n",
|
||||
event->span+1, event->chan+1, event->span+1,event->chan+1);
|
||||
return;
|
||||
}
|
||||
|
@ -3929,7 +4000,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
|
||||
woomera_set_flag(tmp_woomera,WFLAG_HANGUP);
|
||||
woomera_set_flag(tmp_woomera,WFLAG_MEDIA_END);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [w%dg%d] - Call START!\n", event->span+1, event->chan+1);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [s%dc%d] - Call START!\n", event->span+1, event->chan+1);
|
||||
|
||||
isup_exec_command(event->span,
|
||||
event->chan,
|
||||
|
@ -3938,14 +4009,14 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
17);
|
||||
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Sent (From Handle START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [w%dg%d]\n",
|
||||
"Sent (From Handle START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
pthread_mutex_unlock(&server.process_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(callid, "w%dg%d", event->span+1,event->chan+1);
|
||||
sprintf(callid, "s%dc%d", event->span+1,event->chan+1);
|
||||
sprintf(server.process_table[event->span][event->chan].session,
|
||||
"%s-%i-%i",callid,rand(),rand());
|
||||
session=server.process_table[event->span][event->chan].session;
|
||||
|
@ -3976,7 +4047,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
}
|
||||
}
|
||||
|
||||
new_woomera_event_printf(&wevent, "EVENT INCOMING w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT INCOMING s%dc%d%s"
|
||||
"Unique-Call-Id: %s%s"
|
||||
"Remote-Number: %s%s"
|
||||
"Remote-Name: %s%s"
|
||||
|
@ -4044,7 +4115,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
SIGBOOST_EVENT_CALL_STOPPED,
|
||||
17);
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_STOPPED [w%dg%d]\n",
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_STOPPED [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
} else {
|
||||
|
@ -4054,13 +4125,15 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
SIGBOOST_EVENT_CALL_START_NACK,
|
||||
17);
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_START_NACK [w%dg%d]\n",
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_START_NACK [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
server.process_table[event->span][event->chan].clients=clients;
|
||||
//pthread_mutex_lock(&server.process_lock);
|
||||
server.process_table[event->span][event->chan].clients = clients;
|
||||
//pthread_mutex_unlock(&server.process_lock);
|
||||
}
|
||||
|
||||
destroy_woomera_event_data(&wevent);
|
||||
|
@ -4073,20 +4146,20 @@ static void handle_incoming_digit(call_signal_event_t *event)
|
|||
int digits_len;
|
||||
|
||||
if (smg_validate_span_chan(event->span,event->chan)) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event DTMF on invalid span chan [w%dg%d] !\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event DTMF on invalid span chan [s%dc%d] !\n",
|
||||
event->span+1, event->chan+1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!event->called_number_digits_count) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error Incoming digit with len %s %d [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error Incoming digit with len %s %d [s%dc%d]\n",
|
||||
event->called_number_digits,
|
||||
event->called_number_digits_count,
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "Queuing incoming digits %s [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "Queuing incoming digits %s [s%dc%d]\n",
|
||||
event->called_number_digits,
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
|
@ -4183,7 +4256,7 @@ static void handle_remove_loop(short_signal_event_t *event)
|
|||
/* We have to close the socket because
|
||||
At this point we are release span chan */
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event REMOVE LOOP on w%dg%d ptr=%p ms=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event REMOVE LOOP on s%dc%d ptr=%p ms=%p\n",
|
||||
woomera->span+1,woomera->chan+1,woomera,woomera->ms);
|
||||
|
||||
}
|
||||
|
@ -4226,7 +4299,7 @@ static void handle_call_stop(short_signal_event_t *event)
|
|||
/* We have to close the socket because
|
||||
At this point we are release span chan */
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP on w%dg%d ptr=%p ms=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP on s%dc%d ptr=%p ms=%p\n",
|
||||
woomera->span+1,woomera->chan+1,woomera,woomera->ms);
|
||||
|
||||
} else {
|
||||
|
@ -4245,7 +4318,7 @@ static void handle_call_stop(short_signal_event_t *event)
|
|||
|
||||
if (!woomera){
|
||||
/* This is allowed on incoming call if remote app does not answer it */
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP referrs to a non-existant session [w%dg%d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP referrs to a non-existant session [s%dc%d]!\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -4279,14 +4352,14 @@ static void handle_call_stop_ack(short_signal_event_t *event)
|
|||
|
||||
|
||||
if (woomera) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Stop Ack on [w%dg%d] [Setup ID: %d] [%s]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Stop Ack on [s%dc%d] [Setup ID: %d] [%s]!\n",
|
||||
event->span+1, event->chan+1, event->call_setup_id,
|
||||
woomera->interface);
|
||||
|
||||
woomera_clear_flag(woomera, WFLAG_WAIT_FOR_STOPPED_ACK);
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event CALL_STOP_ACK(%d) referrs to a non-existant session [w%dg%d] [Setup ID: %d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event CALL_STOP_ACK(%d) referrs to a non-existant session [s%dc%d] [Setup ID: %d]!\n",
|
||||
event->event_id, event->span+1, event->chan+1, event->call_setup_id);
|
||||
}
|
||||
|
||||
|
@ -4325,13 +4398,13 @@ static void handle_call_start_nack_ack(short_signal_event_t *event)
|
|||
* woomera client being down, in this case no
|
||||
* woomera thread is created */
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log,
|
||||
"Event NACK ACK [w%dg%d] with valid span/chan no dev!\n",
|
||||
"Event NACK ACK [s%dc%d] with valid span/chan no dev!\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log,
|
||||
"Event NACK ACK referrs to a non-existant session [w%dg%d] [Setup ID: %d]!\n",
|
||||
"Event NACK ACK referrs to a non-existant session [s%dc%d] [Setup ID: %d]!\n",
|
||||
event->span+1, event->chan+1, event->call_setup_id);
|
||||
}
|
||||
|
||||
|
@ -4410,9 +4483,9 @@ static void *monitor_thread_run(void *obj)
|
|||
call_signal_connection_t *mcon=&server.mcon;
|
||||
call_signal_connection_t *mconp=&server.mconp;
|
||||
|
||||
pthread_mutex_lock(&server.thread_count_lock);
|
||||
pthread_mutex_lock(&server.thread_count_lock);
|
||||
server.thread_count++;
|
||||
pthread_mutex_unlock(&server.thread_count_lock);
|
||||
pthread_mutex_unlock(&server.thread_count_lock);
|
||||
|
||||
woomera_set_flag(&server.master_connection, WFLAG_MONITOR_RUNNING);
|
||||
|
||||
|
@ -4771,7 +4844,7 @@ woomera_session_close:
|
|||
woomera_set_flag(woomera, WFLAG_WAIT_FOR_STOPPED_ACK_SENT);
|
||||
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_STOPPED [w%dg%d] [%s] ptr=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_STOPPED [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1, chan+1,woomera->interface,woomera);
|
||||
} else {
|
||||
|
||||
|
@ -4783,11 +4856,11 @@ woomera_session_close:
|
|||
woomera->q931_rel_cause_tosig);
|
||||
woomera_set_flag(woomera, WFLAG_WAIT_FOR_NACK_ACK_SENT);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_START_NACK [w%dg%d] [%s] ptr=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_START_NACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1, chan+1,woomera->interface,woomera);
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "Woomera Not Sent CALL STOPPED - Instead NACK [w%dg%d] [%s] ptr=%p\n",
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "Woomera Not Sent CALL STOPPED - Instead NACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1, chan+1,woomera->interface,woomera);
|
||||
|
||||
}
|
||||
|
@ -4797,7 +4870,7 @@ woomera_session_close:
|
|||
failure */
|
||||
if (!woomera->index) {
|
||||
/* In this case we really failed to tx STOP */
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
}
|
||||
}
|
||||
|
@ -4825,14 +4898,14 @@ woo_re_hangup:
|
|||
woomera->q931_rel_cause_tosig);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log,
|
||||
"Sent (Ack) to SIGBOOST_EVENT_CALL_STOPPED_ACK [w%dg%d] [%s] ptr=%p\n",
|
||||
"Sent (Ack) to SIGBOOST_EVENT_CALL_STOPPED_ACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1,chan+1,woomera->interface,woomera);
|
||||
|
||||
}else{
|
||||
/* This should never happen! If it does
|
||||
we broke protocol */
|
||||
log_printf(SMG_LOG_ALL, woomera->log,
|
||||
"FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED_ACK [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
"FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED_ACK [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
}
|
||||
|
||||
|
@ -4856,7 +4929,7 @@ woo_re_hangup:
|
|||
woomera->q931_rel_cause_tosig);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log,
|
||||
"Sent (Nack Ack) to SIGBOOST_EVENT_CALL_START_NACK_ACK [w%dg%d] [%s] ptr=%p\n",
|
||||
"Sent (Nack Ack) to SIGBOOST_EVENT_CALL_START_NACK_ACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1,chan+1,woomera->interface,woomera);
|
||||
|
||||
woomera->index=0;
|
||||
|
@ -4872,7 +4945,7 @@ woo_re_hangup:
|
|||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, woomera->log,
|
||||
"FAILED: Sent (Nack Ack) SIGBOOST_EVENT_CALL_START_NACK_ACK [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
"FAILED: Sent (Nack Ack) SIGBOOST_EVENT_CALL_START_NACK_ACK [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
}
|
||||
|
||||
|
@ -5098,7 +5171,7 @@ woo_re_hangup:
|
|||
|
||||
if (server.process_table[span][chan]){
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Sanity Span Chan Still in use: [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
"Sanity Span Chan Still in use: [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
//server.process_table[span][chan] = NULL;
|
||||
}
|
||||
|
@ -5300,7 +5373,9 @@ static int configure_server(void)
|
|||
struct woomera_config cfg;
|
||||
char *var, *val;
|
||||
int cnt = 0;
|
||||
struct smg_tdm_ip_bridge *ip_bridge=NULL;
|
||||
|
||||
|
||||
server.dtmf_intr_ch = -1;
|
||||
|
||||
if (!woomera_open_file(&cfg, server.config_file)) {
|
||||
|
@ -5407,19 +5482,71 @@ static int configure_server(void)
|
|||
server.base_media_port = base;
|
||||
server.next_media_port = base;
|
||||
server.max_media_port = server.base_media_port + WOOMERA_MAX_MEDIA_PORTS;
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Base Media Port: %d\n",server.base_media_port);
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Base Media Port: %d\n",server.base_media_port);
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "max_media_ports")) {
|
||||
int max = atoi(val);
|
||||
if (max > WOOMERA_MAX_MEDIA_PORTS) {
|
||||
if (max >= 0) {
|
||||
server.max_media_port = server.base_media_port+max;
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Max Media Port: %d\n",server.max_media_port);
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Max Media Port: %d\n",server.max_media_port);
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "media_ip")) {
|
||||
strncpy(server.media_ip, val, sizeof(server.media_ip) -1);
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Media IP: %s\n",server.media_ip);
|
||||
|
||||
} else if (!strcasecmp(var, "bridge_tdm_ip")) {
|
||||
int err=smg_get_ip_bridge_session(&ip_bridge);
|
||||
if (err) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error failed to get free ip bridge %i!\n",err);
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log, "\n======================= \n");
|
||||
log_printf(SMG_LOG_ALL,server.log, "Bridge - Configuration \n");
|
||||
log_printf(SMG_LOG_ALL,server.log, "======================= \n");
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "bridge_span")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && max <= 32 && ip_bridge) {
|
||||
ip_bridge->span=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Span: %i\n",ip_bridge->span);
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Span: ERROR: Invalid Value %s\n",val);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_chan")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && max < MAX_SMG_BRIDGE && ip_bridge) {
|
||||
ip_bridge->chan=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Chan: %i\n",ip_bridge->chan);
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Chan: ERROR: Invalid Value %s\n",val);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_local_ip")) {
|
||||
if (ip_bridge) {
|
||||
strncpy(ip_bridge->mcon.cfg.local_ip, val,
|
||||
sizeof(ip_bridge->mcon.cfg.local_ip) -1);
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Local IP: %s\n",ip_bridge->mcon.cfg.local_ip);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_remote_ip")) {
|
||||
if (ip_bridge) {
|
||||
strncpy(ip_bridge->mcon.cfg.remote_ip, val,
|
||||
sizeof(ip_bridge->mcon.cfg.remote_ip) -1);
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Remote IP: %s\n",ip_bridge->mcon.cfg.remote_ip);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_port")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && ip_bridge) {
|
||||
ip_bridge->mcon.cfg.local_port=max;
|
||||
ip_bridge->mcon.cfg.remote_port=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Port: %i\n",max);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_period")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && ip_bridge) {
|
||||
ip_bridge->period=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Period: %ims\n",ip_bridge->period);
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Invalid Option %s at line %d!\n", var, cfg.lineno);
|
||||
}
|
||||
|
@ -5797,10 +5924,11 @@ static int woomera_startup(int argc, char **argv)
|
|||
usleep(5000);
|
||||
|
||||
woomera_set_flag(&server.master_connection, WFLAG_RUNNING);
|
||||
|
||||
if (launch_monitor_thread()) {
|
||||
woomera_clear_flag(&server.master_connection, WFLAG_RUNNING);
|
||||
smg_log_cleanup();
|
||||
return 0;
|
||||
smg_log_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, "%s", WELCOME_TEXT);
|
||||
|
@ -5882,7 +6010,8 @@ int main(int argc, char *argv[])
|
|||
mlockall(MCL_FUTURE);
|
||||
memset(&server, 0, sizeof(server));
|
||||
memset(&woomera_dead_dev, 0, sizeof(woomera_dead_dev));
|
||||
|
||||
memset(&g_smg_ip_bridge_idx,0, sizeof(g_smg_ip_bridge_idx));
|
||||
|
||||
ret=nice(-5);
|
||||
|
||||
sdla_memdbg_init();
|
||||
|
@ -5892,12 +6021,17 @@ int main(int argc, char *argv[])
|
|||
openlog (ps_progname ,LOG_PID, LOG_LOCAL2);
|
||||
|
||||
if (! (ret = woomera_startup(argc, argv))) {
|
||||
exit(0);
|
||||
exit(0);
|
||||
}
|
||||
ret = main_thread();
|
||||
|
||||
ret = smg_ip_bridge_start();
|
||||
if (ret == 0) {
|
||||
ret = main_thread();
|
||||
}
|
||||
|
||||
woomera_shutdown();
|
||||
|
||||
smg_ip_bridge_stop();
|
||||
sdla_memdbg_free(1);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -32,8 +32,8 @@ woomera_port => 42420
|
|||
# If changing from default values
|
||||
# ensure that woomera client
|
||||
# UDP ports do not conflict.
|
||||
base_media_port => 9000
|
||||
max_media_ports => 899
|
||||
base_media_port => 10000
|
||||
max_media_ports => 5000
|
||||
|
||||
|
||||
#Used to play Sangoma Rocks on all
|
||||
|
@ -94,3 +94,31 @@ woomera_udp_seq => 0
|
|||
call_timeout=100
|
||||
|
||||
|
||||
#Enable tdm bridge profile 1
|
||||
#Note profile number must not be zero.
|
||||
#Configure all parameters for the bridge.
|
||||
#The opposite sangoma_mgd must be configured
|
||||
#with same parameters except IP address
|
||||
#need to be swaped.
|
||||
#bridge_tdm_ip => 1
|
||||
#bridge_span => 1
|
||||
#bridge_chan => 1
|
||||
#bridge_local_ip => 192.168.1.251
|
||||
#bridge_remote_ip => 192.168.1.252
|
||||
#bridge_port => 60000
|
||||
#bridge_period => 10 #milliseconds
|
||||
|
||||
|
||||
#Enable tdm bridge profile 2
|
||||
#Note profile number must not be zero.
|
||||
#Configure all parameters for the bridge.
|
||||
#The opposite sangoma_mgd must be configured
|
||||
#with same parameters except IP address
|
||||
#need to be swaped.
|
||||
#bridge_tdm_ip => 2
|
||||
#bridge_span => 1
|
||||
#bridge_chan => 2
|
||||
#bridge_local_ip => 192.168.1.251
|
||||
#bridge_remote_ip => 192.168.1.252
|
||||
#bridge_port => 60001
|
||||
#bridge_period => 10 #milliseconds
|
||||
|
|
|
@ -62,13 +62,13 @@
|
|||
#define PIDFILE "/var/run/sangoma_mgd.pid"
|
||||
#define PIDFILE_UNIT "/var/run/sangoma_mgd_unit.pid"
|
||||
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 899
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 5000
|
||||
|
||||
#define CORE_EVENT_LEN 512
|
||||
#define WOOMERA_STRLEN 256
|
||||
#define WOOMERA_ARRAY_LEN 50
|
||||
#define WOOMERA_BODYLEN 2048
|
||||
#define WOOMERA_MIN_MEDIA_PORT 9000
|
||||
#define WOOMERA_MIN_MEDIA_PORT 10000
|
||||
#define WOOMERA_MAX_MEDIA_PORT (WOOMERA_MIN_MEDIA_PORT + WOOMERA_MAX_MEDIA_PORTS)
|
||||
#define WOOMERA_HARD_TIMEOUT 0
|
||||
#define WOOMERA_LINE_SEPERATOR "\r\n"
|
||||
|
@ -297,6 +297,26 @@ struct woomera_session {
|
|||
pthread_mutex_t media_lock;
|
||||
};
|
||||
|
||||
struct smg_tdm_ip_bridge {
|
||||
int init;
|
||||
int end;
|
||||
int span;
|
||||
int chan;
|
||||
#if 0
|
||||
int port;
|
||||
char local_ip[25];
|
||||
char remote_ip[25];
|
||||
#endif
|
||||
int period;
|
||||
int tdm_fd;
|
||||
call_signal_connection_t mcon;
|
||||
pthread_t thread;
|
||||
};
|
||||
|
||||
extern struct smg_tdm_ip_bridge g_smg_ip_bridge_idx[];
|
||||
extern pthread_mutex_t g_smg_ip_bridge_lock;
|
||||
|
||||
#define MAX_SMG_BRIDGE 32
|
||||
#define CORE_TANK_LEN CORE_MAX_CHAN_PER_SPAN*CORE_MAX_SPANS
|
||||
|
||||
struct woomera_server {
|
||||
|
@ -342,11 +362,12 @@ struct woomera_server {
|
|||
struct timeval all_ckt_busy_time;
|
||||
struct timeval restart_timeout;
|
||||
int dtmf_on;
|
||||
int dtmf_off;
|
||||
int dtmf_intr_ch;
|
||||
int dtmf_size;
|
||||
int dtmf_off;
|
||||
int dtmf_intr_ch;
|
||||
int dtmf_size;
|
||||
int strip_cid_non_digits;
|
||||
int call_timeout;
|
||||
struct smg_tdm_ip_bridge ip_bridge_idx[MAX_SMG_BRIDGE];
|
||||
};
|
||||
|
||||
extern struct woomera_server server;
|
||||
|
@ -359,6 +380,28 @@ struct woomera_config {
|
|||
int lineno;
|
||||
};
|
||||
|
||||
static inline int smg_get_ip_bridge_session(struct smg_tdm_ip_bridge **ip_bridge)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<MAX_SMG_BRIDGE;i++) {
|
||||
if (g_smg_ip_bridge_idx[i].init) {
|
||||
continue;
|
||||
}
|
||||
g_smg_ip_bridge_idx[i].init=1;
|
||||
*ip_bridge=&g_smg_ip_bridge_idx[i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
*ip_bridge=NULL;
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
static inline int smg_free_ip_bridge_session(struct smg_tdm_ip_bridge *ip_bridge)
|
||||
{
|
||||
memset(ip_bridge,0,sizeof(struct smg_tdm_ip_bridge));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void smg_get_current_priority(int *policy, int *priority)
|
||||
{
|
||||
|
@ -706,7 +749,7 @@ static inline int open_span_chan (unsigned char span, unsigned char chan)
|
|||
pthread_mutex_lock(&server.process_table[span][chan].media_lock);
|
||||
if(server.process_table[span][chan].media_used > 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Critical Error: channel already opened [w%ig%i]\n", span, chan);
|
||||
"Critical Error: channel already opened [s%ic%i]\n", span, chan);
|
||||
} else {
|
||||
server.process_table[span][chan].media_used++;
|
||||
|
||||
|
@ -736,5 +779,8 @@ static inline void close_span_chan (int *socket, unsigned char span, unsigned ch
|
|||
|
||||
extern int smg_log_init(void);
|
||||
extern void smg_log_cleanup(void);
|
||||
extern int smg_ip_bridge_start(void);
|
||||
extern int smg_ip_bridge_stop(void);
|
||||
extern int waitfor_2sockets(int fda, int fdb, char *a, char *b, int timeout);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,376 @@
|
|||
|
||||
#include "sangoma_mgd.h"
|
||||
static int bridge_threads=0;
|
||||
|
||||
#define TEST_SEQ 0
|
||||
|
||||
static void *bridge_thread_run(void *obj)
|
||||
{
|
||||
struct smg_tdm_ip_bridge *bridge= (struct smg_tdm_ip_bridge*)obj;
|
||||
call_signal_connection_t *mcon = &bridge->mcon;
|
||||
wanpipe_tdm_api_t tdm_api;
|
||||
int ss = 0;
|
||||
char a=0,b=0;
|
||||
int bytes=0,err;
|
||||
unsigned char data[1024];
|
||||
unsigned int fromlen = sizeof(struct sockaddr_in);
|
||||
sangoma_api_hdr_t hdrframe;
|
||||
unsigned int udp_rx=0,udp_tx=0,tdm_rx=0,tdm_tx=0;
|
||||
unsigned int udp_rx_err=0, udp_tx_err=0;
|
||||
unsigned int tdm_rx_err=0, tdm_tx_err=0;
|
||||
int bridge_ip_sync=0;
|
||||
int err_flag=0;
|
||||
unsigned char prev_status=0;
|
||||
#if TEST_SEQ
|
||||
unsigned char tx_seq_cnt=0;
|
||||
unsigned char rx_seq_cnt=0;
|
||||
int i;
|
||||
int insync=0;
|
||||
#endif
|
||||
|
||||
memset(&hdrframe,0,sizeof(hdrframe));
|
||||
memset(data,0,sizeof(data));
|
||||
memset(&tdm_api,0,sizeof(tdm_api));
|
||||
|
||||
if (bridge->period) {
|
||||
err=sangoma_tdm_set_usr_period(bridge->tdm_fd, &tdm_api,bridge->period);
|
||||
if (err) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Failed to execute set period %i\n",__FUNCTION__,bridge->period);
|
||||
}
|
||||
}
|
||||
|
||||
sangoma_tdm_disable_hwec(bridge->tdm_fd, &tdm_api);
|
||||
|
||||
err=sangoma_tdm_flush_bufs(bridge->tdm_fd, &tdm_api);
|
||||
if (err) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Failed to execute tdm flush\n",__FUNCTION__);
|
||||
}
|
||||
|
||||
while (!bridge->end &&
|
||||
woomera_test_flag(&server.master_connection, WFLAG_RUNNING)) {
|
||||
|
||||
err_flag=0;
|
||||
|
||||
ss = waitfor_2sockets(mcon->socket,
|
||||
bridge->tdm_fd,
|
||||
&a, &b, 1000);
|
||||
|
||||
if (ss > 0) {
|
||||
|
||||
if (a) {
|
||||
|
||||
bytes = recvfrom(mcon->socket, &data[0], sizeof(data), MSG_DONTWAIT,
|
||||
(struct sockaddr *) &mcon->local_addr, &fromlen);
|
||||
|
||||
#if TEST_SEQ
|
||||
for (i=0;i<bytes;i++) {
|
||||
if (data[i] != rx_seq_cnt) {
|
||||
if (insync) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"Error: Data rx seq cnt %i expected %i\n",data[i],rx_seq_cnt);
|
||||
}
|
||||
rx_seq_cnt=data[i];
|
||||
insync=0;
|
||||
} else if (insync == 0) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"In sync\n");
|
||||
insync=1;
|
||||
}
|
||||
rx_seq_cnt++;
|
||||
}
|
||||
|
||||
|
||||
for (i=0;i<bytes;i++) {
|
||||
data[i]=tx_seq_cnt++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bytes > 0) {
|
||||
|
||||
if (bridge_ip_sync == 0) {
|
||||
bridge_ip_sync=1;
|
||||
log_printf(SMG_LOG_ALL,server.log,"Bridge IP Sync: span=%i chan=%i port=%d len=%i\n",bridge->span,bridge->chan,bridge->mcon.cfg.local_port,bytes);
|
||||
}
|
||||
udp_rx++;
|
||||
|
||||
err=sangoma_sendmsg_socket(bridge->tdm_fd,
|
||||
&hdrframe,
|
||||
sizeof(hdrframe),
|
||||
data,
|
||||
bytes, 0);
|
||||
if (err != bytes) {
|
||||
|
||||
unsigned char current_status;
|
||||
unsigned char verbose=1;
|
||||
|
||||
sangoma_tdm_get_link_status(bridge->tdm_fd, &tdm_api, ¤t_status);
|
||||
if (current_status != WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED) {
|
||||
if (prev_status == current_status) {
|
||||
verbose=0;
|
||||
}
|
||||
}
|
||||
|
||||
prev_status = current_status;
|
||||
|
||||
if (verbose) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge tdm write failed (span=%i,chan=%i)! len=%i status=%s - %s\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan,bytes, current_status==WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED?"Connected":"Disconnected",
|
||||
strerror(errno));
|
||||
sangoma_tdm_flush_bufs(bridge->tdm_fd, &tdm_api);
|
||||
err_flag++;
|
||||
}
|
||||
|
||||
tdm_tx_err++;
|
||||
|
||||
} else {
|
||||
tdm_tx++;
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge sctp read failed (span=%i,chan=%i)! len=%i - %s\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan,bytes,strerror(errno));
|
||||
udp_rx_err++;
|
||||
err_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
if (b) {
|
||||
bytes = sangoma_readmsg_socket(bridge->tdm_fd,
|
||||
&hdrframe,
|
||||
sizeof(hdrframe),
|
||||
data,
|
||||
sizeof(data), 0);
|
||||
|
||||
if (bytes > 0) {
|
||||
tdm_rx++;
|
||||
err=sendto(mcon->socket,
|
||||
data,
|
||||
bytes, 0,
|
||||
(struct sockaddr *) &mcon->remote_addr,
|
||||
sizeof(mcon->remote_addr));
|
||||
if (err != bytes) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge sctp write failed (span=%i,chan=%i)! len=%i - %s\n",__FUNCTION__,bridge->span,bridge->chan,bytes,strerror(errno));
|
||||
udp_tx_err++;
|
||||
err_flag++;
|
||||
} else {
|
||||
udp_tx++;
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge tdm read failed (span=%i,chan=%i)! len=%i - %s\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan,bytes,strerror(errno));
|
||||
tdm_rx_err++;
|
||||
err_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (ss < 0) {
|
||||
if (!bridge->end) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Poll failed on fd exiting bridge (span=%i,chan=%i)\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan);
|
||||
}
|
||||
break;
|
||||
|
||||
} else if (ss == 0) {
|
||||
|
||||
if (bridge_ip_sync) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"Bridge IP Timeout: span=%i chan=%i port=%d \n",
|
||||
bridge->span,bridge->chan,bridge->mcon.cfg.local_port);
|
||||
err_flag++;
|
||||
}
|
||||
bridge_ip_sync=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if TEST_SEQ
|
||||
if (udp_rx % 1000 == 0) {
|
||||
err_flag++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (err_flag) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"Bridge (s%02ic%02i) urx/ttx=(%i/%i) ue/te=(%i/%i) | trx/utx=(%i/%i) te/ue=(%i/%i) \n",
|
||||
bridge->span,bridge->chan,
|
||||
udp_rx,tdm_tx,udp_rx_err,tdm_tx_err,
|
||||
tdm_rx,udp_tx,tdm_rx_err,udp_tx_err);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_smg_ip_bridge_lock);
|
||||
bridge_threads--;
|
||||
pthread_mutex_unlock(&g_smg_ip_bridge_lock);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int launch_bridge_thread(int idx)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int result = 0;
|
||||
struct sched_param param;
|
||||
|
||||
param.sched_priority = 9;
|
||||
result = pthread_attr_init(&attr);
|
||||
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||
pthread_attr_setschedpolicy(&attr, SCHED_RR);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
pthread_attr_setstacksize(&attr, MGD_STACK_SIZE);
|
||||
|
||||
result = pthread_attr_setschedparam (&attr, ¶m);
|
||||
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Bridge Priority=%i res=%i \n",__FUNCTION__,
|
||||
param.sched_priority,result);
|
||||
|
||||
bridge_threads++;
|
||||
|
||||
result = pthread_create(&g_smg_ip_bridge_idx[idx].thread, &attr, bridge_thread_run, &g_smg_ip_bridge_idx[idx]);
|
||||
if (result) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "%s: Error: Creating Thread! %s\n",
|
||||
__FUNCTION__,strerror(errno));
|
||||
g_smg_ip_bridge_idx[idx].end=1;
|
||||
bridge_threads--;
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int create_udp_socket(call_signal_connection_t *ms, char *local_ip, int local_port, char *ip, int port)
|
||||
{
|
||||
int rc;
|
||||
struct hostent *result, *local_result;
|
||||
char buf[512], local_buf[512];
|
||||
int err = 0;
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_9,server.log,"LocalIP %s:%d IP %s:%d \n",local_ip, local_port, ip, port);
|
||||
|
||||
memset(&ms->remote_hp, 0, sizeof(ms->remote_hp));
|
||||
memset(&ms->local_hp, 0, sizeof(ms->local_hp));
|
||||
if ((ms->socket = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) {
|
||||
gethostbyname_r(ip, &ms->remote_hp, buf, sizeof(buf), &result, &err);
|
||||
gethostbyname_r(local_ip, &ms->local_hp, local_buf, sizeof(local_buf), &local_result, &err);
|
||||
if (result && local_result) {
|
||||
ms->remote_addr.sin_family = ms->remote_hp.h_addrtype;
|
||||
memcpy((char *) &ms->remote_addr.sin_addr.s_addr, ms->remote_hp.h_addr_list[0], ms->remote_hp.h_length);
|
||||
ms->remote_addr.sin_port = htons(port);
|
||||
|
||||
ms->local_addr.sin_family = ms->local_hp.h_addrtype;
|
||||
memcpy((char *) &ms->local_addr.sin_addr.s_addr, ms->local_hp.h_addr_list[0], ms->local_hp.h_length);
|
||||
ms->local_addr.sin_port = htons(local_port);
|
||||
|
||||
rc = bind(ms->socket, (struct sockaddr *) &ms->local_addr, sizeof(ms->local_addr));
|
||||
if (rc < 0) {
|
||||
close(ms->socket);
|
||||
ms->socket = -1;
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_9,server.log,
|
||||
"Failed to bind LocalIP %s:%d IP %s:%d (%s)\n",
|
||||
local_ip, local_port, ip, port,strerror(errno));
|
||||
}
|
||||
|
||||
/* OK */
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,
|
||||
"Failed to get hostbyname LocalIP %s:%d IP %s:%d (%s)\n",
|
||||
local_ip, local_port, ip, port,strerror(errno));
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,
|
||||
"Failed to create/allocate UDP socket\n");
|
||||
}
|
||||
|
||||
return ms->socket;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int smg_ip_bridge_start(void)
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
struct smg_tdm_ip_bridge *bridge;
|
||||
call_signal_connection_t *mcon;
|
||||
|
||||
pthread_mutex_init(&g_smg_ip_bridge_lock,NULL);
|
||||
|
||||
for (i=0;i<MAX_SMG_BRIDGE;i++) {
|
||||
if (!g_smg_ip_bridge_idx[i].init) {
|
||||
continue;
|
||||
}
|
||||
bridge=&g_smg_ip_bridge_idx[i];
|
||||
mcon=&bridge->mcon;
|
||||
|
||||
log_printf(SMG_LOG_ALL, server.log, "Opening Bridge MCON Socket [%d] local %s/%d remote %s/%d \n",
|
||||
mcon->socket,mcon->cfg.local_ip,mcon->cfg.local_port,mcon->cfg.remote_ip,mcon->cfg.remote_port);
|
||||
|
||||
#if 0
|
||||
if (call_signal_connection_open(mcon,
|
||||
mcon->cfg.local_ip,
|
||||
mcon->cfg.local_port,
|
||||
mcon->cfg.remote_ip,
|
||||
mcon->cfg.remote_port) < 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error: Opening Bridge MCON Socket [%d] local %s/%d remote %s/%d %s\n",
|
||||
mcon->socket,mcon->cfg.local_ip,mcon->cfg.local_port,mcon->cfg.remote_ip,mcon->cfg.remote_port,strerror(errno));
|
||||
bridge->end=1;
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
if (create_udp_socket(mcon,
|
||||
mcon->cfg.local_ip,
|
||||
mcon->cfg.local_port,
|
||||
mcon->cfg.remote_ip,
|
||||
mcon->cfg.remote_port) < 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error: Opening Bridge MCON Socket [%d] local %s/%d remote %s/%d %s\n",
|
||||
mcon->socket,mcon->cfg.local_ip,mcon->cfg.local_port,mcon->cfg.remote_ip,mcon->cfg.remote_port,strerror(errno));
|
||||
bridge->end=1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bridge->tdm_fd=open_span_chan(bridge->span, bridge->chan);
|
||||
if (bridge->tdm_fd < 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error: Failed to open span=%i chan=%i - %s\n",
|
||||
bridge->span,bridge->chan,strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
err=launch_bridge_thread(i);
|
||||
if (err) {
|
||||
bridge->end=1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int smg_ip_bridge_stop(void)
|
||||
{
|
||||
int i;
|
||||
int timeout=10;
|
||||
|
||||
for (i=0;i<MAX_SMG_BRIDGE;i++) {
|
||||
if (g_smg_ip_bridge_idx[i].init) {
|
||||
g_smg_ip_bridge_idx[i].end=1;
|
||||
g_smg_ip_bridge_idx[i].init=0;
|
||||
}
|
||||
}
|
||||
|
||||
while (bridge_threads) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Waiting for bridge threads %i\n",
|
||||
bridge_threads);
|
||||
sleep(1);
|
||||
timeout--;
|
||||
if (timeout == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&g_smg_ip_bridge_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@ enum e_sigboost_event_id_values
|
|||
SIGBOOST_EVENT_REMOVE_CHECK_LOOP = 0x8b, /*139*/
|
||||
SIGBOOST_EVENT_AUTO_CALL_GAP_ABATE = 0x8c, /*140*/
|
||||
SIGBOOST_EVENT_DIGIT_IN = 0x8d, /*141*/
|
||||
SIGBOOST_EVENT_CALL_START_ACK_NO_MEDIA = 0x8e, /*141*/
|
||||
};
|
||||
enum e_sigboost_release_cause_values
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ SIG_LOG=$LOG
|
|||
PRI=0
|
||||
BRI=0
|
||||
SS7=0
|
||||
PROD="smg_ctrl"
|
||||
|
||||
ulimit -n 65000
|
||||
|
||||
|
@ -46,12 +47,19 @@ function usage()
|
|||
return 1
|
||||
}
|
||||
|
||||
logit()
|
||||
{
|
||||
local data="$1"
|
||||
|
||||
echo "$PROD: $data"
|
||||
logger "$PROD: $data"
|
||||
}
|
||||
|
||||
function stop_all()
|
||||
{
|
||||
|
||||
echo " "
|
||||
echo "Stopping running processes..."
|
||||
logit "Stopping running processes..."
|
||||
|
||||
stop_safe_sangoma
|
||||
stop_sigdaemon
|
||||
|
@ -61,6 +69,8 @@ function stop_all()
|
|||
fi
|
||||
|
||||
remove_pid_files
|
||||
|
||||
stop_scripts
|
||||
}
|
||||
|
||||
function stop_sigdaemon()
|
||||
|
@ -74,6 +84,7 @@ function stop_sigdaemon()
|
|||
echo "OK"
|
||||
else
|
||||
echo "FAILED"
|
||||
logit "Failed to TERM $sigd"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
|
@ -81,10 +92,10 @@ function stop_sigdaemon()
|
|||
do
|
||||
eval "pidof $sigd >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$sigd is stopped"
|
||||
logit "$sigd is stopped"
|
||||
return;
|
||||
else
|
||||
echo "waiting for $sigd to finish($i/$max_retry)...."
|
||||
logit "waiting for $sigd to finish($i/$max_retry)...."
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
@ -96,6 +107,7 @@ function stop_sigdaemon()
|
|||
echo "OK"
|
||||
else
|
||||
echo "FAILED"
|
||||
logit "Failed to KILL $sigd"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
|
@ -103,10 +115,10 @@ function stop_sigdaemon()
|
|||
do
|
||||
eval "pidof $sigd >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$sigd is stopped"
|
||||
logit "$sigd is stopped"
|
||||
break;
|
||||
else
|
||||
echo "waiting for $sigd to finish($i/$max_retry)...."
|
||||
logit "waiting for $sigd to finish($i/$max_retry)...."
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
@ -127,7 +139,7 @@ function stop_sangoma_mgd()
|
|||
return 0;
|
||||
fi
|
||||
else
|
||||
echo "sangoma_mgd not running..."
|
||||
logit "sangoma_mgd not running..."
|
||||
return;
|
||||
fi
|
||||
|
||||
|
@ -135,10 +147,10 @@ function stop_sangoma_mgd()
|
|||
do
|
||||
eval "pidof sangoma_mgd >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "sangoma_mgd is stopped"
|
||||
logit "sangoma_mgd is stopped"
|
||||
return 0
|
||||
else
|
||||
echo "waiting for sangoma_mgd to finish($i/$max_retry)...."
|
||||
logit "waiting for sangoma_mgd to finish($i/$max_retry)...."
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
@ -167,7 +179,7 @@ function stop_safe_sangoma()
|
|||
if [ $? -eq 0 ]; then
|
||||
echo -n "Sending TERM signal to safe_sangoma..."
|
||||
else
|
||||
echo "safe_sangoma not running..."
|
||||
logit "safe_sangoma not running..."
|
||||
return;
|
||||
fi
|
||||
sleep 1
|
||||
|
@ -181,7 +193,7 @@ function stop_safe_sangoma()
|
|||
echo "OK"
|
||||
else
|
||||
echo "FAILED"
|
||||
echo "Failed to stop safe_sangoma"
|
||||
logit "Failed to stop safe_sangoma"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
|
@ -196,14 +208,14 @@ function remove_pid_files()
|
|||
eval "rm -f /var/run/$sigd.pid > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo " "
|
||||
echo "Failed to remove /var/run/$sigd.pid, try to remove it manually"
|
||||
logit "Failed to remove /var/run/$sigd.pid, try to remove it manually"
|
||||
fi
|
||||
fi
|
||||
if [ -e /var/run/sangoma_mgd.pid ]; then
|
||||
eval "rm -f /var/run/sangoma_mgd.pid > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo " "
|
||||
echo "Failed to remove /var/run/sangoma_mgd.pid, try to remove it manually"
|
||||
logit "Failed to remove /var/run/sangoma_mgd.pid, try to remove it manually"
|
||||
fi
|
||||
fi
|
||||
echo "done"
|
||||
|
@ -212,7 +224,7 @@ function remove_pid_files()
|
|||
function start_test()
|
||||
{
|
||||
echo " "
|
||||
echo "Testing configuration files..."
|
||||
logit "Testing configuration files..."
|
||||
if [ $use_syslog -eq 1 ]; then
|
||||
eval "$sigd -t"
|
||||
else
|
||||
|
@ -220,13 +232,37 @@ function start_test()
|
|||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
logit "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
logit "Failed"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function start_scripts()
|
||||
{
|
||||
if [ -d /etc/wanpipe/smg_ctrl.d ]; then
|
||||
for script in /etc/wanpipe/smg_ctrl.d/*.start; do
|
||||
if [ -x $script ]; then
|
||||
logit "Executing startup script: $script"
|
||||
source $script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function stop_scripts()
|
||||
{
|
||||
if [ -d /etc/wanpipe/smg_ctrl.d ]; then
|
||||
for script in /etc/wanpipe/smg_ctrl.d/*.stop; do
|
||||
if [ -x $script ]; then
|
||||
logit "Executing stop script: $script"
|
||||
source $script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function start_all()
|
||||
{
|
||||
#post_args=$post_args" >/dev/null 2>/dev/null &"
|
||||
|
@ -241,6 +277,9 @@ function start_all()
|
|||
ret=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
start_scripts
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
|
@ -250,14 +289,17 @@ function start_sigd()
|
|||
pre_args="";
|
||||
post_args="";
|
||||
echo " "
|
||||
echo "Starting processes..."
|
||||
if [ $use_safe -eq 1 ]; then
|
||||
logit "Starting smg_ctrl in safe mode ..."
|
||||
fi
|
||||
logit "Starting processes..."
|
||||
echo -n "Loading SCTP..."
|
||||
eval "modprobe sctp >>$LOG 2>>$LOG"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
echo "Failed to load SCTP module, check $LOG"
|
||||
logit "Failed"
|
||||
logit "Failed to load SCTP module, check $LOG"
|
||||
return 1;
|
||||
fi
|
||||
sleep 1
|
||||
|
@ -266,8 +308,8 @@ function start_sigd()
|
|||
if [ $? -ne 0 ]; then
|
||||
eval "ls /dev/wanpipe* >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No Sangoma TDM API interfaces running"
|
||||
echo "Did you start wanrouter? "
|
||||
logit "No Sangoma TDM API interfaces running"
|
||||
logit "Did you start wanrouter? "
|
||||
return 1;
|
||||
fi
|
||||
fi
|
||||
|
@ -288,24 +330,24 @@ function start_sigd()
|
|||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
echo "Failed to start $sigd, check $SIG_LOG for errors"
|
||||
logit "Failed"
|
||||
logit "Failed to start $sigd, check $SIG_LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
sleep 2
|
||||
if [ ! $(pidof $sigd) ]; then
|
||||
echo "$sigd failed to start"
|
||||
echo "check $SIG_LOG for errors"
|
||||
logit "$sigd failed to start"
|
||||
logit "check $SIG_LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
sleep 3
|
||||
if [ "$xtraargs" = "sigdonly" ]; then
|
||||
|
||||
echo "Sangoma $sigd running.."
|
||||
logit "Sangoma $sigd running.."
|
||||
if [ $use_syslog -eq 1 ]; then
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
else
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
fi
|
||||
echo " "
|
||||
fi
|
||||
|
@ -314,7 +356,6 @@ function start_sigd()
|
|||
}
|
||||
function start_smg()
|
||||
{
|
||||
#check_sigd_running
|
||||
check_smg_running
|
||||
pre_args="";
|
||||
post_args="";
|
||||
|
@ -327,7 +368,7 @@ function start_smg()
|
|||
fi
|
||||
|
||||
if [ -e /etc/wanpipe/.no_smg_load ]; then
|
||||
echo "Skipping sangoma_mgd..."
|
||||
logit "Skipping sangoma_mgd..."
|
||||
return 0;
|
||||
fi
|
||||
|
||||
|
@ -336,23 +377,23 @@ function start_smg()
|
|||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
echo "Failed to start sangoma_mgd, check $LOG for errors"
|
||||
logit "Failed"
|
||||
logit "Failed to start sangoma_mgd, check $LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
if [ ! $(pidof sangoma_mgd) ]; then
|
||||
echo "sangoma_mgd failed to start"
|
||||
echo "check $LOG for errors"
|
||||
logit "sangoma_mgd failed to start"
|
||||
logit "check $LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
echo "Sangoma SMG running.."
|
||||
if [ $use_syslog -eq 1 ]; then
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
else
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
fi
|
||||
echo " "
|
||||
|
||||
|
@ -367,10 +408,13 @@ function check_sigd_running()
|
|||
eval "pidof $sigd 2> /dev/null > /dev/null"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "$sigd is currently running"
|
||||
echo "exiting..."
|
||||
logit "$sigd is currently running"
|
||||
logit "exiting..."
|
||||
exit 0
|
||||
fi
|
||||
if [ -e /var/run/$sigd.pid ];then
|
||||
eval "rm -f /var/run/$sigd.pid >/dev/null 2>/dev/null";
|
||||
fi
|
||||
return 0
|
||||
|
||||
}
|
||||
|
@ -381,13 +425,10 @@ function check_smg_running()
|
|||
eval "pidof sangoma_mgd 2> /dev/null > /dev/null"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "sangoma_mgd is currently running"
|
||||
echo "exiting..."
|
||||
logit "sangoma_mgd is currently running"
|
||||
logit "exiting..."
|
||||
exit 0
|
||||
fi
|
||||
if [ -e /var/run/$sigd.pid ];then
|
||||
eval "rm -f /var/run/$sigd.pid >/dev/null 2>/dev/null";
|
||||
fi
|
||||
if [ -e /var/run/sangoma_mgd.pid ];then
|
||||
eval "rm -f /var/run/sangoma_mgd.pid >/dev/null 2>/dev/null";
|
||||
fi
|
||||
|
@ -397,7 +438,7 @@ function check_smg_running()
|
|||
function check_pid_sigd()
|
||||
{
|
||||
if [ ! $(pidof $sigd) ]; then
|
||||
echo "$sigd is not running"
|
||||
logit "$sigd is not running"
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
|
@ -410,9 +451,9 @@ function toggle_capture()
|
|||
eval "kill -SIGRTMIN+2 $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Protocol capture toggled"
|
||||
logit "BRI: Protocol capture toggled"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -423,13 +464,13 @@ function increase_verbose()
|
|||
local rc
|
||||
check_pid_sigd
|
||||
SIG_VAL=`kill -l SIGRTMIN`
|
||||
echo "signal: $SIG_VAL"
|
||||
logit "signal: $SIG_VAL"
|
||||
eval "kill -SIGRTMIN $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Verbosity increased"
|
||||
logit "BRI: Verbosity increased"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -442,9 +483,9 @@ function decrease_verbose()
|
|||
eval "kill -SIGRTMIN+1 $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Verbosity decreased"
|
||||
logit "BRI: Verbosity decreased"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -457,9 +498,9 @@ function show_calls()
|
|||
eval "kill -SIGRTMIN+3 $(pidof $sigd) "
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Show calls"
|
||||
logit "BRI: Show calls"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -472,9 +513,9 @@ function show_spans()
|
|||
eval "kill -SIGRTMIN+4 $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Show spans"
|
||||
logit "BRI: Show spans"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -507,7 +548,7 @@ read_smg_conf ()
|
|||
if [ -f $META_SMG_CONF ]
|
||||
then . $META_SMG_CONF
|
||||
else
|
||||
echo " $META_SMG_CONF not found !!!!"
|
||||
logit " $META_SMG_CONF not found !!!!"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
|
@ -520,6 +561,8 @@ SANGOMA_PRID=
|
|||
SANGOMA_BRID=
|
||||
SANGOMA_SS7ISUP=
|
||||
SANGOMA_MEDIA_GATEWAY=
|
||||
SANGOMA_SS7BOOST=
|
||||
SANGOMA_SAFE_MODE=
|
||||
}
|
||||
######################
|
||||
#main start here
|
||||
|
@ -529,22 +572,21 @@ parse_args
|
|||
init_smg_conf
|
||||
read_smg_conf
|
||||
#Set sigd
|
||||
if [ $SANGOMA_PRID = "YES" ]; then
|
||||
if [ "$SANGOMA_PRID" = "YES" ]; then
|
||||
sigd="sangoma_prid"
|
||||
elif [ $SANGOMA_BRID = "YES" ]; then
|
||||
elif [ "$SANGOMA_BRID" = "YES" ]; then
|
||||
sigd="sangoma_brid"
|
||||
elif [ $SANGOMA_PRID = "YES" ]; then
|
||||
sigd="sangoma_prid"
|
||||
elif [ $SANGOMA_SS7ISUP = "YES" ]; then
|
||||
elif [ "$SANGOMA_SS7ISUP" = "YES" ]; then
|
||||
sigd="sangoma_isupd"
|
||||
elif [ $SANGOMA_SS7BOOST = "YES" ]; then
|
||||
elif [ "$SANGOMA_SS7BOOST" = "YES" ]; then
|
||||
sigd="ss7boost"
|
||||
else
|
||||
echo "Failed to specify sigd!!! check $META_SMG_CONF "
|
||||
logit "Failed to specify sigd!!! check $META_SMG_CONF "
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $SANGOMA_MEDIA_GATEWAY = "NO" ]; then
|
||||
xtraargs="sigdonly"
|
||||
fi
|
||||
|
@ -560,7 +602,7 @@ if [ $sigd = "ss7boost" ] || [ $sigd = "sangoma_isupd" ]; then
|
|||
eval "type $sigd 2> /dev/null > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Error $sigd is not found"
|
||||
logit "Error $sigd is not found"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
@ -587,6 +629,10 @@ done
|
|||
|
||||
ret=0
|
||||
|
||||
if [ "$cmd" = "start" ] && [ "$SANGOMA_SAFE_MODE" = "YES" ]; then
|
||||
cmd="safe_start"
|
||||
fi
|
||||
|
||||
if [ "$cmd" = "start" ]; then
|
||||
start_all
|
||||
ret=$?
|
||||
|
@ -606,14 +652,17 @@ elif [ "$cmd" = "stop" ]; then
|
|||
ret=$?
|
||||
elif [ "$cmd" = "restart" ]; then
|
||||
stop_all
|
||||
if [ "$SANGOMA_SAFE_MODE" = "YES" ]; then
|
||||
use_safe=1
|
||||
fi
|
||||
start_all
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
stop_all
|
||||
fi
|
||||
ret=$?
|
||||
else
|
||||
if [ $SS7 -eq 1 ]; then
|
||||
echo "Error: Unsupported command $cmd for SS7"
|
||||
logit "Error: Unsupported command $cmd for SS7"
|
||||
echo
|
||||
usage
|
||||
exit 1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -39,6 +39,9 @@ ifndef DESTDIR
|
|||
endif
|
||||
endif
|
||||
|
||||
SAFE_D=/etc/wanpipe/safe_sangoma.d
|
||||
SMGCTRL_D=/etc/wanpipe/smg_ctrl.d
|
||||
|
||||
INCLUDES = -I ../../ssmg/libsangoma.trunk -I. -I ../../patches/kdrivers/include -I ../../patches/kdrivers/wanec/oct6100_api/include -I ../../patches/kdrivers/wanec -I/usr/local/include -I../../patches/kdrivers/include -I/usr/include/wanpipe -Ilib/libteletone/src
|
||||
|
||||
CFLAGS = -D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -O6
|
||||
|
@ -91,12 +94,15 @@ sangoma_mgd_memdbg.o: sangoma_mgd_memdbg.c sangoma_mgd_memdbg.h
|
|||
sangoma_mgd_logger.o: sangoma_mgd_logger.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sangoma_mgd_logger.o sangoma_mgd_logger.c
|
||||
|
||||
sangoma_mgd_ip_bridge.o: sangoma_mgd_ip_bridge.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sangoma_mgd_ip_bridge.o sangoma_mgd_ip_bridge.c
|
||||
|
||||
sangoma_mgd.o: sangoma_mgd.c sangoma_mgd.h sigboost.h
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sangoma_mgd.o sangoma_mgd.c
|
||||
|
||||
sangoma_mgd: sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o call_signal.o switch_buffer.o sigboost.h sangoma_mgd_memdbg.h
|
||||
sangoma_mgd: sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o sangoma_mgd_ip_bridge.o call_signal.o switch_buffer.o sigboost.h sangoma_mgd_memdbg.h
|
||||
rm -fr core*
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -o sangoma_mgd sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o switch_buffer.o call_signal.o $(LDFLAGS)
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -o sangoma_mgd sangoma_mgd.o sangoma_mgd_memdbg.o sangoma_mgd_logger.o sangoma_mgd_ip_bridge.o switch_buffer.o call_signal.o $(LDFLAGS)
|
||||
|
||||
|
||||
|
||||
|
@ -108,7 +114,7 @@ clean: old_cleanup
|
|||
distclean: clean
|
||||
@echo OK
|
||||
|
||||
install: all install_smg
|
||||
install: all install_smg old_cleanup
|
||||
|
||||
install_smg: old_cleanup
|
||||
install -D -m 755 sangoma_mgd $(DESTDIR)/usr/sbin/sangoma_mgd
|
||||
|
@ -117,8 +123,17 @@ install_smg: old_cleanup
|
|||
fi
|
||||
|
||||
install -D -m 755 ./safe_sangoma $(DESTDIR)/usr/sbin/safe_sangoma
|
||||
install -D -m 755 ./rc/safe_sangoma.rc $(DESTDIR)/etc/wanpipe/safe_sangoma.rc
|
||||
install -D -m 755 ./smg_ctrl $(DESTDIR)/usr/sbin/smg_ctrl
|
||||
|
||||
@if [ ! -d ${SAFE_D} ]; then \
|
||||
mkdir -p ${SAFE_D}; \
|
||||
fi
|
||||
@if [ ! -d ${SMGCTRL_D} ]; then \
|
||||
mkdir -p ${SMGCTRL_D}; \
|
||||
fi
|
||||
|
||||
|
||||
ifeq "${PRI}" "YES"
|
||||
@echo "PRI control scripts installed"
|
||||
@if [ ! -e $(DESTDIR)/etc/sangoma_mgd.conf ]; then \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/app
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -120,23 +120,24 @@ static int smg_event_dbg=SMG_LOG_BOOST;
|
|||
static void clog_print_event_call(call_signal_connection_t *mcon,call_signal_event_t *event, int priority, int dir)
|
||||
{
|
||||
clog_printf((event->event_id==SIGBOOST_EVENT_HEARTBEAT)?SMG_LOG_DEBUG_CALL:smg_event_dbg, mcon->log,
|
||||
"%s EVENT (%s): %s:(%X) [w%dg%d] CSid=%i Seq=%i Cn=[%s] Cd=[%s] Ci=[%s]\n",
|
||||
"%s EVENT (%s): %s:(%X) [s%dc%d] Tg=%i CSid=%i Seq=%i Cn=[%s] Cd=[%s] Ci=[%s]\n",
|
||||
dir ? "TX":"RX",
|
||||
priority ? "P":"N",
|
||||
call_signal_event_id_name(event->event_id),
|
||||
event->event_id,
|
||||
event->span+1,
|
||||
event->chan+1,
|
||||
event->trunk_group,
|
||||
event->call_setup_id,
|
||||
event->fseqno,
|
||||
strlen(event->calling_name)?event->calling_name:"N/A",
|
||||
strlen(event->calling_name)?event->calling_name:"N/A",
|
||||
(event->called_number_digits_count ? (char *) event->called_number_digits : "N/A"),
|
||||
(event->calling_number_digits_count ? (char *) event->calling_number_digits : "N/A"));
|
||||
}
|
||||
static void clog_print_event_short(call_signal_connection_t *mcon,short_signal_event_t *event, int priority, int dir)
|
||||
{
|
||||
clog_printf((event->event_id==SIGBOOST_EVENT_HEARTBEAT)?SMG_LOG_DEBUG_CALL:smg_event_dbg, mcon->log,
|
||||
"%s EVENT (%s): %s:(%X) [w%dg%d] Rc=%i CSid=%i Seq=%i \n",
|
||||
"%s EVENT (%s): %s:(%X) [s%dc%d] Rc=%i CSid=%i Seq=%i \n",
|
||||
dir ? "TX":"RX",
|
||||
priority ? "P":"N",
|
||||
call_signal_event_id_name(event->event_id),
|
||||
|
|
|
@ -1 +1 @@
|
|||
0
|
||||
2
|
||||
|
|
|
@ -1 +1 @@
|
|||
1
|
||||
0
|
||||
|
|
|
@ -1 +1 @@
|
|||
1
|
||||
0
|
||||
|
|
|
@ -6,169 +6,591 @@ cw_cli_entry /usr/src/asterisk/include/callweaver/cli.h .cw_cli_entry_check
|
|||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/asterisk/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/asterisk/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/.version .ast16_check
|
||||
1.4 /usr/src/asterisk/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/asterisk/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/asterisk/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/asterisk/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/asterisk/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/.version .ast16_check
|
||||
1.4 /usr/src/asterisk/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/asterisk/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/asterisk/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/asterisk/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/asterisk/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/.version .ast16_check
|
||||
1.4 /usr/src/asterisk/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/asterisk/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/asterisk/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/asterisk/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/asterisk/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/asterisk/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/.version .ast16_check
|
||||
1.4 /usr/src/asterisk/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/.version .ast14_check
|
||||
1.6 /usr/src/asterisk/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/asterisk/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/frame.h .ast_src_check
|
||||
AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/asterisk/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/asterisk/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/asterisk/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/asterisk/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/asterisk/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/.version .ast16_check
|
||||
1.4 /usr/src/asterisk/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/.version .ast14_check
|
||||
1.6 /usr/src/asterisk/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/asterisk/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/asterisk/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/asterisk/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/asterisk/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/asterisk/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/asterisk/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/asterisk/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/.version .ast16_check
|
||||
1.4 /usr/src/asterisk/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/.version .ast14_check
|
||||
1.6 /usr/src/asterisk/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/asterisk/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/asterisk/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/asterisk/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.1/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/version.h .ast16_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/version.h .ast14_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/frame.h .ast_src_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.9/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.9/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.9/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/version.h .ast16_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.9/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/version.h .ast14_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.9/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.9/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/version.h .ast16_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.9/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.9/include/asterisk/version.h .ast14_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.9/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/.version
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.22/.version
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/.version
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.22/.version
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.22/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.4/asterisk-1.4.22/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.22/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.22/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.22/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.22/include/asterisk/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.21/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.21/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.21/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.21/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.21/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.21/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.21/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.1/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.1/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.1/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.1/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.6/asterisk-1.6.0-rc5/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .opbx_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.1/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16//include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.1/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.1/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/cli.h .cw_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.1/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
MODULE_INFO /usr/src/ast1.6/asterisk-1.6.0-rc5/include/callweaver/module.h .cw_module_info_check
|
||||
echo 0 .cw_module_info_check
|
||||
1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast16_check
|
||||
1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.6/asterisk-1.6.0-rc5/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.1/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.1/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.1/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.1/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/aste/frame.h .ast_src_check
|
||||
echo 0 .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/aste/cli.h .opbx_cli_entry_check
|
||||
echo 0 .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/aste/cli.h .cw_cli_entry_check
|
||||
echo 0 .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/aste/.version .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.2/aste/.version .ast14_check
|
||||
echo 0 .ast14_check
|
||||
1.6 /usr/src/ast1.2/aste/version.h .ast16_check
|
||||
echo 0 .ast16_check
|
||||
1.4 /usr/src/ast1.2/aste/version.h .ast14_check
|
||||
echo 0 .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/.version .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/.version .ast14_check
|
||||
1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.2/asterisk-1.2.16/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
grep -c AST_CONTROL_SRC /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/frame.h .ast_src_check
|
||||
opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
grep -c opbx_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .opbx_cli_entry_check
|
||||
cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
grep -c cw_cli_entry /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/cli.h .cw_cli_entry_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/.version .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/.version .ast14_check
|
||||
1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
grep -c 1.6 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast16_check
|
||||
1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
grep -c 1.4 /usr/src/ast1.4/asterisk-1.4.11/include/asterisk/version.h .ast14_check
|
||||
|
|
|
@ -1 +1 @@
|
|||
/usr/src/ast1.6/asterisk-1.6.0-rc5
|
||||
/usr/src/ast1.4/asterisk-1.4.11
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 36
|
||||
/svn/chan_woomera/!svn/ver/119/trunk
|
||||
/svn/chan_woomera/!svn/ver/132/trunk
|
||||
END
|
||||
chan_woomera.c
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 51
|
||||
/svn/chan_woomera/!svn/ver/119/trunk/chan_woomera.c
|
||||
/svn/chan_woomera/!svn/ver/132/trunk/chan_woomera.c
|
||||
END
|
||||
g711.h
|
||||
K 25
|
||||
|
@ -31,7 +31,7 @@ woomera.conf
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 49
|
||||
/svn/chan_woomera/!svn/ver/118/trunk/woomera.conf
|
||||
/svn/chan_woomera/!svn/ver/120/trunk/woomera.conf
|
||||
END
|
||||
README
|
||||
K 25
|
||||
|
@ -43,5 +43,5 @@ Makefile
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 45
|
||||
/svn/chan_woomera/!svn/ver/111/trunk/Makefile
|
||||
/svn/chan_woomera/!svn/ver/131/trunk/Makefile
|
||||
END
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
8
|
||||
|
||||
dir
|
||||
119
|
||||
132
|
||||
https://www.sangomapbx.com/svn/chan_woomera/trunk
|
||||
https://www.sangomapbx.com/svn/chan_woomera
|
||||
|
||||
|
||||
|
||||
2009-09-17T21:28:42.285967Z
|
||||
119
|
||||
2009-11-24T19:36:41.606843Z
|
||||
132
|
||||
ncorbic
|
||||
|
||||
|
||||
|
@ -32,10 +32,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-17T21:01:12.000000Z
|
||||
110d2fbba4c604cf87f486ed8c7896e8
|
||||
2009-09-17T21:28:42.285967Z
|
||||
119
|
||||
2009-11-24T17:28:53.000000Z
|
||||
7bdc932da3a3126573c89270e83dce46
|
||||
2009-11-24T19:36:41.606843Z
|
||||
132
|
||||
ncorbic
|
||||
|
||||
g711.h
|
||||
|
@ -44,7 +44,7 @@ file
|
|||
|
||||
|
||||
|
||||
2009-04-09T17:34:03.000000Z
|
||||
2009-04-30T20:22:39.000000Z
|
||||
0f725f95ced42af15dcaef21f3a1722b
|
||||
2007-09-21T20:29:00.887216Z
|
||||
1
|
||||
|
@ -68,7 +68,7 @@ file
|
|||
|
||||
|
||||
|
||||
2009-04-14T16:12:53.000000Z
|
||||
2009-04-30T20:22:39.000000Z
|
||||
0eb3ff60c8a8a748512ad6fe7c3fec5f
|
||||
2009-04-14T01:12:18.691621Z
|
||||
109
|
||||
|
@ -81,10 +81,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-17T21:01:12.000000Z
|
||||
be929ca884ac67db1fcdc85c4e5384fb
|
||||
2009-09-17T21:27:40.731828Z
|
||||
118
|
||||
2009-09-22T21:58:45.000000Z
|
||||
c71ba29fb7105eedc3e595ac81ba0feb
|
||||
2009-09-22T22:50:21.147301Z
|
||||
120
|
||||
ncorbic
|
||||
|
||||
README
|
||||
|
@ -93,7 +93,7 @@ file
|
|||
|
||||
|
||||
|
||||
2009-04-09T17:34:03.000000Z
|
||||
2009-04-30T20:22:39.000000Z
|
||||
6b44396eddae33cda9cdb078e5030a1f
|
||||
2007-10-30T20:04:39.055688Z
|
||||
14
|
||||
|
@ -105,9 +105,9 @@ file
|
|||
|
||||
|
||||
|
||||
2009-04-22T18:22:56.000000Z
|
||||
699049f068b9ca61569cc469cb8c7ad4
|
||||
2009-04-22T20:06:05.265796Z
|
||||
111
|
||||
2009-11-18T18:14:42.000000Z
|
||||
e7faa935e11b7d4a3f56e343db47befd
|
||||
2009-11-18T20:20:28.099174Z
|
||||
131
|
||||
ncorbic
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
################################################################################
|
||||
|
||||
ifndef PBXDIR
|
||||
PBXDIR=/usr/src/asterisk
|
||||
PBXDIR=/usr/include/asterisk
|
||||
ifneq (,$(wildcard ./.pbxdir))
|
||||
PBXDIR=$(shell cat .pbxdir)
|
||||
endif
|
||||
|
@ -28,8 +28,25 @@ PBXCFGDIR=/etc/asterisk
|
|||
PBXDEFINES=
|
||||
PBXFLAGS_EXTRA=
|
||||
|
||||
|
||||
#Check if PBXDIR is asterisk source or include
|
||||
|
||||
INCDIR=$(PBXDIR)
|
||||
INCLUDES=
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/asterisk/frame.h))
|
||||
INCLUDES= -I$(PBXDIR) -I$(PBXDIR)/include
|
||||
INCDIR=$(PBXDIR)/include/asterisk
|
||||
endif
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver/cli.h))
|
||||
INCLUDES= -I/$(PBXDIR) -I$(PBXDIR)/include
|
||||
INCDIR=$(PBXDIR)/include/callweaver
|
||||
endif
|
||||
|
||||
|
||||
|
||||
#Check for Asterisk AST_CONTROL_SRC feature
|
||||
DUMMY:=$(shell ./check_for.sh AST_CONTROL_SRC $(PBXDIR)/include/asterisk/frame.h .ast_src_check;)
|
||||
DUMMY:=$(shell ./check_for.sh AST_CONTROL_SRC $(INCDIR)/frame.h .ast_src_check;)
|
||||
|
||||
ifeq (1,$(shell cat .ast_src_check))
|
||||
PBXDEFINES+=-DWOO_CONTROL_SRC_FEATURE
|
||||
|
@ -37,7 +54,7 @@ endif
|
|||
|
||||
|
||||
#Check for Callweaver opbx_cli_entry
|
||||
DUMMY:=$(shell ./check_for.sh opbx_cli_entry $(PBXDIR)/include/callweaver/cli.h .opbx_cli_entry_check;)
|
||||
DUMMY:=$(shell ./check_for.sh opbx_cli_entry $(INCDIR)/cli.h .opbx_cli_entry_check;)
|
||||
|
||||
ifneq (0,$(shell cat .opbx_cli_entry_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_OPBX_CLI_ENTRY
|
||||
|
@ -45,31 +62,31 @@ endif
|
|||
|
||||
|
||||
#Check for callweaver cw_cli_entry
|
||||
DUMMY:=$(shell ./check_for.sh cw_cli_entry $(PBXDIR)/include/callweaver/cli.h .cw_cli_entry_check;)
|
||||
DUMMY:=$(shell ./check_for.sh cw_cli_entry $(INCDIR)/cli.h .cw_cli_entry_check;)
|
||||
|
||||
ifneq (0,$(shell cat .cw_cli_entry_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_CW_CLI_ENTRY
|
||||
endif
|
||||
|
||||
|
||||
#Check for callweaver MODULE_INFO
|
||||
DUMMY:=$(shell ./check_for.sh MODULE_INFO $(PBXDIR)/include/callweaver/module.h .cw_module_info_check;)
|
||||
|
||||
ifneq (0,$(shell cat .cw_module_info_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_MODULE_INFO
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver/cwobj.h))
|
||||
ifneq (,$(wildcard $(INCDIR)/cwobj.h))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_CWOBJ
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver.h))
|
||||
ifneq (,$(wildcard $(INCDIR)/../callweaver.h))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER -DHAVE_CONFIG_H
|
||||
PBXMODDIR=/usr/local/lib/callweaver/modules
|
||||
PBXCFGDIR=/usr/local/etc/callweaver
|
||||
|
||||
#Check for callweaver MODULE_INFO
|
||||
DUMMY:=$(shell ./check_for.sh MODULE_INFO $(INCDIR)/module.h .cw_module_info_check;)
|
||||
|
||||
ifneq (0,$(shell cat .cw_module_info_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_MODULE_INFO
|
||||
endif
|
||||
|
||||
|
||||
else
|
||||
|
||||
#Check for Asterisk 1.6
|
||||
|
@ -82,6 +99,18 @@ DUMMY:=$(shell ./check_for.sh 1.4 $(PBXDIR)/.version .ast14_check;)
|
|||
ifneq (0,$(shell cat .ast14_check))
|
||||
PBXFLAGS_EXTRA+=-DAST14
|
||||
endif
|
||||
|
||||
DUMMY:=$(shell ./check_for.sh 1.6 $(INCDIR)/version.h .ast16_check;)
|
||||
ifneq (0,$(shell cat .ast16_check))
|
||||
PBXFLAGS_EXTRA+=-DAST16
|
||||
endif
|
||||
|
||||
DUMMY:=$(shell ./check_for.sh 1.4 $(INCDIR)/version.h .ast14_check;)
|
||||
ifneq (0,$(shell cat .ast14_check))
|
||||
PBXFLAGS_EXTRA+=-DAST14
|
||||
endif
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
@ -90,14 +119,13 @@ PBXFLAGS_EXTRA+= -DAST_MODULE=\"chan_woomera\"
|
|||
|
||||
CC = gcc
|
||||
|
||||
INCLUDES= -I/usr/include -I./
|
||||
|
||||
CFLAGS = -D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -O6
|
||||
CCFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -g
|
||||
LDFLAGS=-L lib/libteletone/.libs -L. -L/usr/local/lib -L ../../ssmg/libsangoma.trunk/.libs -lpthread -lsangoma -lm
|
||||
|
||||
|
||||
PBXFLAGS= $(INCLUDES) -I$(PBXDIR) -I$(PBXDIR)/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Iinclude -I../include -D_REENTRANT -DWOOMERA_CHAN_NAME=\"$(CHAN_NAME)\" -D_GNU_SOURCE $(PBXDEFINES) -O6 -fomit-frame-pointer -fPIC
|
||||
PBXFLAGS= $(INCLUDES) -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -D_REENTRANT -DWOOMERA_CHAN_NAME=\"$(CHAN_NAME)\" -D_GNU_SOURCE $(PBXDEFINES) -O6 -fomit-frame-pointer -fPIC
|
||||
|
||||
|
||||
all: chan_woomera.so
|
||||
|
|
|
@ -14,6 +14,32 @@
|
|||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License
|
||||
* =============================================
|
||||
* v1.60 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 22 2009
|
||||
* Added Woomera No Answer feature for calling cards.
|
||||
*
|
||||
* v1.59 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 16 2009
|
||||
* Bug fix in woomera profile verbose introduced in 1.58
|
||||
*
|
||||
* v1.58 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 10 2009
|
||||
* Added verbosity per profile.
|
||||
* Updated cli commands
|
||||
*
|
||||
* v1.57 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 10 2009
|
||||
* Fixed global set flag. When one profile goes down it shuts down
|
||||
* all calls.
|
||||
*
|
||||
* v1.56 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Oct 29 2009
|
||||
* Fixed the call incoming call problem on second profile
|
||||
*
|
||||
* v1.55 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Sep 22 2009
|
||||
* Updated udp base port to 20000 and numbe of ports to 5000
|
||||
*
|
||||
* v1.54 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Sep 16 2009
|
||||
* Added Progress Messages
|
||||
|
@ -247,6 +273,9 @@
|
|||
* from CLI.
|
||||
*/
|
||||
|
||||
#if !defined(CALLWEAVER)
|
||||
#include "asterisk.h"
|
||||
#endif
|
||||
|
||||
#if defined(CALLWEAVER) && defined(HAVE_CONFIG_H)
|
||||
#include "confdefs.h"
|
||||
|
@ -296,7 +325,7 @@
|
|||
#include "asterisk/musiconhold.h"
|
||||
#include "asterisk/transcap.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.60 $")
|
||||
|
||||
#else
|
||||
|
||||
|
@ -347,7 +376,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
|||
#define CALLWEAVER_19 1
|
||||
#endif
|
||||
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.60 $")
|
||||
|
||||
#if defined(DSP_FEATURE_FAX_CNG_DETECT)
|
||||
#undef DSP_FEATURE_FAX_DETECT
|
||||
|
@ -654,7 +683,7 @@ CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
|||
|
||||
extern int option_verbose;
|
||||
|
||||
#define WOOMERA_VERSION "v1.54"
|
||||
#define WOOMERA_VERSION "v1.60"
|
||||
#ifndef WOOMERA_CHAN_NAME
|
||||
#define WOOMERA_CHAN_NAME "SS7"
|
||||
#endif
|
||||
|
@ -677,8 +706,6 @@ static const char desc[] = "Woomera Channel Driver";
|
|||
//static const char type[] = "WOOMERA";
|
||||
static const char tdesc[] = "Woomera Channel Driver";
|
||||
static char configfile[] = "woomera.conf";
|
||||
static char smgversion_init=0;
|
||||
static char smgversion[100] = "N/A";
|
||||
|
||||
static char mohinterpret[MAX_MUSICCLASS] = "default";
|
||||
static char mohsuggest[MAX_MUSICCLASS] = "";
|
||||
|
@ -725,11 +752,11 @@ static struct ast_jb_conf global_jbconf;
|
|||
#define WOOMERA_ULAW 1
|
||||
#define WOOMERA_ALAW 2
|
||||
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 899
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 5000
|
||||
|
||||
#define WOOMERA_STRLEN 256
|
||||
#define WOOMERA_ARRAY_LEN 50
|
||||
#define WOOMERA_MIN_PORT 10000
|
||||
#define WOOMERA_MIN_PORT 20000
|
||||
#define WOOMERA_MAX_PORT WOOMERA_MIN_PORT+WOOMERA_MAX_MEDIA_PORTS
|
||||
#define WOOMERA_BODYLEN 2048
|
||||
#define WOOMERA_LINE_SEPARATOR "\r\n"
|
||||
|
@ -766,7 +793,6 @@ static int woomera_max_media_port = WOOMERA_MAX_PORT;
|
|||
})
|
||||
#endif
|
||||
|
||||
|
||||
#define FRAME_LEN 480
|
||||
|
||||
#if 0
|
||||
|
@ -875,12 +901,12 @@ struct woomera_profile {
|
|||
float txgain_val;
|
||||
unsigned char rxgain[256];
|
||||
unsigned char txgain[256];
|
||||
int call_out;
|
||||
int call_in;
|
||||
int call_ok;
|
||||
int call_end;
|
||||
int call_abort;
|
||||
int call_ast_hungup;
|
||||
unsigned int call_out;
|
||||
unsigned int call_in;
|
||||
unsigned int call_ok;
|
||||
unsigned int call_end;
|
||||
unsigned int call_abort;
|
||||
unsigned int call_ast_hungup;
|
||||
char default_context[WOOMERA_STRLEN];
|
||||
char* tg_context [WOOMERA_MAX_TRUNKGROUPS+1];
|
||||
char language[WOOMERA_STRLEN];
|
||||
|
@ -889,6 +915,8 @@ struct woomera_profile {
|
|||
int rx_sync_check_opt;
|
||||
int tx_sync_check_opt;
|
||||
int tx_sync_gen_opt;
|
||||
unsigned int verbose;
|
||||
char smgversion[100];
|
||||
};
|
||||
|
||||
|
||||
|
@ -961,6 +989,17 @@ typedef struct woomera_event_queue woomera_event_queue;
|
|||
#endif
|
||||
|
||||
|
||||
static inline int woomera_profile_verbose(woomera_profile *profile)
|
||||
{
|
||||
if (!profile) {
|
||||
/* If profile does not exists then log by default */
|
||||
return 100;
|
||||
}
|
||||
|
||||
return profile->verbose;
|
||||
}
|
||||
|
||||
|
||||
static int my_ast_channel_trylock(struct ast_channel *chan)
|
||||
{
|
||||
#if defined (AST14) || defined (AST16)
|
||||
|
@ -1058,7 +1097,7 @@ AST_MUTEX_DEFINE_STATIC(lock);
|
|||
|
||||
/* local prototypes */
|
||||
static void woomera_close_socket(int *socket);
|
||||
static void global_set_flag(int flags);
|
||||
static void global_set_flag(woomera_profile *profile,int flags);
|
||||
#ifdef WOOMERA_PRINTF_DEBUG
|
||||
static int __woomera_printf(const char* file, int line, woomera_profile *profile, int fd, char *fmt, ...);
|
||||
#else
|
||||
|
@ -1202,14 +1241,16 @@ static int woomera_message_reply_ok(woomera_message *wmsg)
|
|||
}
|
||||
|
||||
|
||||
static void global_set_flag(int flags)
|
||||
static void global_set_flag(woomera_profile * profile, int flags)
|
||||
{
|
||||
private_object *tech_pvt;
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&private_object_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
tech_pvt = iterator;
|
||||
ast_set_flag(tech_pvt, flags);
|
||||
tech_pvt = iterator;
|
||||
if (profile == NULL || tech_pvt->profile == profile ) {
|
||||
ast_set_flag(tech_pvt, flags);
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
}
|
||||
|
@ -1372,7 +1413,7 @@ static int __woomera_printf(woomera_profile *profile, int fd, char *fmt, ...)
|
|||
} else {
|
||||
res=0;
|
||||
if (profile && globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Send Message: {%s} [%s/%d]\n%s\n%s", profile->name, profile->woomera_host, profile->woomera_port, WOOMERA_DEBUG_LINE, stuff);
|
||||
}
|
||||
}
|
||||
|
@ -1540,7 +1581,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
if (res == 0) {
|
||||
sanity++;
|
||||
} else if (res < 0) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "{%s} error during packet retry #%d\n", profile->name, loops);
|
||||
}
|
||||
return res;
|
||||
|
@ -1588,7 +1629,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
next = buf;
|
||||
|
||||
if (globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Receive Message: {%s} [%s/%d]\n%s\n%s", profile->name, profile->woomera_host, profile->woomera_port, WOOMERA_DEBUG_LINE, buf);
|
||||
}
|
||||
}
|
||||
|
@ -1682,7 +1723,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
int terr;
|
||||
terr=read(fd, wmsg->body, (bytes > sizeof(wmsg->body)) ? sizeof(wmsg->body) : bytes);
|
||||
if (globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose("%s\n", wmsg->body);
|
||||
}
|
||||
}
|
||||
|
@ -1690,7 +1731,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
|
||||
if (event_queue && ast_test_flag(wmsg, WFLAG_EVENT)) {
|
||||
if (globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Queue Event: {%s} [%s]\n", profile->name, wmsg->command);
|
||||
}
|
||||
}
|
||||
|
@ -1830,7 +1871,7 @@ retry_activate_again:
|
|||
}
|
||||
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (globals.debug > 1 && option_verbose > 1 && woomera_profile_verbose(tech_pvt->profile) > 1) {
|
||||
ast_log(LOG_ERROR, "Error: %s call connect to TCP/Woomera Server! tpvt=%p: %s\n",
|
||||
ast_test_flag(tech_pvt, TFLAG_OUTBOUND)?"Out":"In",
|
||||
tech_pvt,strerror(errno));
|
||||
|
@ -2102,7 +2143,7 @@ static int tech_init(private_object *tech_pvt, woomera_profile *profile, int fla
|
|||
memcpy(&tech_pvt->jbconf, &global_jbconf, sizeof(struct ast_jb_conf));
|
||||
ast_jb_configure(self, &tech_pvt->jbconf);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 10) {
|
||||
if (globals.debug > 1 && option_verbose > 10 && woomera_profile_verbose(profile) > 10) {
|
||||
ast_log(LOG_NOTICE, "%s: Cfg JitterBuffer (F=%i MS=%li Rs=%li Impl=%s)\n",
|
||||
self->name,
|
||||
tech_pvt->jbconf.flags,
|
||||
|
@ -2182,7 +2223,7 @@ static void tech_destroy(private_object *tech_pvt, struct ast_channel *owner)
|
|||
|
||||
if (tech_pvt->profile && tech_pvt->command_channel > -1) {
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (globals.debug > 1 && option_verbose > 1 && woomera_profile_verbose(tech_pvt->profile) > 1) {
|
||||
ast_log(LOG_NOTICE, "+++DESTROY sent HANGUP %s\n",
|
||||
tech_pvt->callid);
|
||||
}
|
||||
|
@ -2851,7 +2892,7 @@ static void *tech_monitor_thread(void *obj)
|
|||
|
||||
}
|
||||
if (globals.debug > 4) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "CHECK {%s} (%d) %s\n",
|
||||
tech_pvt->profile->name,
|
||||
res,tech_pvt->callid);
|
||||
|
@ -2911,7 +2952,7 @@ static int woomera_locate_socket(woomera_profile *profile, int *woomera_socket)
|
|||
profile->name);
|
||||
|
||||
/* When we establish connection update smg version */
|
||||
smgversion_init=0;
|
||||
profile->smgversion[0]='\0';
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
|
@ -2940,6 +2981,7 @@ static int woomera_locate_socket(woomera_profile *profile, int *woomera_socket)
|
|||
profile->name,__FUNCTION__,__LINE__);
|
||||
if (*woomera_socket > -1) {
|
||||
woomera_close_socket(woomera_socket);
|
||||
profile->smgversion[0]='\0';
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -3037,7 +3079,7 @@ static void *woomera_thread_run(void *obj)
|
|||
woomera_close_socket(&woomera_socket);
|
||||
profile->woomera_socket=-1;
|
||||
}
|
||||
global_set_flag(TFLAG_ABORT);
|
||||
global_set_flag(profile,TFLAG_ABORT);
|
||||
if (globals.panic > 2) {
|
||||
break;
|
||||
}
|
||||
|
@ -3128,7 +3170,7 @@ static void *woomera_thread_run(void *obj)
|
|||
}
|
||||
}
|
||||
if(globals.debug > 4) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Main Thread {%s} Select Return %d\n", profile->name, res);
|
||||
}
|
||||
}
|
||||
|
@ -3176,7 +3218,7 @@ static int launch_tech_thread(private_object *tech_pvt)
|
|||
int result = 0;
|
||||
|
||||
if (globals.debug > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++LAUCN TECH THREAD\n");
|
||||
}
|
||||
}
|
||||
|
@ -3364,8 +3406,11 @@ static int config_woomera(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
default_context_set = 0;
|
||||
strncpy(profile->name, entry, sizeof(profile->name) - 1);
|
||||
profile->coding=AST_FORMAT_SLINEAR;
|
||||
profile->verbose=100;
|
||||
profile->smgversion[0]='\0';
|
||||
|
||||
/*default is inbound and outbound enabled */
|
||||
ast_set_flag(profile, PFLAG_INBOUND | PFLAG_OUTBOUND);
|
||||
|
@ -3669,11 +3714,10 @@ static int connect_woomera(int *new_socket, woomera_profile *profile, int flags)
|
|||
if (globals.debug > 2) {
|
||||
ast_log(LOG_NOTICE, "Woomera Got HELLO on connect! %s SMG Version %s\n", profile->name,woomera_message_header(&wmsg, "Version"));
|
||||
}
|
||||
if (!smgversion_init && woomera_message_header(&wmsg, "Version")) {
|
||||
smgversion_init=1;
|
||||
strncpy(smgversion,
|
||||
if (profile->smgversion[0] == '\0' && woomera_message_header(&wmsg, "Version")) {
|
||||
strncpy(profile->smgversion,
|
||||
woomera_message_header(&wmsg, "Version"),
|
||||
sizeof(smgversion)-1);
|
||||
sizeof(profile->smgversion)-1);
|
||||
}
|
||||
|
||||
audio_format = woomera_message_header(&wmsg, "Raw-Format");
|
||||
|
@ -3717,28 +3761,6 @@ static int connect_woomera(int *new_socket, woomera_profile *profile, int flags)
|
|||
return *new_socket;
|
||||
}
|
||||
|
||||
static int init_woomera(void)
|
||||
{
|
||||
woomera_profile *profile;
|
||||
ast_mutex_lock(&lock);
|
||||
|
||||
if (!config_woomera()) {
|
||||
ast_mutex_unlock(&lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
profile = iterator;
|
||||
if (!ast_test_flag(profile, PFLAG_DISABLED)) {
|
||||
launch_woomera_thread(profile);
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
ast_mutex_unlock(&lock);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct ast_channel *woomera_new(const char *type, int format,
|
||||
void *data, int *cause,
|
||||
|
@ -3845,10 +3867,8 @@ static struct ast_channel *tech_requester(const char *type, int format, void *da
|
|||
|
||||
ast_set_flag(tech_pvt, TFLAG_PBX); /* so we know we dont have to free the channel ourselves */
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++REQ %s\n", chan->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 8) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++REQ %s\n", chan->name);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -3872,10 +3892,8 @@ static int tech_send_digit(struct ast_channel *self, char digit)
|
|||
private_object *tech_pvt = self->tech_pvt;
|
||||
int res = 0;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++DIGIT %s '%c'\n",self->name, digit);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++DIGIT %s '%c'\n",self->name, digit);
|
||||
}
|
||||
|
||||
/* we don't have time to make sure the dtmf command is successful cos asterisk again
|
||||
|
@ -4000,7 +4018,7 @@ static int tech_call(struct ast_channel *self, char *dest, int timeout)
|
|||
|
||||
if (profile->max_calls) {
|
||||
if (profile->call_count >= profile->max_calls) {
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_log(LOG_ERROR, "This profile is at call limit of %d\n",
|
||||
profile->max_calls);
|
||||
}
|
||||
|
@ -4043,7 +4061,7 @@ static int tech_call(struct ast_channel *self, char *dest, int timeout)
|
|||
return 0;
|
||||
|
||||
tech_call_failed:
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
ast_log(LOG_ERROR, "Error: Outbound Call Failed %p \n",tech_pvt);
|
||||
}
|
||||
self->hangupcause = AST_CAUSE_NORMAL_CIRCUIT_CONGESTION;
|
||||
|
@ -4173,6 +4191,7 @@ static int tech_answer(struct ast_channel *self)
|
|||
{
|
||||
private_object *tech_pvt;
|
||||
int res = 0;
|
||||
const char *noanswer;
|
||||
|
||||
tech_pvt = self->tech_pvt;
|
||||
if (!tech_pvt) {
|
||||
|
@ -4181,19 +4200,22 @@ static int tech_answer(struct ast_channel *self)
|
|||
|
||||
ast_mutex_lock(&tech_pvt->iolock);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++ANSWER %s\n",self->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++ANSWER %s\n",self->name);
|
||||
}
|
||||
|
||||
if (!ast_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
|
||||
/* Only answer the inbound calls */
|
||||
ast_set_flag(tech_pvt, TFLAG_ANSWER);
|
||||
noanswer=pbx_builtin_getvar_helper(self, "WOOMERA_NO_ANSWER");
|
||||
if (noanswer && atoi(noanswer) == 1) {
|
||||
ast_clear_flag(tech_pvt, TFLAG_ANSWER);
|
||||
} else {
|
||||
ast_set_flag(tech_pvt, TFLAG_ANSWER);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Warning: AST trying to Answer OUTBOUND Call!\n");
|
||||
}
|
||||
|
||||
|
||||
ast_set_flag(tech_pvt, TFLAG_UP);
|
||||
ast_setstate(self, AST_STATE_UP);
|
||||
|
||||
|
@ -4221,7 +4243,7 @@ static void handle_fax(private_object *tech_pvt)
|
|||
const char *target_context = ast_strlen_zero(owner->macrocontext) ? owner->context : owner->macrocontext;
|
||||
#endif
|
||||
if (ast_exists_extension(owner, target_context, "fax", 1, owner->cid.cid_num)) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Redirecting %s to fax extension\n", owner->name);
|
||||
}
|
||||
|
||||
|
@ -4383,7 +4405,7 @@ tech_read_again:
|
|||
|
||||
|
||||
if (globals.debug > 4) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++READ %s %d coding %d\n",self->name, res,
|
||||
tech_pvt->coding);
|
||||
}
|
||||
|
@ -4470,7 +4492,7 @@ static int tech_write(struct ast_channel *self, struct ast_frame *frame)
|
|||
return -1;
|
||||
}
|
||||
if (globals.debug > 4) {
|
||||
if (option_verbose > 4) {
|
||||
if (option_verbose > 9 && woomera_profile_verbose(tech_pvt->profile) > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++WRITE %s %d\n",self->name, i);
|
||||
}
|
||||
}
|
||||
|
@ -4500,10 +4522,8 @@ static struct ast_frame *tech_exception(struct ast_channel *self)
|
|||
private_object *tech_pvt;
|
||||
|
||||
tech_pvt = self->tech_pvt;
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++EXCEPT %s\n",self->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++EXCEPT %s\n",self->name);
|
||||
}
|
||||
|
||||
return &ast_null_frame;
|
||||
|
@ -4569,9 +4589,11 @@ static int tech_indicate(struct ast_channel *self, int condition)
|
|||
if (!ast_test_flag(tech_pvt,TFLAG_ACCEPTED)) {
|
||||
ast_set_flag(tech_pvt, TFLAG_ACCEPT);
|
||||
}
|
||||
#if 0
|
||||
if (!tech_pvt->profile->progress_on_accept) {
|
||||
ast_set_flag(tech_pvt, TFLAG_PROGRESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
case AST_CONTROL_HOLD:
|
||||
|
@ -4655,11 +4677,9 @@ static int tech_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
|
|||
update_conf(p);
|
||||
#endif
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++FIXUP ChOld=%s ChNew=%s\n",
|
||||
oldchan->name,newchan->name);
|
||||
}
|
||||
}
|
||||
|
||||
ast_mutex_unlock(&p->iolock);
|
||||
|
@ -4700,10 +4720,8 @@ static int tech_setoption(struct ast_channel *self, int option, void *data, int
|
|||
{
|
||||
int res = 0;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++SETOPT %s\n",self->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++SETOPT %s\n",self->name);
|
||||
}
|
||||
return res;
|
||||
|
||||
|
@ -4714,10 +4732,8 @@ static int tech_queryoption(struct ast_channel *self, int option, void *data, in
|
|||
{
|
||||
int res = 0;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++GETOPT %s\n",self->name);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -4728,7 +4744,7 @@ static struct ast_channel *tech_bridged_channel(struct ast_channel *self, struct
|
|||
{
|
||||
struct ast_channel *chan = NULL;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++BRIDGED %s\n",self->name);
|
||||
}
|
||||
return chan;
|
||||
|
@ -4741,10 +4757,8 @@ static int tech_transfer(struct ast_channel *self, const char *newdest)
|
|||
{
|
||||
int res = -1;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++TRANSFER %s\n",self->name);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -4779,33 +4793,82 @@ static char *ast16_woomera_cli(struct ast_cli_entry *e, int cmd, struct ast_cli_
|
|||
}
|
||||
#endif
|
||||
|
||||
static int woomera_full_status(int fd)
|
||||
{
|
||||
woomera_profile *profile;
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
profile = iterator;
|
||||
|
||||
if (!ast_test_flag(profile, PFLAG_DISABLED)) {
|
||||
ast_cli(fd,"Profile: {%s} Host=%s WooVer=%s SmgVer=%s CurCalls=%i TotCalls=%i Verb=%i\n",
|
||||
profile->name, profile->woomera_host,
|
||||
WOOMERA_VERSION, profile->smgversion[0] == '\0'?"N/A":profile->smgversion,
|
||||
profile->call_count,
|
||||
profile->call_out+profile->call_in,
|
||||
woomera_profile_verbose(profile));
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int woomera_cli(int fd, int argc, char *argv[])
|
||||
{
|
||||
struct woomera_profile *profile;
|
||||
char *profile_name="default";
|
||||
|
||||
if (argc > 2) {
|
||||
if (argc > 1) {
|
||||
|
||||
profile_name=argv[1];
|
||||
profile = ASTOBJ_CONTAINER_FIND(&woomera_profile_list, profile_name);
|
||||
if (!profile) {
|
||||
|
||||
if (strcmp(profile_name,"version") == 0) {
|
||||
ast_cli(fd, "Woomera version %s : SMG Version %s \n",
|
||||
WOOMERA_VERSION,smgversion);
|
||||
if (strcmp(profile_name,"version") == 0) {
|
||||
ast_cli(fd, "Woomera version %s\n",
|
||||
WOOMERA_VERSION);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(profile_name, "debug") == 0) {
|
||||
if (argc > 2) {
|
||||
globals.debug = atoi(argv[2]);
|
||||
}
|
||||
ast_cli(fd, "Woomera debug=%d\n", globals.debug);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(profile_name, "panic")) {
|
||||
if (argc > 2) {
|
||||
globals.panic = atoi(argv[2]);
|
||||
}
|
||||
ast_cli(fd, "Woomera panic=%d\n", globals.panic);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(profile_name, "status")) {
|
||||
woomera_full_status(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ast_cli(fd, "Woomera: Invalid profile name %s\n", profile_name);
|
||||
ast_cli(fd, "Usage: woomera <profile> <cmd> <option>\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (!strcmp(argv[2], "debug")) {
|
||||
if (argc > 3) {
|
||||
globals.debug = atoi(argv[3]);
|
||||
}
|
||||
ast_cli(fd, "Woomera debug=%d\n", globals.debug);
|
||||
|
||||
} else if (!strcmp(argv[2], "verbose")) {
|
||||
if (argc > 3) {
|
||||
profile->verbose = atoi(argv[3]);
|
||||
}
|
||||
ast_cli(fd, "Woomera {%s} verbose=%d\n", profile_name, profile->verbose);
|
||||
|
||||
} else if (!strcmp(argv[2], "coding")) {
|
||||
|
||||
|
@ -4842,8 +4905,8 @@ static int woomera_cli(int fd, int argc, char *argv[])
|
|||
|
||||
} else if (!strcmp(argv[2], "version")) {
|
||||
|
||||
ast_cli(fd, "Woomera version %s : SMG Version %s \n",
|
||||
WOOMERA_VERSION,smgversion);
|
||||
ast_cli(fd, "Woomera {%s} version %s : SMG Version %s \n",
|
||||
profile->name,WOOMERA_VERSION,profile->smgversion[0] == '\0'?"N/A":profile->smgversion);
|
||||
|
||||
} else if (!strcmp(argv[2], "panic")) {
|
||||
if (argc > 3) {
|
||||
|
@ -4895,7 +4958,7 @@ static int woomera_cli(int fd, int argc, char *argv[])
|
|||
ast_cli(fd, "Woomera Invalid smgdebug usage\n");
|
||||
}
|
||||
} else if (!strcmp(argv[2], "abort")) {
|
||||
global_set_flag(TFLAG_ABORT);
|
||||
global_set_flag(NULL, TFLAG_ABORT);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -4918,7 +4981,7 @@ static struct cw_clicmd cli_woomera[] = {
|
|||
{
|
||||
.cmda = { "woomera", "default", "version", NULL },
|
||||
.handler = woomera_cli,
|
||||
.summary = "Woomera Version",
|
||||
.summary = "Woomera version",
|
||||
//.usage = pri_debug_help,
|
||||
//.generator = complete_span_4,
|
||||
},
|
||||
|
@ -5035,7 +5098,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
hw_dtmf = woomera_message_header(wmsg, "DTMF");
|
||||
if (hw_dtmf != NULL) {
|
||||
if (strncmp(hw_dtmf, "OutofBand" ,9) == 0) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
|
||||
|
@ -5044,7 +5107,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
ast_dsp_set_features(tech_pvt->dsp, tech_pvt->dsp_features);
|
||||
}
|
||||
} else {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF not supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
|
@ -5283,24 +5346,11 @@ static int woomera_event_incoming (private_object *tech_pvt)
|
|||
|
||||
if (validext == 0) {
|
||||
if (globals.debug > 1){
|
||||
int group = atoi(tg_string);
|
||||
if(group >= 0 &&
|
||||
group <= WOOMERA_MAX_TRUNKGROUPS &&
|
||||
tech_pvt->profile->tg_context[group] != NULL){
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 0) {
|
||||
ast_log(LOG_ERROR, "Error: Invalid exten %s@%s called %s!\n",
|
||||
exten,
|
||||
owner->context,
|
||||
tech_pvt->callid);
|
||||
}
|
||||
}else{
|
||||
if (option_verbose > 2) {
|
||||
ast_log(LOG_ERROR, "Error: Invalid exten %s@%s%s called %s!\n",
|
||||
exten,
|
||||
tech_pvt->profile->context,
|
||||
tg_string,
|
||||
tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
@ -5337,7 +5387,7 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
struct ast_channel *owner;
|
||||
|
||||
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Hangup [%s] \n", tech_pvt->callid);
|
||||
}
|
||||
cause = woomera_message_header(wmsg, "Cause");
|
||||
|
@ -5389,7 +5439,7 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
} else {
|
||||
ast_queue_frame(tech_pvt->owner, &dtmf_frame);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "SEND DTMF [%c] to %s\n", dtmf_frame.subclass,tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
|
@ -5565,10 +5615,7 @@ int unload_module(void)
|
|||
woomera_profile *profile = NULL;
|
||||
int x;
|
||||
|
||||
globals.panic=1;
|
||||
ast_log(LOG_NOTICE, "WOOMERA Unload %i\n",
|
||||
usecount());
|
||||
sleep(1);
|
||||
globals.panic=10;
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
|
@ -5591,6 +5638,11 @@ int unload_module(void)
|
|||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
sleep(1);
|
||||
|
||||
ast_log(LOG_NOTICE, "WOOMERA Unload %i\n",
|
||||
usecount());
|
||||
|
||||
ast_mutex_destroy(&default_profile.iolock);
|
||||
ast_mutex_destroy(&default_profile.call_count_lock);
|
||||
ast_mutex_destroy(&default_profile.event_queue.lock);
|
||||
|
@ -5659,5 +5711,26 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Woomera Protocol (WOOMER
|
|||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
static int init_woomera(void)
|
||||
{
|
||||
woomera_profile *profile;
|
||||
ast_mutex_lock(&lock);
|
||||
|
||||
if (!config_woomera()) {
|
||||
ast_mutex_unlock(&lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
profile = iterator;
|
||||
if (!ast_test_flag(profile, PFLAG_DISABLED)) {
|
||||
launch_woomera_thread(profile);
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
|
||||
ast_mutex_unlock(&lock);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ audio_ip=127.0.0.1
|
|||
;Only change if you have a port conflict with
|
||||
;another application.
|
||||
;------------------------------
|
||||
base_media_port = 10000
|
||||
max_media_ports = 1000
|
||||
base_media_port = 20000
|
||||
max_media_ports = 5000
|
||||
|
||||
|
||||
;Incoming Context for Woomera Channels
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,7 +13,7 @@
|
|||
################################################################################
|
||||
|
||||
ifndef PBXDIR
|
||||
PBXDIR=/usr/src/asterisk
|
||||
PBXDIR=/usr/include/asterisk
|
||||
ifneq (,$(wildcard ./.pbxdir))
|
||||
PBXDIR=$(shell cat .pbxdir)
|
||||
endif
|
||||
|
@ -28,8 +28,25 @@ PBXCFGDIR=/etc/asterisk
|
|||
PBXDEFINES=
|
||||
PBXFLAGS_EXTRA=
|
||||
|
||||
|
||||
#Check if PBXDIR is asterisk source or include
|
||||
|
||||
INCDIR=$(PBXDIR)
|
||||
INCLUDES=
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/asterisk/frame.h))
|
||||
INCLUDES= -I$(PBXDIR) -I$(PBXDIR)/include
|
||||
INCDIR=$(PBXDIR)/include/asterisk
|
||||
endif
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver/cli.h))
|
||||
INCLUDES= -I/$(PBXDIR) -I$(PBXDIR)/include
|
||||
INCDIR=$(PBXDIR)/include/callweaver
|
||||
endif
|
||||
|
||||
|
||||
|
||||
#Check for Asterisk AST_CONTROL_SRC feature
|
||||
DUMMY:=$(shell ./check_for.sh AST_CONTROL_SRC $(PBXDIR)/include/asterisk/frame.h .ast_src_check;)
|
||||
DUMMY:=$(shell ./check_for.sh AST_CONTROL_SRC $(INCDIR)/frame.h .ast_src_check;)
|
||||
|
||||
ifeq (1,$(shell cat .ast_src_check))
|
||||
PBXDEFINES+=-DWOO_CONTROL_SRC_FEATURE
|
||||
|
@ -37,7 +54,7 @@ endif
|
|||
|
||||
|
||||
#Check for Callweaver opbx_cli_entry
|
||||
DUMMY:=$(shell ./check_for.sh opbx_cli_entry $(PBXDIR)/include/callweaver/cli.h .opbx_cli_entry_check;)
|
||||
DUMMY:=$(shell ./check_for.sh opbx_cli_entry $(INCDIR)/cli.h .opbx_cli_entry_check;)
|
||||
|
||||
ifneq (0,$(shell cat .opbx_cli_entry_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_OPBX_CLI_ENTRY
|
||||
|
@ -45,31 +62,31 @@ endif
|
|||
|
||||
|
||||
#Check for callweaver cw_cli_entry
|
||||
DUMMY:=$(shell ./check_for.sh cw_cli_entry $(PBXDIR)/include/callweaver/cli.h .cw_cli_entry_check;)
|
||||
DUMMY:=$(shell ./check_for.sh cw_cli_entry $(INCDIR)/cli.h .cw_cli_entry_check;)
|
||||
|
||||
ifneq (0,$(shell cat .cw_cli_entry_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_CW_CLI_ENTRY
|
||||
endif
|
||||
|
||||
|
||||
#Check for callweaver MODULE_INFO
|
||||
DUMMY:=$(shell ./check_for.sh MODULE_INFO $(PBXDIR)/include/callweaver/module.h .cw_module_info_check;)
|
||||
|
||||
ifneq (0,$(shell cat .cw_module_info_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_MODULE_INFO
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver/cwobj.h))
|
||||
ifneq (,$(wildcard $(INCDIR)/cwobj.h))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_CWOBJ
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver.h))
|
||||
ifneq (,$(wildcard $(INCDIR)/../callweaver.h))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER -DHAVE_CONFIG_H
|
||||
PBXMODDIR=/usr/local/lib/callweaver/modules
|
||||
PBXCFGDIR=/usr/local/etc/callweaver
|
||||
|
||||
#Check for callweaver MODULE_INFO
|
||||
DUMMY:=$(shell ./check_for.sh MODULE_INFO $(INCDIR)/module.h .cw_module_info_check;)
|
||||
|
||||
ifneq (0,$(shell cat .cw_module_info_check))
|
||||
PBXFLAGS_EXTRA+=-DCALLWEAVER_MODULE_INFO
|
||||
endif
|
||||
|
||||
|
||||
else
|
||||
|
||||
#Check for Asterisk 1.6
|
||||
|
@ -82,6 +99,18 @@ DUMMY:=$(shell ./check_for.sh 1.4 $(PBXDIR)/.version .ast14_check;)
|
|||
ifneq (0,$(shell cat .ast14_check))
|
||||
PBXFLAGS_EXTRA+=-DAST14
|
||||
endif
|
||||
|
||||
DUMMY:=$(shell ./check_for.sh 1.6 $(INCDIR)/version.h .ast16_check;)
|
||||
ifneq (0,$(shell cat .ast16_check))
|
||||
PBXFLAGS_EXTRA+=-DAST16
|
||||
endif
|
||||
|
||||
DUMMY:=$(shell ./check_for.sh 1.4 $(INCDIR)/version.h .ast14_check;)
|
||||
ifneq (0,$(shell cat .ast14_check))
|
||||
PBXFLAGS_EXTRA+=-DAST14
|
||||
endif
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
@ -90,14 +119,13 @@ PBXFLAGS_EXTRA+= -DAST_MODULE=\"chan_woomera\"
|
|||
|
||||
CC = gcc
|
||||
|
||||
INCLUDES= -I/usr/include -I./
|
||||
|
||||
CFLAGS = -D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -O6
|
||||
CCFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -g
|
||||
LDFLAGS=-L lib/libteletone/.libs -L. -L/usr/local/lib -L ../../ssmg/libsangoma.trunk/.libs -lpthread -lsangoma -lm
|
||||
|
||||
|
||||
PBXFLAGS= $(INCLUDES) -I$(PBXDIR) -I$(PBXDIR)/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Iinclude -I../include -D_REENTRANT -DWOOMERA_CHAN_NAME=\"$(CHAN_NAME)\" -D_GNU_SOURCE $(PBXDEFINES) -O6 -fomit-frame-pointer -fPIC
|
||||
PBXFLAGS= $(INCLUDES) -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -D_REENTRANT -DWOOMERA_CHAN_NAME=\"$(CHAN_NAME)\" -D_GNU_SOURCE $(PBXDEFINES) -O6 -fomit-frame-pointer -fPIC
|
||||
|
||||
|
||||
all: chan_woomera.so
|
||||
|
|
|
@ -14,6 +14,32 @@
|
|||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License
|
||||
* =============================================
|
||||
* v1.60 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 22 2009
|
||||
* Added Woomera No Answer feature for calling cards.
|
||||
*
|
||||
* v1.59 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 16 2009
|
||||
* Bug fix in woomera profile verbose introduced in 1.58
|
||||
*
|
||||
* v1.58 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 10 2009
|
||||
* Added verbosity per profile.
|
||||
* Updated cli commands
|
||||
*
|
||||
* v1.57 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Nov 10 2009
|
||||
* Fixed global set flag. When one profile goes down it shuts down
|
||||
* all calls.
|
||||
*
|
||||
* v1.56 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Oct 29 2009
|
||||
* Fixed the call incoming call problem on second profile
|
||||
*
|
||||
* v1.55 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Sep 22 2009
|
||||
* Updated udp base port to 20000 and numbe of ports to 5000
|
||||
*
|
||||
* v1.54 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Sep 16 2009
|
||||
* Added Progress Messages
|
||||
|
@ -247,6 +273,9 @@
|
|||
* from CLI.
|
||||
*/
|
||||
|
||||
#if !defined(CALLWEAVER)
|
||||
#include "asterisk.h"
|
||||
#endif
|
||||
|
||||
#if defined(CALLWEAVER) && defined(HAVE_CONFIG_H)
|
||||
#include "confdefs.h"
|
||||
|
@ -296,7 +325,7 @@
|
|||
#include "asterisk/musiconhold.h"
|
||||
#include "asterisk/transcap.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.60 $")
|
||||
|
||||
#else
|
||||
|
||||
|
@ -347,7 +376,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
|||
#define CALLWEAVER_19 1
|
||||
#endif
|
||||
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.60 $")
|
||||
|
||||
#if defined(DSP_FEATURE_FAX_CNG_DETECT)
|
||||
#undef DSP_FEATURE_FAX_DETECT
|
||||
|
@ -654,7 +683,7 @@ CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.54 $")
|
|||
|
||||
extern int option_verbose;
|
||||
|
||||
#define WOOMERA_VERSION "v1.54"
|
||||
#define WOOMERA_VERSION "v1.60"
|
||||
#ifndef WOOMERA_CHAN_NAME
|
||||
#define WOOMERA_CHAN_NAME "SS7"
|
||||
#endif
|
||||
|
@ -677,8 +706,6 @@ static const char desc[] = "Woomera Channel Driver";
|
|||
//static const char type[] = "WOOMERA";
|
||||
static const char tdesc[] = "Woomera Channel Driver";
|
||||
static char configfile[] = "woomera.conf";
|
||||
static char smgversion_init=0;
|
||||
static char smgversion[100] = "N/A";
|
||||
|
||||
static char mohinterpret[MAX_MUSICCLASS] = "default";
|
||||
static char mohsuggest[MAX_MUSICCLASS] = "";
|
||||
|
@ -725,11 +752,11 @@ static struct ast_jb_conf global_jbconf;
|
|||
#define WOOMERA_ULAW 1
|
||||
#define WOOMERA_ALAW 2
|
||||
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 899
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 5000
|
||||
|
||||
#define WOOMERA_STRLEN 256
|
||||
#define WOOMERA_ARRAY_LEN 50
|
||||
#define WOOMERA_MIN_PORT 10000
|
||||
#define WOOMERA_MIN_PORT 20000
|
||||
#define WOOMERA_MAX_PORT WOOMERA_MIN_PORT+WOOMERA_MAX_MEDIA_PORTS
|
||||
#define WOOMERA_BODYLEN 2048
|
||||
#define WOOMERA_LINE_SEPARATOR "\r\n"
|
||||
|
@ -766,7 +793,6 @@ static int woomera_max_media_port = WOOMERA_MAX_PORT;
|
|||
})
|
||||
#endif
|
||||
|
||||
|
||||
#define FRAME_LEN 480
|
||||
|
||||
#if 0
|
||||
|
@ -875,12 +901,12 @@ struct woomera_profile {
|
|||
float txgain_val;
|
||||
unsigned char rxgain[256];
|
||||
unsigned char txgain[256];
|
||||
int call_out;
|
||||
int call_in;
|
||||
int call_ok;
|
||||
int call_end;
|
||||
int call_abort;
|
||||
int call_ast_hungup;
|
||||
unsigned int call_out;
|
||||
unsigned int call_in;
|
||||
unsigned int call_ok;
|
||||
unsigned int call_end;
|
||||
unsigned int call_abort;
|
||||
unsigned int call_ast_hungup;
|
||||
char default_context[WOOMERA_STRLEN];
|
||||
char* tg_context [WOOMERA_MAX_TRUNKGROUPS+1];
|
||||
char language[WOOMERA_STRLEN];
|
||||
|
@ -889,6 +915,8 @@ struct woomera_profile {
|
|||
int rx_sync_check_opt;
|
||||
int tx_sync_check_opt;
|
||||
int tx_sync_gen_opt;
|
||||
unsigned int verbose;
|
||||
char smgversion[100];
|
||||
};
|
||||
|
||||
|
||||
|
@ -961,6 +989,17 @@ typedef struct woomera_event_queue woomera_event_queue;
|
|||
#endif
|
||||
|
||||
|
||||
static inline int woomera_profile_verbose(woomera_profile *profile)
|
||||
{
|
||||
if (!profile) {
|
||||
/* If profile does not exists then log by default */
|
||||
return 100;
|
||||
}
|
||||
|
||||
return profile->verbose;
|
||||
}
|
||||
|
||||
|
||||
static int my_ast_channel_trylock(struct ast_channel *chan)
|
||||
{
|
||||
#if defined (AST14) || defined (AST16)
|
||||
|
@ -1058,7 +1097,7 @@ AST_MUTEX_DEFINE_STATIC(lock);
|
|||
|
||||
/* local prototypes */
|
||||
static void woomera_close_socket(int *socket);
|
||||
static void global_set_flag(int flags);
|
||||
static void global_set_flag(woomera_profile *profile,int flags);
|
||||
#ifdef WOOMERA_PRINTF_DEBUG
|
||||
static int __woomera_printf(const char* file, int line, woomera_profile *profile, int fd, char *fmt, ...);
|
||||
#else
|
||||
|
@ -1202,14 +1241,16 @@ static int woomera_message_reply_ok(woomera_message *wmsg)
|
|||
}
|
||||
|
||||
|
||||
static void global_set_flag(int flags)
|
||||
static void global_set_flag(woomera_profile * profile, int flags)
|
||||
{
|
||||
private_object *tech_pvt;
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&private_object_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
tech_pvt = iterator;
|
||||
ast_set_flag(tech_pvt, flags);
|
||||
tech_pvt = iterator;
|
||||
if (profile == NULL || tech_pvt->profile == profile ) {
|
||||
ast_set_flag(tech_pvt, flags);
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
}
|
||||
|
@ -1372,7 +1413,7 @@ static int __woomera_printf(woomera_profile *profile, int fd, char *fmt, ...)
|
|||
} else {
|
||||
res=0;
|
||||
if (profile && globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Send Message: {%s} [%s/%d]\n%s\n%s", profile->name, profile->woomera_host, profile->woomera_port, WOOMERA_DEBUG_LINE, stuff);
|
||||
}
|
||||
}
|
||||
|
@ -1540,7 +1581,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
if (res == 0) {
|
||||
sanity++;
|
||||
} else if (res < 0) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "{%s} error during packet retry #%d\n", profile->name, loops);
|
||||
}
|
||||
return res;
|
||||
|
@ -1588,7 +1629,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
next = buf;
|
||||
|
||||
if (globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Receive Message: {%s} [%s/%d]\n%s\n%s", profile->name, profile->woomera_host, profile->woomera_port, WOOMERA_DEBUG_LINE, buf);
|
||||
}
|
||||
}
|
||||
|
@ -1682,7 +1723,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
int terr;
|
||||
terr=read(fd, wmsg->body, (bytes > sizeof(wmsg->body)) ? sizeof(wmsg->body) : bytes);
|
||||
if (globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose("%s\n", wmsg->body);
|
||||
}
|
||||
}
|
||||
|
@ -1690,7 +1731,7 @@ static int woomera_message_parse(int fd, woomera_message *wmsg, int timeout,
|
|||
|
||||
if (event_queue && ast_test_flag(wmsg, WFLAG_EVENT)) {
|
||||
if (globals.debug) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Queue Event: {%s} [%s]\n", profile->name, wmsg->command);
|
||||
}
|
||||
}
|
||||
|
@ -1830,7 +1871,7 @@ retry_activate_again:
|
|||
}
|
||||
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (globals.debug > 1 && option_verbose > 1 && woomera_profile_verbose(tech_pvt->profile) > 1) {
|
||||
ast_log(LOG_ERROR, "Error: %s call connect to TCP/Woomera Server! tpvt=%p: %s\n",
|
||||
ast_test_flag(tech_pvt, TFLAG_OUTBOUND)?"Out":"In",
|
||||
tech_pvt,strerror(errno));
|
||||
|
@ -2102,7 +2143,7 @@ static int tech_init(private_object *tech_pvt, woomera_profile *profile, int fla
|
|||
memcpy(&tech_pvt->jbconf, &global_jbconf, sizeof(struct ast_jb_conf));
|
||||
ast_jb_configure(self, &tech_pvt->jbconf);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 10) {
|
||||
if (globals.debug > 1 && option_verbose > 10 && woomera_profile_verbose(profile) > 10) {
|
||||
ast_log(LOG_NOTICE, "%s: Cfg JitterBuffer (F=%i MS=%li Rs=%li Impl=%s)\n",
|
||||
self->name,
|
||||
tech_pvt->jbconf.flags,
|
||||
|
@ -2182,7 +2223,7 @@ static void tech_destroy(private_object *tech_pvt, struct ast_channel *owner)
|
|||
|
||||
if (tech_pvt->profile && tech_pvt->command_channel > -1) {
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (globals.debug > 1 && option_verbose > 1 && woomera_profile_verbose(tech_pvt->profile) > 1) {
|
||||
ast_log(LOG_NOTICE, "+++DESTROY sent HANGUP %s\n",
|
||||
tech_pvt->callid);
|
||||
}
|
||||
|
@ -2851,7 +2892,7 @@ static void *tech_monitor_thread(void *obj)
|
|||
|
||||
}
|
||||
if (globals.debug > 4) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "CHECK {%s} (%d) %s\n",
|
||||
tech_pvt->profile->name,
|
||||
res,tech_pvt->callid);
|
||||
|
@ -2911,7 +2952,7 @@ static int woomera_locate_socket(woomera_profile *profile, int *woomera_socket)
|
|||
profile->name);
|
||||
|
||||
/* When we establish connection update smg version */
|
||||
smgversion_init=0;
|
||||
profile->smgversion[0]='\0';
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
|
@ -2940,6 +2981,7 @@ static int woomera_locate_socket(woomera_profile *profile, int *woomera_socket)
|
|||
profile->name,__FUNCTION__,__LINE__);
|
||||
if (*woomera_socket > -1) {
|
||||
woomera_close_socket(woomera_socket);
|
||||
profile->smgversion[0]='\0';
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -3037,7 +3079,7 @@ static void *woomera_thread_run(void *obj)
|
|||
woomera_close_socket(&woomera_socket);
|
||||
profile->woomera_socket=-1;
|
||||
}
|
||||
global_set_flag(TFLAG_ABORT);
|
||||
global_set_flag(profile,TFLAG_ABORT);
|
||||
if (globals.panic > 2) {
|
||||
break;
|
||||
}
|
||||
|
@ -3128,7 +3170,7 @@ static void *woomera_thread_run(void *obj)
|
|||
}
|
||||
}
|
||||
if(globals.debug > 4) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Main Thread {%s} Select Return %d\n", profile->name, res);
|
||||
}
|
||||
}
|
||||
|
@ -3176,7 +3218,7 @@ static int launch_tech_thread(private_object *tech_pvt)
|
|||
int result = 0;
|
||||
|
||||
if (globals.debug > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++LAUCN TECH THREAD\n");
|
||||
}
|
||||
}
|
||||
|
@ -3364,8 +3406,11 @@ static int config_woomera(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
default_context_set = 0;
|
||||
strncpy(profile->name, entry, sizeof(profile->name) - 1);
|
||||
profile->coding=AST_FORMAT_SLINEAR;
|
||||
profile->verbose=100;
|
||||
profile->smgversion[0]='\0';
|
||||
|
||||
/*default is inbound and outbound enabled */
|
||||
ast_set_flag(profile, PFLAG_INBOUND | PFLAG_OUTBOUND);
|
||||
|
@ -3669,11 +3714,10 @@ static int connect_woomera(int *new_socket, woomera_profile *profile, int flags)
|
|||
if (globals.debug > 2) {
|
||||
ast_log(LOG_NOTICE, "Woomera Got HELLO on connect! %s SMG Version %s\n", profile->name,woomera_message_header(&wmsg, "Version"));
|
||||
}
|
||||
if (!smgversion_init && woomera_message_header(&wmsg, "Version")) {
|
||||
smgversion_init=1;
|
||||
strncpy(smgversion,
|
||||
if (profile->smgversion[0] == '\0' && woomera_message_header(&wmsg, "Version")) {
|
||||
strncpy(profile->smgversion,
|
||||
woomera_message_header(&wmsg, "Version"),
|
||||
sizeof(smgversion)-1);
|
||||
sizeof(profile->smgversion)-1);
|
||||
}
|
||||
|
||||
audio_format = woomera_message_header(&wmsg, "Raw-Format");
|
||||
|
@ -3717,28 +3761,6 @@ static int connect_woomera(int *new_socket, woomera_profile *profile, int flags)
|
|||
return *new_socket;
|
||||
}
|
||||
|
||||
static int init_woomera(void)
|
||||
{
|
||||
woomera_profile *profile;
|
||||
ast_mutex_lock(&lock);
|
||||
|
||||
if (!config_woomera()) {
|
||||
ast_mutex_unlock(&lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
profile = iterator;
|
||||
if (!ast_test_flag(profile, PFLAG_DISABLED)) {
|
||||
launch_woomera_thread(profile);
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
ast_mutex_unlock(&lock);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct ast_channel *woomera_new(const char *type, int format,
|
||||
void *data, int *cause,
|
||||
|
@ -3845,10 +3867,8 @@ static struct ast_channel *tech_requester(const char *type, int format, void *da
|
|||
|
||||
ast_set_flag(tech_pvt, TFLAG_PBX); /* so we know we dont have to free the channel ourselves */
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++REQ %s\n", chan->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 8) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++REQ %s\n", chan->name);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -3872,10 +3892,8 @@ static int tech_send_digit(struct ast_channel *self, char digit)
|
|||
private_object *tech_pvt = self->tech_pvt;
|
||||
int res = 0;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++DIGIT %s '%c'\n",self->name, digit);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++DIGIT %s '%c'\n",self->name, digit);
|
||||
}
|
||||
|
||||
/* we don't have time to make sure the dtmf command is successful cos asterisk again
|
||||
|
@ -4000,7 +4018,7 @@ static int tech_call(struct ast_channel *self, char *dest, int timeout)
|
|||
|
||||
if (profile->max_calls) {
|
||||
if (profile->call_count >= profile->max_calls) {
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_log(LOG_ERROR, "This profile is at call limit of %d\n",
|
||||
profile->max_calls);
|
||||
}
|
||||
|
@ -4043,7 +4061,7 @@ static int tech_call(struct ast_channel *self, char *dest, int timeout)
|
|||
return 0;
|
||||
|
||||
tech_call_failed:
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
ast_log(LOG_ERROR, "Error: Outbound Call Failed %p \n",tech_pvt);
|
||||
}
|
||||
self->hangupcause = AST_CAUSE_NORMAL_CIRCUIT_CONGESTION;
|
||||
|
@ -4173,6 +4191,7 @@ static int tech_answer(struct ast_channel *self)
|
|||
{
|
||||
private_object *tech_pvt;
|
||||
int res = 0;
|
||||
const char *noanswer;
|
||||
|
||||
tech_pvt = self->tech_pvt;
|
||||
if (!tech_pvt) {
|
||||
|
@ -4181,19 +4200,22 @@ static int tech_answer(struct ast_channel *self)
|
|||
|
||||
ast_mutex_lock(&tech_pvt->iolock);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++ANSWER %s\n",self->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++ANSWER %s\n",self->name);
|
||||
}
|
||||
|
||||
if (!ast_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
|
||||
/* Only answer the inbound calls */
|
||||
ast_set_flag(tech_pvt, TFLAG_ANSWER);
|
||||
noanswer=pbx_builtin_getvar_helper(self, "WOOMERA_NO_ANSWER");
|
||||
if (noanswer && atoi(noanswer) == 1) {
|
||||
ast_clear_flag(tech_pvt, TFLAG_ANSWER);
|
||||
} else {
|
||||
ast_set_flag(tech_pvt, TFLAG_ANSWER);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Warning: AST trying to Answer OUTBOUND Call!\n");
|
||||
}
|
||||
|
||||
|
||||
ast_set_flag(tech_pvt, TFLAG_UP);
|
||||
ast_setstate(self, AST_STATE_UP);
|
||||
|
||||
|
@ -4221,7 +4243,7 @@ static void handle_fax(private_object *tech_pvt)
|
|||
const char *target_context = ast_strlen_zero(owner->macrocontext) ? owner->context : owner->macrocontext;
|
||||
#endif
|
||||
if (ast_exists_extension(owner, target_context, "fax", 1, owner->cid.cid_num)) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Redirecting %s to fax extension\n", owner->name);
|
||||
}
|
||||
|
||||
|
@ -4383,7 +4405,7 @@ tech_read_again:
|
|||
|
||||
|
||||
if (globals.debug > 4) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++READ %s %d coding %d\n",self->name, res,
|
||||
tech_pvt->coding);
|
||||
}
|
||||
|
@ -4470,7 +4492,7 @@ static int tech_write(struct ast_channel *self, struct ast_frame *frame)
|
|||
return -1;
|
||||
}
|
||||
if (globals.debug > 4) {
|
||||
if (option_verbose > 4) {
|
||||
if (option_verbose > 9 && woomera_profile_verbose(tech_pvt->profile) > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++WRITE %s %d\n",self->name, i);
|
||||
}
|
||||
}
|
||||
|
@ -4500,10 +4522,8 @@ static struct ast_frame *tech_exception(struct ast_channel *self)
|
|||
private_object *tech_pvt;
|
||||
|
||||
tech_pvt = self->tech_pvt;
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++EXCEPT %s\n",self->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++EXCEPT %s\n",self->name);
|
||||
}
|
||||
|
||||
return &ast_null_frame;
|
||||
|
@ -4569,12 +4589,10 @@ static int tech_indicate(struct ast_channel *self, int condition)
|
|||
if (!ast_test_flag(tech_pvt,TFLAG_ACCEPTED)) {
|
||||
ast_set_flag(tech_pvt, TFLAG_ACCEPT);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Disable this for non ss7 installs */
|
||||
if (!tech_pvt->profile->progress_on_accept) {
|
||||
ast_set_flag(tech_pvt, TFLAG_PROGRESS);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
@ -4659,11 +4677,9 @@ static int tech_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
|
|||
update_conf(p);
|
||||
#endif
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++FIXUP ChOld=%s ChNew=%s\n",
|
||||
oldchan->name,newchan->name);
|
||||
}
|
||||
}
|
||||
|
||||
ast_mutex_unlock(&p->iolock);
|
||||
|
@ -4704,10 +4720,8 @@ static int tech_setoption(struct ast_channel *self, int option, void *data, int
|
|||
{
|
||||
int res = 0;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++SETOPT %s\n",self->name);
|
||||
}
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++SETOPT %s\n",self->name);
|
||||
}
|
||||
return res;
|
||||
|
||||
|
@ -4718,10 +4732,8 @@ static int tech_queryoption(struct ast_channel *self, int option, void *data, in
|
|||
{
|
||||
int res = 0;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++GETOPT %s\n",self->name);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -4732,7 +4744,7 @@ static struct ast_channel *tech_bridged_channel(struct ast_channel *self, struct
|
|||
{
|
||||
struct ast_channel *chan = NULL;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++BRIDGED %s\n",self->name);
|
||||
}
|
||||
return chan;
|
||||
|
@ -4745,10 +4757,8 @@ static int tech_transfer(struct ast_channel *self, const char *newdest)
|
|||
{
|
||||
int res = -1;
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 9) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "+++TRANSFER %s\n",self->name);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -4783,33 +4793,82 @@ static char *ast16_woomera_cli(struct ast_cli_entry *e, int cmd, struct ast_cli_
|
|||
}
|
||||
#endif
|
||||
|
||||
static int woomera_full_status(int fd)
|
||||
{
|
||||
woomera_profile *profile;
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
profile = iterator;
|
||||
|
||||
if (!ast_test_flag(profile, PFLAG_DISABLED)) {
|
||||
ast_cli(fd,"Profile: {%s} Host=%s WooVer=%s SmgVer=%s CurCalls=%i TotCalls=%i Verb=%i\n",
|
||||
profile->name, profile->woomera_host,
|
||||
WOOMERA_VERSION, profile->smgversion[0] == '\0'?"N/A":profile->smgversion,
|
||||
profile->call_count,
|
||||
profile->call_out+profile->call_in,
|
||||
woomera_profile_verbose(profile));
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int woomera_cli(int fd, int argc, char *argv[])
|
||||
{
|
||||
struct woomera_profile *profile;
|
||||
char *profile_name="default";
|
||||
|
||||
if (argc > 2) {
|
||||
if (argc > 1) {
|
||||
|
||||
profile_name=argv[1];
|
||||
profile = ASTOBJ_CONTAINER_FIND(&woomera_profile_list, profile_name);
|
||||
if (!profile) {
|
||||
|
||||
if (strcmp(profile_name,"version") == 0) {
|
||||
ast_cli(fd, "Woomera version %s : SMG Version %s \n",
|
||||
WOOMERA_VERSION,smgversion);
|
||||
if (strcmp(profile_name,"version") == 0) {
|
||||
ast_cli(fd, "Woomera version %s\n",
|
||||
WOOMERA_VERSION);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(profile_name, "debug") == 0) {
|
||||
if (argc > 2) {
|
||||
globals.debug = atoi(argv[2]);
|
||||
}
|
||||
ast_cli(fd, "Woomera debug=%d\n", globals.debug);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(profile_name, "panic")) {
|
||||
if (argc > 2) {
|
||||
globals.panic = atoi(argv[2]);
|
||||
}
|
||||
ast_cli(fd, "Woomera panic=%d\n", globals.panic);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(profile_name, "status")) {
|
||||
woomera_full_status(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ast_cli(fd, "Woomera: Invalid profile name %s\n", profile_name);
|
||||
ast_cli(fd, "Usage: woomera <profile> <cmd> <option>\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (!strcmp(argv[2], "debug")) {
|
||||
if (argc > 3) {
|
||||
globals.debug = atoi(argv[3]);
|
||||
}
|
||||
ast_cli(fd, "Woomera debug=%d\n", globals.debug);
|
||||
|
||||
} else if (!strcmp(argv[2], "verbose")) {
|
||||
if (argc > 3) {
|
||||
profile->verbose = atoi(argv[3]);
|
||||
}
|
||||
ast_cli(fd, "Woomera {%s} verbose=%d\n", profile_name, profile->verbose);
|
||||
|
||||
} else if (!strcmp(argv[2], "coding")) {
|
||||
|
||||
|
@ -4846,8 +4905,8 @@ static int woomera_cli(int fd, int argc, char *argv[])
|
|||
|
||||
} else if (!strcmp(argv[2], "version")) {
|
||||
|
||||
ast_cli(fd, "Woomera version %s : SMG Version %s \n",
|
||||
WOOMERA_VERSION,smgversion);
|
||||
ast_cli(fd, "Woomera {%s} version %s : SMG Version %s \n",
|
||||
profile->name,WOOMERA_VERSION,profile->smgversion[0] == '\0'?"N/A":profile->smgversion);
|
||||
|
||||
} else if (!strcmp(argv[2], "panic")) {
|
||||
if (argc > 3) {
|
||||
|
@ -4899,7 +4958,7 @@ static int woomera_cli(int fd, int argc, char *argv[])
|
|||
ast_cli(fd, "Woomera Invalid smgdebug usage\n");
|
||||
}
|
||||
} else if (!strcmp(argv[2], "abort")) {
|
||||
global_set_flag(TFLAG_ABORT);
|
||||
global_set_flag(NULL, TFLAG_ABORT);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -4922,7 +4981,7 @@ static struct cw_clicmd cli_woomera[] = {
|
|||
{
|
||||
.cmda = { "woomera", "default", "version", NULL },
|
||||
.handler = woomera_cli,
|
||||
.summary = "Woomera Version",
|
||||
.summary = "Woomera version",
|
||||
//.usage = pri_debug_help,
|
||||
//.generator = complete_span_4,
|
||||
},
|
||||
|
@ -5039,7 +5098,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
hw_dtmf = woomera_message_header(wmsg, "DTMF");
|
||||
if (hw_dtmf != NULL) {
|
||||
if (strncmp(hw_dtmf, "OutofBand" ,9) == 0) {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
|
||||
|
@ -5048,7 +5107,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
ast_dsp_set_features(tech_pvt->dsp, tech_pvt->dsp_features);
|
||||
}
|
||||
} else {
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF not supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
|
@ -5287,24 +5346,11 @@ static int woomera_event_incoming (private_object *tech_pvt)
|
|||
|
||||
if (validext == 0) {
|
||||
if (globals.debug > 1){
|
||||
int group = atoi(tg_string);
|
||||
if(group >= 0 &&
|
||||
group <= WOOMERA_MAX_TRUNKGROUPS &&
|
||||
tech_pvt->profile->tg_context[group] != NULL){
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 0) {
|
||||
ast_log(LOG_ERROR, "Error: Invalid exten %s@%s called %s!\n",
|
||||
exten,
|
||||
owner->context,
|
||||
tech_pvt->callid);
|
||||
}
|
||||
}else{
|
||||
if (option_verbose > 2) {
|
||||
ast_log(LOG_ERROR, "Error: Invalid exten %s@%s%s called %s!\n",
|
||||
exten,
|
||||
tech_pvt->profile->context,
|
||||
tg_string,
|
||||
tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
@ -5341,7 +5387,7 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
struct ast_channel *owner;
|
||||
|
||||
|
||||
if (option_verbose > 2) {
|
||||
if (option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "Hangup [%s] \n", tech_pvt->callid);
|
||||
}
|
||||
cause = woomera_message_header(wmsg, "Cause");
|
||||
|
@ -5393,7 +5439,7 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
} else {
|
||||
ast_queue_frame(tech_pvt->owner, &dtmf_frame);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 2) {
|
||||
if (globals.debug > 1 && option_verbose > 2 && woomera_profile_verbose(tech_pvt->profile) > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "SEND DTMF [%c] to %s\n", dtmf_frame.subclass,tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
|
@ -5569,10 +5615,7 @@ int unload_module(void)
|
|||
woomera_profile *profile = NULL;
|
||||
int x;
|
||||
|
||||
globals.panic=1;
|
||||
ast_log(LOG_NOTICE, "WOOMERA Unload %i\n",
|
||||
usecount());
|
||||
sleep(1);
|
||||
globals.panic=10;
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
|
@ -5595,6 +5638,11 @@ int unload_module(void)
|
|||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
sleep(1);
|
||||
|
||||
ast_log(LOG_NOTICE, "WOOMERA Unload %i\n",
|
||||
usecount());
|
||||
|
||||
ast_mutex_destroy(&default_profile.iolock);
|
||||
ast_mutex_destroy(&default_profile.call_count_lock);
|
||||
ast_mutex_destroy(&default_profile.event_queue.lock);
|
||||
|
@ -5663,5 +5711,26 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Woomera Protocol (WOOMER
|
|||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
static int init_woomera(void)
|
||||
{
|
||||
woomera_profile *profile;
|
||||
ast_mutex_lock(&lock);
|
||||
|
||||
if (!config_woomera()) {
|
||||
ast_mutex_unlock(&lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ASTOBJ_CONTAINER_TRAVERSE(&woomera_profile_list, 1, do {
|
||||
ASTOBJ_RDLOCK(iterator);
|
||||
profile = iterator;
|
||||
if (!ast_test_flag(profile, PFLAG_DISABLED)) {
|
||||
launch_woomera_thread(profile);
|
||||
}
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while(0));
|
||||
|
||||
|
||||
ast_mutex_unlock(&lock);
|
||||
return 1;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -47,8 +47,8 @@ audio_ip=127.0.0.1
|
|||
;Only change if you have a port conflict with
|
||||
;another application.
|
||||
;------------------------------
|
||||
base_media_port = 10000
|
||||
max_media_ports = 1000
|
||||
base_media_port = 20000
|
||||
max_media_ports = 5000
|
||||
|
||||
|
||||
;Incoming Context for Woomera Channels
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/conf
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/conf_bri
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ cfgdir="/etc/asterisk"
|
|||
mysyslog=" "
|
||||
smg_installed=0
|
||||
chan_woomera_installed=0
|
||||
|
||||
no_woomera="false"
|
||||
|
||||
|
||||
while [ ! -z $1 ]
|
||||
|
@ -62,6 +62,9 @@ do
|
|||
noss7="flase"
|
||||
elif [ $1 = '-bri' ]; then
|
||||
noss7="true"
|
||||
elif [ $1 = '-no_woomera' ]; then
|
||||
noss7="true"
|
||||
no_woomera="true"
|
||||
elif [ $1 = '-pri' ]; then
|
||||
noss7="true"
|
||||
pri="true"
|
||||
|
@ -242,7 +245,7 @@ if [ ! -e /usr/include/netinet/sctp.h ] && [ ! -e /usr/include/sctp.h ]; then
|
|||
echo
|
||||
echo "Error: lksctp-tools-devel package missing"
|
||||
echo "Please install sctp using a package manager"
|
||||
echo "eg: yum install ksctp-tools-devel"
|
||||
echo "eg: yum install lksctp-tools-devel"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
@ -325,42 +328,44 @@ else
|
|||
smg_installed=1;
|
||||
fi
|
||||
|
||||
if [ -d chan_woomera.trunk ]; then
|
||||
if [ "$no_woomera" == "false" ]; then
|
||||
if [ -d chan_woomera.trunk ]; then
|
||||
|
||||
cd chan_woomera.trunk
|
||||
cd chan_woomera.trunk
|
||||
|
||||
echo "Compiling Woomera Channel ..."
|
||||
echo "Compiling Woomera Channel ..."
|
||||
|
||||
if [ ! -e $pbxdir ]; then
|
||||
echo
|
||||
echo "Error: $pbxdir directory does not exist!"
|
||||
echo " Please provide the path to Asterik or CallWeaver source."
|
||||
echo " Then re-run eg: ./install -pbxdir /usr/src/asterisk "
|
||||
echo
|
||||
getyn "Would you like to continue installation?"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
if [ ! -e $pbxdir ]; then
|
||||
echo
|
||||
echo "Error: $pbxdir directory does not exist!"
|
||||
echo " Please provide the path to Asterik or CallWeaver source."
|
||||
echo " Then re-run eg: ./install -pbxdir /usr/src/asterisk "
|
||||
echo
|
||||
getyn "Would you like to continue installation?"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
else
|
||||
eval "make clean 2> /dev/null > /dev/null"
|
||||
eval "make PBXDIR=$pbxdir"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
make INSTALLPREFIX=$rootdir install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Error: Failed to compile chan_woomera into PBX source!"
|
||||
echo
|
||||
exit 1;
|
||||
fi
|
||||
echo "Ok."
|
||||
chan_woomera_installed=1;
|
||||
fi
|
||||
|
||||
else
|
||||
eval "make clean 2> /dev/null > /dev/null"
|
||||
eval "make PBXDIR=$pbxdir"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1;
|
||||
fi
|
||||
make INSTALLPREFIX=$rootdir install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Error: Failed to compile chan_woomera into PBX source!"
|
||||
echo
|
||||
exit 1;
|
||||
fi
|
||||
echo "Ok."
|
||||
chan_woomera_installed=1;
|
||||
echo "Warning: chan_woomera directory does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Warning: chan_woomera directory does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $smg_installed -eq 1 ]; then
|
||||
|
@ -389,6 +394,10 @@ if [ $chan_woomera_installed -eq 1 ]; then
|
|||
echo "--> Start: start $pbxd (part of $pbxd)"
|
||||
echo
|
||||
echo "---------------------------------"
|
||||
elif [ $no_woomera = "true" ];then
|
||||
echo
|
||||
echo " You chose not to install Chan Woomera"
|
||||
echo
|
||||
else
|
||||
echo
|
||||
echo " Chan Woomera Installatin Failed"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/lib
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/lib/libteletone
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/lib/libteletone/src
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 38
|
||||
/svn/sangoma_mgd/!svn/ver/203/trunk/rc
|
||||
/svn/sangoma_mgd/!svn/ver/224/trunk/rc
|
||||
END
|
||||
smg.rc.pri
|
||||
K 25
|
||||
|
@ -27,6 +27,12 @@ svn:wc:ra_dav:version-url
|
|||
V 54
|
||||
/svn/sangoma_mgd/!svn/ver/200/trunk/rc/smg.rc.bri_only
|
||||
END
|
||||
safe_sangoma.rc
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 54
|
||||
/svn/sangoma_mgd/!svn/ver/224/trunk/rc/safe_sangoma.rc
|
||||
END
|
||||
smg.rc.ss7boost
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
|
@ -37,5 +43,11 @@ smg.rc.isupd
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 51
|
||||
/svn/sangoma_mgd/!svn/ver/203/trunk/rc/smg.rc.isupd
|
||||
/svn/sangoma_mgd/!svn/ver/224/trunk/rc/smg.rc.isupd
|
||||
END
|
||||
smg.rc.isupd_only
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 56
|
||||
/svn/sangoma_mgd/!svn/ver/208/trunk/rc/smg.rc.isupd_only
|
||||
END
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/rc
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
||||
|
||||
2009-09-17T21:48:55.845572Z
|
||||
203
|
||||
2009-11-13T19:11:52.785901Z
|
||||
224
|
||||
ncorbic
|
||||
|
||||
|
||||
|
@ -74,6 +74,18 @@ file
|
|||
200
|
||||
ncorbic
|
||||
|
||||
safe_sangoma.rc
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-11-13T17:07:38.000000Z
|
||||
645af0279043395cde238ac1a2246b52
|
||||
2009-11-13T19:11:52.785901Z
|
||||
224
|
||||
ncorbic
|
||||
|
||||
smg.rc.ss7boost
|
||||
file
|
||||
|
||||
|
@ -92,9 +104,21 @@ file
|
|||
|
||||
|
||||
|
||||
2009-09-17T21:01:04.000000Z
|
||||
ac506d788aafcc64a63c12018d89ba0f
|
||||
2009-09-17T21:48:55.845572Z
|
||||
203
|
||||
2009-11-13T16:41:23.000000Z
|
||||
4df11cf9c5f0ff1e62b0b480ea8f0d6c
|
||||
2009-11-13T19:11:52.785901Z
|
||||
224
|
||||
ncorbic
|
||||
|
||||
smg.rc.isupd_only
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-09-23T18:59:44.000000Z
|
||||
c903841431ea2f2b592986f41485f7f0
|
||||
2009-09-23T20:02:33.658517Z
|
||||
208
|
||||
ncorbic
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# safe_sangoma.rc
|
||||
|
||||
#NOTIFY is list of email address that will be notified if
|
||||
#safe_sangoma has to restart a daemon
|
||||
#
|
||||
#Note: NOTIFY uses mail command to send email. The from
|
||||
#address will be the user@hostname.com. Some mail servers
|
||||
#will reject this email as junk/spam.
|
||||
#Gmail accounts work very well.
|
||||
#--------------------------------------------------------
|
||||
NOTIFY=""
|
||||
|
||||
|
||||
#EXEC is the absolute path to an external script/app
|
||||
#that is to be executed after safe_sangoma restarts a daemon
|
||||
#--------------------------------------------------------
|
||||
EXEC=""
|
|
@ -7,4 +7,5 @@ SANGOMA_BRID="NO"
|
|||
SANGOMA_SS7ISUP="YES"
|
||||
SANGOMA_SS7BOOST="NO"
|
||||
SANGOMA_MEDIA_GATEWAY="YES"
|
||||
SANGOMA_SAFE_MODE="YES"
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# smg.rc SMG_RC FILE
|
||||
# Note: This file is 'executed' by the shell script, so
|
||||
# the usual shell syntax must be observed.
|
||||
SANGOMA_PRID="NO"
|
||||
SANGOMA_BRID="NO"
|
||||
SANGOMA_SS7ISUP="YES"
|
||||
SANGOMA_SS7BOOST="NO"
|
||||
SANGOMA_MEDIA_GATEWAY="NO"
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# safe_sangoma.rc
|
||||
|
||||
#NOTIFY is list of email address that will be notified if
|
||||
#safe_sangoma has to restart a daemon
|
||||
#
|
||||
#Note: NOTIFY uses mail command to send email. The from
|
||||
#address will be the user@hostname.com. Some mail servers
|
||||
#will reject this email as junk/spam.
|
||||
#Gmail accounts work very well.
|
||||
#--------------------------------------------------------
|
||||
NOTIFY=""
|
||||
|
||||
|
||||
#EXEC is the absolute path to an external script/app
|
||||
#that is to be executed after safe_sangoma restarts a daemon
|
||||
#--------------------------------------------------------
|
||||
EXEC=""
|
|
@ -7,4 +7,5 @@ SANGOMA_BRID="NO"
|
|||
SANGOMA_SS7ISUP="YES"
|
||||
SANGOMA_SS7BOOST="NO"
|
||||
SANGOMA_MEDIA_GATEWAY="YES"
|
||||
SANGOMA_SAFE_MODE="YES"
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# smg.rc SMG_RC FILE
|
||||
# Note: This file is 'executed' by the shell script, so
|
||||
# the usual shell syntax must be observed.
|
||||
SANGOMA_PRID="NO"
|
||||
SANGOMA_BRID="NO"
|
||||
SANGOMA_SS7ISUP="YES"
|
||||
SANGOMA_SS7BOOST="NO"
|
||||
SANGOMA_MEDIA_GATEWAY="NO"
|
||||
|
|
@ -7,31 +7,46 @@ shift
|
|||
APPARGS="$*" # Grab any args passed to safe_sangoma
|
||||
TTY= # TTY (if you want one) for APP to run on
|
||||
CONSOLE=no # Whether or not you want a console
|
||||
#NOTIFY=user@email.com # Who to notify about crashes
|
||||
#EXEC=/path/to/somescript # Run this command if Asterisk crashes
|
||||
MACHINE=`hostname` # To specify which machine has crashed when getting the mail
|
||||
DUMPDROP=/tmp
|
||||
SLEEPSECS=2
|
||||
BINDIR=/usr/sbin
|
||||
BINDIR_SS7="/usr/local/ss7box"
|
||||
PIDFILE=/var/run/$APP.pid
|
||||
CORENAME=$(cat /proc/sys/kernel/core_pattern)
|
||||
VARDIR=/var/log
|
||||
PROD="safe_sangoma"
|
||||
|
||||
WAN_HOME=/etc/wanpipe
|
||||
META_SMG_CONF=$WAN_HOME/safe_sangoma.rc
|
||||
|
||||
# Read meta-configuration file.
|
||||
# metconf file should define NOTIFY or EXEC path script
|
||||
# to run
|
||||
if [ -f $META_SMG_CONF ]
|
||||
then . $META_SMG_CONF
|
||||
fi
|
||||
|
||||
if [ -z $APP ]; then
|
||||
echo
|
||||
echo "Error: APP argument not specified"
|
||||
logit "Error: APP argument not specified"
|
||||
echo
|
||||
echo "Usage: safe_sangoma <app_name> <app arguments>"
|
||||
logit "Usage: safe_sangoma <app_name> <app arguments>"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e $BINDIR_SS7/$APP ]; then
|
||||
BINDIR=$BINDIR_SS7
|
||||
fi
|
||||
|
||||
if [ ! -e $BINDIR/$APP ]; then
|
||||
echo
|
||||
echo "Error: APP not found: $BINDIR/$APP"
|
||||
logit "Error: APP not found: $BINDIR/$APP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# run APP with this priority
|
||||
PRIORITY=0
|
||||
|
||||
|
@ -46,12 +61,12 @@ MAXFILES=32768
|
|||
# starting safe_sangoma when APP is running is very bad.
|
||||
PID=`pidof $APP`
|
||||
if [ ! -z $PID ]; then
|
||||
echo "Error: $APP already running. $0 will exit now."
|
||||
logit "Error: $APP already running. $0 will exit now."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $PIDFILE ]; then
|
||||
echo "Error: $APP pid file $PIDFILE exists!. $0 will exit now."
|
||||
logit "Error: $APP pid file $PIDFILE exists!. $0 will exit now."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -61,8 +76,8 @@ fi
|
|||
# if we're not root, fall back to standard everything.
|
||||
if [ `id -u` != 0 ]
|
||||
then
|
||||
echo "Oops. I'm not root. Falling back to standard prio and file max." >&2
|
||||
echo "This is NOT suitable for large systems." >&2
|
||||
logit "Oops. I'm not root. Falling back to standard prio and file max." >&2
|
||||
logit "This is NOT suitable for large systems." >&2
|
||||
PRIORITY=0
|
||||
else
|
||||
if `echo $OSTYPE | grep linux 2>&1 > /dev/null `
|
||||
|
@ -124,7 +139,7 @@ ulimit -c unlimited
|
|||
#fi
|
||||
|
||||
if [ ! -w ${DUMPDROP} ]; then
|
||||
echo "Cannot write to ${DUMPDROP}" >&2
|
||||
logit "Cannot write to ${DUMPDROP}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -136,15 +151,24 @@ trap '' PIPE
|
|||
#
|
||||
# Run scripts to set any environment variables or do any other system-specific setup needed
|
||||
#
|
||||
|
||||
if [ -d /etc/wanpipe/safe_startup.d ]; then
|
||||
for script in /etc/wanpipe/safe_startup.d/*.sh; do
|
||||
if [ -x ${script} ]; then
|
||||
source ${script}
|
||||
if [ -x $script ]; then
|
||||
logit "Executing startup script: $script"
|
||||
source $script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
logit()
|
||||
{
|
||||
local data="$1"
|
||||
|
||||
echo "$PROD: $data"
|
||||
logger "$PROD: $data"
|
||||
}
|
||||
|
||||
run_sangoma()
|
||||
{
|
||||
while :; do
|
||||
|
@ -153,26 +177,38 @@ run_sangoma()
|
|||
nice -n $PRIORITY ${BINDIR}/$APP ${APPARGS}
|
||||
|
||||
EXITSTATUS=$?
|
||||
echo "$APP ended with exit status $EXITSTATUS"
|
||||
logit "$APP ended with exit status $EXITSTATUS"
|
||||
if [ "$EXITSTATUS" = "0" ]; then
|
||||
# Properly shutdown....
|
||||
echo "$APP shutdown normally."
|
||||
logit "$APP shutdown normally."
|
||||
exit 0
|
||||
elif [ $EXITSTATUS -gt 128 ]; then
|
||||
let EXITSIGNAL=EXITSTATUS-128
|
||||
echo "$APP exited on signal $EXITSIGNAL."
|
||||
logit "$APP exited on signal $EXITSIGNAL."
|
||||
else
|
||||
echo "$APP died with code $EXITSTATUS."
|
||||
logit "$APP died with code $EXITSTATUS."
|
||||
fi
|
||||
|
||||
if [ "$NOTIFY" != "" ]; then
|
||||
echo "$APP on $MACHINE exited on signal $EXITSIGNAL. Might want to take a peek." | \
|
||||
mail -s "$APP Died" $NOTIFY
|
||||
logfile="/etc/wanpipe/safe_sangoma_crash_"$APP"_"$$".log"
|
||||
echo > $logfile
|
||||
date >> $logfile
|
||||
echo >> $logfile
|
||||
echo "$APP on $MACHINE exited on signal $EXITSIGNAL. " >> $logfile
|
||||
echo >> $logfile
|
||||
echo "/var/log/messages" >> $logfile
|
||||
echo "====================" >> $logfile
|
||||
tail -n 50 /var/log/messages >> $logfile
|
||||
echo "====================" >> $logfile
|
||||
echo >> $logfile
|
||||
cat $logfile | \
|
||||
mail -s "$APP on $MACHINE Died" $NOTIFY
|
||||
ret=$?
|
||||
logit "Email sent to $NOTIFY result $ret"
|
||||
fi
|
||||
if [ "$EXEC" != "" ]; then
|
||||
$EXEC
|
||||
fi
|
||||
|
||||
PID=`cat ${PIDFILE}`
|
||||
if [ -f /tmp/$CORENAME.${PID} ]; then
|
||||
mv /tmp/$CORENAME.${PID} ${DUMPDROP}/core.$APP.`hostname`-`date -Iseconds` &
|
||||
|
@ -180,7 +216,7 @@ run_sangoma()
|
|||
mv /tmp/$CORENAME ${DUMPDROP}/core.$APP.`hostname`-`date -Iseconds` &
|
||||
fi
|
||||
|
||||
echo "Automatically restarting $APP."
|
||||
logit "Automatically restarting $APP."
|
||||
sleep $SLEEPSECS
|
||||
\rm -f ${PIDFILE}
|
||||
done
|
||||
|
|
|
@ -9,6 +9,21 @@
|
|||
*
|
||||
* =============================================
|
||||
*
|
||||
* v1.59 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Changed w1g1 to s1c1
|
||||
*
|
||||
* v1.58 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Added bridge tdm to ip functionality
|
||||
*
|
||||
* v1.57 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Support for woomera multiple profiles
|
||||
*
|
||||
* v1.56 David Yat Sin <dyatsin@sangoma.com>
|
||||
* Changed BRI to run with HWEC in non-persist mode
|
||||
*
|
||||
* v1.55 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Updated the base media port to 10000 and max media ports to 5000
|
||||
*
|
||||
* v1.54 Nenad Corbic <ncorbic@sangoma.com>
|
||||
* Bug added in 1.51 release causing call on channel 31 to fail.
|
||||
*
|
||||
|
@ -299,14 +314,24 @@ static char ps_progname[]="sangoma_mgd";
|
|||
|
||||
static struct woomera_interface woomera_dead_dev;
|
||||
|
||||
|
||||
/* For 3.4. release always set to 1 */
|
||||
#ifdef BRI_PROT
|
||||
static unsigned char tdmv_hwec_persist = 1;
|
||||
#else
|
||||
static unsigned char tdmv_hwec_persist = 1;
|
||||
#endif
|
||||
struct woomera_server server;
|
||||
|
||||
struct smg_tdm_ip_bridge g_smg_ip_bridge_idx[MAX_SMG_BRIDGE];
|
||||
pthread_mutex_t g_smg_ip_bridge_lock;
|
||||
|
||||
#if 0
|
||||
#define DOTRACE
|
||||
#endif
|
||||
|
||||
|
||||
#define SMG_VERSION "v1.54"
|
||||
#define SMG_VERSION "v1.59"
|
||||
|
||||
/* enable early media */
|
||||
#if 1
|
||||
|
@ -356,7 +381,7 @@ static int drop_seq=0;
|
|||
|
||||
const char WELCOME_TEXT[] =
|
||||
"================================================================================\n"
|
||||
"Sangoma Media Gateway Daemon v1.54 \n"
|
||||
"Sangoma Media Gateway Daemon v1.59 \n"
|
||||
"\n"
|
||||
"TDM Signal Media Gateway for Sangoma/Wanpipe Cards\n"
|
||||
"Copyright 2005, 2006, 2007 \n"
|
||||
|
@ -485,8 +510,14 @@ isup_exec_cmd_retry:
|
|||
static int get_span_chan_from_interface(char* interface, int *span_ptr, int *chan_ptr)
|
||||
{
|
||||
int span, chan;
|
||||
int err;
|
||||
|
||||
if (sscanf(interface, "w%dg%d", &span, &chan) == 2) {
|
||||
err=sscanf(interface, "s%dc%d", &span, &chan);
|
||||
if (err!=2) {
|
||||
err=sscanf(interface, "w%dg%d", &span, &chan);
|
||||
}
|
||||
|
||||
if (err==2) {
|
||||
if (smg_validate_span_chan(span,chan) != 0) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log,
|
||||
"WOOMERA Warning invalid span chan in interface %s\n",
|
||||
|
@ -975,7 +1006,7 @@ waitfor_socket_tryagain:
|
|||
}
|
||||
|
||||
|
||||
static int waitfor_2sockets(int fda, int fdb, char *a, char *b, int timeout)
|
||||
int waitfor_2sockets(int fda, int fdb, char *a, char *b, int timeout)
|
||||
{
|
||||
struct pollfd pfds[2];
|
||||
int res = 0;
|
||||
|
@ -999,8 +1030,6 @@ waitfor_2sockets_tryagain:
|
|||
pfds[0].events = POLLIN | errflags;
|
||||
pfds[1].events = POLLIN | errflags;
|
||||
|
||||
|
||||
|
||||
res = poll(pfds, 2, timeout);
|
||||
|
||||
if (res > 0) {
|
||||
|
@ -1073,7 +1102,7 @@ static struct media_session *media_session_new(struct woomera_interface *woomera
|
|||
/* Setup artificial DTMF stuff */
|
||||
memset(&ms->tone_session, 0, sizeof(ms->tone_session));
|
||||
if (teletone_init_session(&ms->tone_session, 0, NULL, NULL)) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Failed to initialize TONE [w%ig%i]!\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Failed to initialize TONE [s%ic%i]!\n",
|
||||
span+1,chan+1);
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1113,7 @@ static struct media_session *media_session_new(struct woomera_interface *woomera
|
|||
teletone_dtmf_detect_init (&ms->dtmf_detect, SMG_DTMF_RATE);
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Memory Alloc Failed [w%ig%i]!\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "ERROR: Memory Alloc Failed [s%ic%i]!\n",
|
||||
span+1,chan+1);
|
||||
}
|
||||
|
||||
|
@ -1300,7 +1329,7 @@ retry_loop:
|
|||
usleep(500000);
|
||||
goto retry_loop;
|
||||
}
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE MEDIA Socket Error (%s) if=[%s] [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE MEDIA Socket Error (%s) if=[%s] [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
|
||||
} else {
|
||||
|
@ -1337,7 +1366,7 @@ retry_loop:
|
|||
}
|
||||
|
||||
if (server.loop_trace) {
|
||||
sprintf(filename,"/smg/w%ig%i-loop.trace",woomera->span+1,woomera->chan+1);
|
||||
sprintf(filename,"/smg/s%ic%i-loop.trace",woomera->span+1,woomera->chan+1);
|
||||
unlink(filename);
|
||||
filed = safe_fopen(filename, "w");
|
||||
}
|
||||
|
@ -1451,7 +1480,9 @@ static void *media_thread_run(void *obj)
|
|||
wanpipe_tdm_api_t tdm_api;
|
||||
FILE *tx_fd=NULL;
|
||||
int sock_timeout=200;
|
||||
int hwec_reenable=0;
|
||||
|
||||
int hwec_enabled=0, hwec_reenable=0;
|
||||
|
||||
int open_cnt = 0;
|
||||
|
||||
open_cnt=0;
|
||||
|
@ -1523,13 +1554,13 @@ media_retry:
|
|||
if (!woomera_test_flag(woomera, WFLAG_MEDIA_END)) {
|
||||
media_retry_cnt++;
|
||||
if (media_retry_cnt < 5) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Retry [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Retry [s%ic%i]\n",
|
||||
woomera->span+1, woomera->chan+1);
|
||||
usleep(100000);
|
||||
goto media_retry;
|
||||
}
|
||||
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Error (%s) if=[%s] [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WANPIPE Socket Error (%s) if=[%s] [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
|
||||
/* Switch Congestion */
|
||||
|
@ -1571,15 +1602,15 @@ media_retry:
|
|||
# ifdef LIBSANGOMA_GET_HWDTMF
|
||||
ms->hw_dtmf=sangoma_tdm_get_hw_dtmf(ms->sangoma_sock, &tdm_api);
|
||||
if (ms->hw_dtmf) {
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Supported [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Supported [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
} else {
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
}
|
||||
#else
|
||||
ms->hw_dtmf=0;
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [w%ig%i]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "HW DTMF Not Supported [s%ic%i]\n",
|
||||
strerror(errno), woomera->interface, woomera->span+1, woomera->chan+1);
|
||||
# warning "libsangoma missing hwdtmf feature: not up to date!"
|
||||
|
||||
|
@ -1592,16 +1623,30 @@ media_retry:
|
|||
ms->oob_disable = 1;
|
||||
}
|
||||
#endif
|
||||
if (!bearer_cap_is_audio(woomera->bearer_cap)) {
|
||||
int err;
|
||||
err=sangoma_tdm_disable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err == 0) {
|
||||
hwec_reenable=1;
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Disabling hwec Ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Disabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
|
||||
if (!tdmv_hwec_persist) {
|
||||
// BRI cards start with HWEC in bypass disable state
|
||||
if (bearer_cap_is_audio(woomera->bearer_cap)) {
|
||||
int err;
|
||||
err=sangoma_tdm_enable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err == 0) {
|
||||
hwec_enabled=1;
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Enabling hwec Ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Enabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!bearer_cap_is_audio(woomera->bearer_cap)) {
|
||||
int err;
|
||||
err=sangoma_tdm_disable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err == 0) {
|
||||
hwec_reenable=1;
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Disabling hwec Ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Disabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sangoma_frame_len = sangoma_tdm_get_usr_mtu_mru(ms->sangoma_sock,&tdm_api);
|
||||
|
@ -1878,13 +1923,25 @@ media_retry:
|
|||
|
||||
media_thread_exit:
|
||||
|
||||
if (hwec_reenable) {
|
||||
int err;
|
||||
err=sangoma_tdm_enable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err==0) {
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Re-enabling hwec ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Re-enabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
if (!tdmv_hwec_persist) {
|
||||
if (hwec_enabled) {
|
||||
int err;
|
||||
err=sangoma_tdm_disable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err==0) {
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] disabling hwec ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] disabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (hwec_reenable) {
|
||||
int err;
|
||||
err=sangoma_tdm_enable_hwec(ms->sangoma_sock, &tdm_api);
|
||||
if (err==0) {
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log, "MEDIA [%s] Re-enabling hwec ok\n",woomera->interface);
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "MEDIA [%s] Re-enabling hwec Failed (%s)\n",woomera->interface, strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2167,9 +2224,9 @@ static struct woomera_interface * launch_woomera_loop_thread(short_signal_event_
|
|||
struct woomera_interface *woomera = NULL;
|
||||
char callid[20];
|
||||
|
||||
sprintf(callid, "w%dg%d", event->span+1,event->chan+1);
|
||||
sprintf(callid, "s%dc%d", event->span+1,event->chan+1);
|
||||
|
||||
if ((woomera = alloc_woomera())) {
|
||||
if ((woomera = alloc_woomera())) {
|
||||
|
||||
woomera->chan = event->chan;
|
||||
woomera->span = event->span;
|
||||
|
@ -2790,7 +2847,7 @@ static int handle_woomera_media_accept_answer(struct woomera_interface *woomera,
|
|||
SIGBOOST_EVENT_CALL_ANSWERED,
|
||||
0);
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log,
|
||||
"Sent SIGBOOST_EVENT_CALL_ANSWERED [w%dg%d]\n",
|
||||
"Sent SIGBOOST_EVENT_CALL_ANSWERED [s%dc%d]\n",
|
||||
woomera->span+1,woomera->chan+1);
|
||||
} else {
|
||||
struct woomera_event wevent;
|
||||
|
@ -2860,6 +2917,7 @@ static int handle_woomera_call_start (struct woomera_interface *woomera,
|
|||
char *uil1p = woomera_message_header(wmsg, "uil1p");
|
||||
char *called = wmsg->callid;
|
||||
char *grp = wmsg->callid;
|
||||
char *profile;
|
||||
char *p;
|
||||
int cause = 34;
|
||||
int tg = 0;
|
||||
|
@ -2887,7 +2945,15 @@ static int handle_woomera_call_start (struct woomera_interface *woomera,
|
|||
}
|
||||
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "New Call %d/%d\n", server.call_count, server.max_calls);
|
||||
/* Remove profile name out of destiantion */
|
||||
if ((profile = strchr(called, ':'))) {
|
||||
profile++;
|
||||
called=profile;
|
||||
grp=profile;
|
||||
}
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "New Call %d/%d origdest=%s newdest=%s\n",
|
||||
server.call_count, server.max_calls, wmsg->callid, called);
|
||||
|
||||
switch(called[0]) {
|
||||
case 'g':
|
||||
|
@ -3166,8 +3232,13 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
char *session=NULL;
|
||||
int span, chan;
|
||||
char ifname[100];
|
||||
int err;
|
||||
|
||||
/* If session does not exist this is an incoming call */
|
||||
sscanf(unique_id, "w%dg%d", &span, &chan);
|
||||
err=sscanf(unique_id, "s%dc%d", &span, &chan);
|
||||
if (err!=2) {
|
||||
err=sscanf(unique_id, "w%dg%d", &span, &chan);
|
||||
}
|
||||
span--;
|
||||
chan--;
|
||||
|
||||
|
@ -3254,14 +3325,14 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
int clients=server.process_table[span][chan].clients;
|
||||
if (server.process_table[span][chan].clients < 0) {
|
||||
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "WOOMERA CMD: Warning Clients (%i) Race condition on Hangup [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "WOOMERA CMD: Warning Clients (%i) Race condition on Hangup [s%dc%d]\n",
|
||||
clients, span+1,chan+1);
|
||||
|
||||
} else if (server.process_table[span][chan].clients > 1) {
|
||||
server.process_table[span][chan].clients--;
|
||||
pthread_mutex_unlock(&server.process_lock);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Got Hungup on Multiple Clients %i, skipping hangup [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Got Hungup on Multiple Clients %i, skipping hangup [s%dc%d]\n",
|
||||
clients, span+1,chan+1);
|
||||
|
||||
cause=16;
|
||||
|
@ -3280,14 +3351,14 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
woomera_set_flag(woomera, WFLAG_HANGUP);
|
||||
return;
|
||||
}
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Hanging up channel [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "WOOMERA CMD: Hanging up channel [s%dc%d]\n",
|
||||
span+1,chan+1);
|
||||
}
|
||||
#endif
|
||||
|
||||
server.process_table[span][chan].dev=woomera;
|
||||
strncpy(woomera->session,unique_id,sizeof(woomera->session));
|
||||
sprintf(ifname,"w%dg%d",span+1,chan+1);
|
||||
sprintf(ifname,"s%dc%d",span+1,chan+1);
|
||||
woomera_set_interface(woomera, ifname);
|
||||
|
||||
woomera->span=span;
|
||||
|
@ -3365,7 +3436,7 @@ static void interpret_command(struct woomera_interface *woomera, struct woomera_
|
|||
}
|
||||
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "Hangup Received: [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, woomera->log, "Hangup Received: [s%dc%d]\n",
|
||||
span+1,chan+1);
|
||||
|
||||
|
||||
|
@ -3468,7 +3539,7 @@ static void handle_call_answer(short_signal_event_t *event)
|
|||
} else {
|
||||
int err;
|
||||
err=0;
|
||||
sprintf(callid, "w%dg%d", event->span + 1, event->chan + 1);
|
||||
sprintf(callid, "s%dc%d", event->span + 1, event->chan + 1);
|
||||
woomera_set_interface(woomera, callid);
|
||||
#ifndef WOOMERA_EARLY_MEDIA
|
||||
err=launch_media_thread(woomera);
|
||||
|
@ -3506,7 +3577,7 @@ static void handle_call_answer(short_signal_event_t *event)
|
|||
#endif
|
||||
|
||||
if (!kill) {
|
||||
new_woomera_event_printf(&wevent, "EVENT CONNECT w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT CONNECT s%dc%d%s"
|
||||
"Unique-Call-Id: %s%s",
|
||||
event->span+1,
|
||||
event->chan+1,
|
||||
|
@ -3518,7 +3589,7 @@ static void handle_call_answer(short_signal_event_t *event)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log, "Answer requested on non-existant session. [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_PROD, server.log, "Answer requested on non-existant session. [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
kill++;
|
||||
}
|
||||
|
@ -3539,10 +3610,10 @@ handle_call_answer_end:
|
|||
SIGBOOST_EVENT_CALL_STOPPED,
|
||||
SIGBOOST_RELEASE_CAUSE_NORMAL);
|
||||
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to Answer without session [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to Answer without session [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
#endif
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Received Answer with no session [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Received Answer with no session [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -3564,7 +3635,7 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
int err, span, chan;
|
||||
|
||||
pull_from_holding_tank(event->call_setup_id,event->span,event->chan);
|
||||
sprintf(callid, "w%dg%d", event->span + 1, event->chan + 1);
|
||||
sprintf(callid, "s%dc%d", event->span + 1, event->chan + 1);
|
||||
|
||||
span = event->span;
|
||||
chan = event->chan;
|
||||
|
@ -3578,7 +3649,7 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
struct woomera_interface *tmp_woomera = server.process_table[span][chan].dev;
|
||||
woomera_set_flag(tmp_woomera,WFLAG_HANGUP);
|
||||
woomera_set_flag(tmp_woomera,WFLAG_MEDIA_END);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [w%dg%d] - Call ACK!\n", event->span+1, event->chan+1);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [s%dc%d] - Call ACK!\n", event->span+1, event->chan+1);
|
||||
kill++;
|
||||
}
|
||||
|
||||
|
@ -3636,7 +3707,7 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
#endif
|
||||
if (!kill) {
|
||||
|
||||
new_woomera_event_printf(&wevent, "EVENT PROCEED w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT PROCEED s%dc%d%s"
|
||||
"Channel-Name: g%d/%d%s"
|
||||
"Unique-Call-Id: %s%s",
|
||||
event->span+1,
|
||||
|
@ -3659,13 +3730,13 @@ static void handle_call_start_ack(short_signal_event_t *event)
|
|||
|
||||
enqueue_event(woomera, &wevent,EVENT_FREE_DATA);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Call Answered Event ID = %d Device = w%dg%d!\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Call Answered Event ID = %d Device = s%dc%d!\n",
|
||||
event->call_setup_id,woomera->span+1,woomera->chan+1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_PROD, server.log,
|
||||
"Event (START ACK) %d referrs to a non-existant session (%d) [w%dg%d]!\n",
|
||||
"Event (START ACK) %d referrs to a non-existant session (%d) [s%dc%d]!\n",
|
||||
event->event_id, event->call_setup_id,event->span+1, event->chan+1);
|
||||
kill++;
|
||||
}
|
||||
|
@ -3681,7 +3752,7 @@ woomera_call_ack_skip:
|
|||
SIGBOOST_EVENT_CALL_STOPPED,
|
||||
SIGBOOST_RELEASE_CAUSE_NORMAL);
|
||||
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to CALL START ACK without session [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_PROD, server.log, "Sent CALL STOP to CALL START ACK without session [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -3721,7 +3792,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
woomera_set_cause_topbx(woomera,event->release_cause);
|
||||
woomera_set_flag(woomera, (WFLAG_HANGUP|WFLAG_HANGUP_NACK_ACK));
|
||||
|
||||
new_woomera_event_printf(&wevent, "EVENT HANGUP w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT HANGUP s%dc%d%s"
|
||||
"Unique-Call-Id: %s%s"
|
||||
"Cause: %s%s"
|
||||
"Q931-Cause-Code: %d%s",
|
||||
|
@ -3780,7 +3851,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
|
||||
if (woomera) {
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event START NACK on w%dg%d ptr=%p ms=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event START NACK on s%dc%d ptr=%p ms=%p\n",
|
||||
woomera->span+1,woomera->chan+1,woomera,woomera->ms);
|
||||
|
||||
if (!woomera_test_flag(woomera,WFLAG_HANGUP)){
|
||||
|
@ -3800,13 +3871,13 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
} else {
|
||||
/* Valid state when we are not in autoacm mode */
|
||||
ack++;
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event: NACK no woomera on span chan [w%dg%d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event: NACK no woomera on span chan [s%dc%d]!\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Error: Start Nack Invalid State Should not happen [%d] [w%dg%d]!\n",
|
||||
"Error: Start Nack Invalid State Should not happen [%d] [s%dc%d]!\n",
|
||||
event->call_setup_id, event->span+1, event->chan+1);
|
||||
ack++;
|
||||
}
|
||||
|
@ -3816,7 +3887,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
log_printf(SMG_LOG_ALL, server.log, "WARNING: All ckt busy Timeout=%i!\n",server.all_ckt_busy);
|
||||
}
|
||||
if (event->release_cause == SIGBOOST_CALL_SETUP_CSUPID_DBL_USE) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Double use on [w%ig%i] setup id %i!\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "WARNING: Double use on [s%ic%i] setup id %i!\n",
|
||||
event->span+1,event->chan+1,event->call_setup_id);
|
||||
}
|
||||
|
||||
|
@ -3843,7 +3914,7 @@ static void handle_call_start_nack(short_signal_event_t *event)
|
|||
0);
|
||||
|
||||
if (!woomera) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event (NACK ACK) %d referrs to a non-existant session (%d) [w%dg%d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event (NACK ACK) %d referrs to a non-existant session (%d) [s%dc%d]!\n",
|
||||
event->event_id,event->call_setup_id, event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -3866,7 +3937,7 @@ static void handle_call_loop_start(short_signal_event_t *event)
|
|||
|
||||
|
||||
log_printf(SMG_LOG_PROD, server.log,
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [w%dg] ptr=%d\n",
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [s%dc%d] ptr=%d\n",
|
||||
event->span+1, event->chan+1, server.process_table[event->span][event->chan].dev);
|
||||
|
||||
pthread_mutex_unlock(&server.process_lock);
|
||||
|
@ -3874,7 +3945,7 @@ static void handle_call_loop_start(short_signal_event_t *event)
|
|||
|
||||
}
|
||||
|
||||
sprintf(callid, "w%dg%d", event->span+1,event->chan+1);
|
||||
sprintf(callid, "s%dc%d", event->span+1,event->chan+1);
|
||||
sprintf(server.process_table[event->span][event->chan].session,
|
||||
"%s-%i-%i",callid,rand(),rand());
|
||||
session=server.process_table[event->span][event->chan].session;
|
||||
|
@ -3890,7 +3961,7 @@ static void handle_call_loop_start(short_signal_event_t *event)
|
|||
SIGBOOST_EVENT_CALL_START_NACK,
|
||||
17);
|
||||
log_printf(SMG_LOG_PROD, server.log,
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [w%dg] ptr=%d\n",
|
||||
"Sent (From Handle Loop START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [s%dc%d] ptr=%d\n",
|
||||
event->span+1, event->chan+1, server.process_table[event->span][event->chan].dev);
|
||||
}
|
||||
|
||||
|
@ -3918,7 +3989,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
|
||||
if (smg_validate_span_chan(event->span,event->chan)) {
|
||||
log_printf(0,server.log,
|
||||
"Error: invalid span=% chan=%i on incoming call [w%dg%d] - Call START!\n",
|
||||
"Error: invalid span=% chan=%i on incoming call [s%dc%d] - Call START!\n",
|
||||
event->span+1, event->chan+1, event->span+1,event->chan+1);
|
||||
return;
|
||||
}
|
||||
|
@ -3929,7 +4000,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
|
||||
woomera_set_flag(tmp_woomera,WFLAG_HANGUP);
|
||||
woomera_set_flag(tmp_woomera,WFLAG_MEDIA_END);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [w%dg%d] - Call START!\n", event->span+1, event->chan+1);
|
||||
log_printf(SMG_LOG_ALL,server.log,"Call Overrun on [s%dc%d] - Call START!\n", event->span+1, event->chan+1);
|
||||
|
||||
isup_exec_command(event->span,
|
||||
event->chan,
|
||||
|
@ -3938,14 +4009,14 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
17);
|
||||
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Sent (From Handle START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [w%dg%d]\n",
|
||||
"Sent (From Handle START) Call Busy SIGBOOST_EVENT_CALL_START_NACK [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
pthread_mutex_unlock(&server.process_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(callid, "w%dg%d", event->span+1,event->chan+1);
|
||||
sprintf(callid, "s%dc%d", event->span+1,event->chan+1);
|
||||
sprintf(server.process_table[event->span][event->chan].session,
|
||||
"%s-%i-%i",callid,rand(),rand());
|
||||
session=server.process_table[event->span][event->chan].session;
|
||||
|
@ -3976,7 +4047,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
}
|
||||
}
|
||||
|
||||
new_woomera_event_printf(&wevent, "EVENT INCOMING w%dg%d%s"
|
||||
new_woomera_event_printf(&wevent, "EVENT INCOMING s%dc%d%s"
|
||||
"Unique-Call-Id: %s%s"
|
||||
"Remote-Number: %s%s"
|
||||
"Remote-Name: %s%s"
|
||||
|
@ -4044,7 +4115,7 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
SIGBOOST_EVENT_CALL_STOPPED,
|
||||
17);
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_STOPPED [w%dg%d]\n",
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_STOPPED [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
} else {
|
||||
|
@ -4054,13 +4125,15 @@ static void handle_call_start(call_signal_event_t *event)
|
|||
SIGBOOST_EVENT_CALL_START_NACK,
|
||||
17);
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_START_NACK [w%dg%d]\n",
|
||||
"CALL INCOMING: Enqueue Error Sent SIGBOOST_EVENT_CALL_START_NACK [s%dc%d]\n",
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
server.process_table[event->span][event->chan].clients=clients;
|
||||
//pthread_mutex_lock(&server.process_lock);
|
||||
server.process_table[event->span][event->chan].clients = clients;
|
||||
//pthread_mutex_unlock(&server.process_lock);
|
||||
}
|
||||
|
||||
destroy_woomera_event_data(&wevent);
|
||||
|
@ -4073,20 +4146,20 @@ static void handle_incoming_digit(call_signal_event_t *event)
|
|||
int digits_len;
|
||||
|
||||
if (smg_validate_span_chan(event->span,event->chan)) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event DTMF on invalid span chan [w%dg%d] !\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event DTMF on invalid span chan [s%dc%d] !\n",
|
||||
event->span+1, event->chan+1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!event->called_number_digits_count) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error Incoming digit with len %s %d [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error Incoming digit with len %s %d [s%dc%d]\n",
|
||||
event->called_number_digits,
|
||||
event->called_number_digits_count,
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "Queuing incoming digits %s [w%dg%d]\n",
|
||||
log_printf(SMG_LOG_DEBUG_9, server.log, "Queuing incoming digits %s [s%dc%d]\n",
|
||||
event->called_number_digits,
|
||||
event->span+1, event->chan+1);
|
||||
|
||||
|
@ -4183,7 +4256,7 @@ static void handle_remove_loop(short_signal_event_t *event)
|
|||
/* We have to close the socket because
|
||||
At this point we are release span chan */
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event REMOVE LOOP on w%dg%d ptr=%p ms=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event REMOVE LOOP on s%dc%d ptr=%p ms=%p\n",
|
||||
woomera->span+1,woomera->chan+1,woomera,woomera->ms);
|
||||
|
||||
}
|
||||
|
@ -4226,7 +4299,7 @@ static void handle_call_stop(short_signal_event_t *event)
|
|||
/* We have to close the socket because
|
||||
At this point we are release span chan */
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP on w%dg%d ptr=%p ms=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP on s%dc%d ptr=%p ms=%p\n",
|
||||
woomera->span+1,woomera->chan+1,woomera,woomera->ms);
|
||||
|
||||
} else {
|
||||
|
@ -4245,7 +4318,7 @@ static void handle_call_stop(short_signal_event_t *event)
|
|||
|
||||
if (!woomera){
|
||||
/* This is allowed on incoming call if remote app does not answer it */
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP referrs to a non-existant session [w%dg%d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, server.log, "Event CALL STOP referrs to a non-existant session [s%dc%d]!\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
}
|
||||
|
@ -4279,14 +4352,14 @@ static void handle_call_stop_ack(short_signal_event_t *event)
|
|||
|
||||
|
||||
if (woomera) {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Stop Ack on [w%dg%d] [Setup ID: %d] [%s]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Stop Ack on [s%dc%d] [Setup ID: %d] [%s]!\n",
|
||||
event->span+1, event->chan+1, event->call_setup_id,
|
||||
woomera->interface);
|
||||
|
||||
woomera_clear_flag(woomera, WFLAG_WAIT_FOR_STOPPED_ACK);
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event CALL_STOP_ACK(%d) referrs to a non-existant session [w%dg%d] [Setup ID: %d]!\n",
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log, "Event CALL_STOP_ACK(%d) referrs to a non-existant session [s%dc%d] [Setup ID: %d]!\n",
|
||||
event->event_id, event->span+1, event->chan+1, event->call_setup_id);
|
||||
}
|
||||
|
||||
|
@ -4325,13 +4398,13 @@ static void handle_call_start_nack_ack(short_signal_event_t *event)
|
|||
* woomera client being down, in this case no
|
||||
* woomera thread is created */
|
||||
log_printf(SMG_LOG_DEBUG_8, server.log,
|
||||
"Event NACK ACK [w%dg%d] with valid span/chan no dev!\n",
|
||||
"Event NACK ACK [s%dc%d] with valid span/chan no dev!\n",
|
||||
event->span+1, event->chan+1);
|
||||
}
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_DEBUG_CALL, server.log,
|
||||
"Event NACK ACK referrs to a non-existant session [w%dg%d] [Setup ID: %d]!\n",
|
||||
"Event NACK ACK referrs to a non-existant session [s%dc%d] [Setup ID: %d]!\n",
|
||||
event->span+1, event->chan+1, event->call_setup_id);
|
||||
}
|
||||
|
||||
|
@ -4410,9 +4483,9 @@ static void *monitor_thread_run(void *obj)
|
|||
call_signal_connection_t *mcon=&server.mcon;
|
||||
call_signal_connection_t *mconp=&server.mconp;
|
||||
|
||||
pthread_mutex_lock(&server.thread_count_lock);
|
||||
pthread_mutex_lock(&server.thread_count_lock);
|
||||
server.thread_count++;
|
||||
pthread_mutex_unlock(&server.thread_count_lock);
|
||||
pthread_mutex_unlock(&server.thread_count_lock);
|
||||
|
||||
woomera_set_flag(&server.master_connection, WFLAG_MONITOR_RUNNING);
|
||||
|
||||
|
@ -4771,7 +4844,7 @@ woomera_session_close:
|
|||
woomera_set_flag(woomera, WFLAG_WAIT_FOR_STOPPED_ACK_SENT);
|
||||
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_STOPPED [w%dg%d] [%s] ptr=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_STOPPED [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1, chan+1,woomera->interface,woomera);
|
||||
} else {
|
||||
|
||||
|
@ -4783,11 +4856,11 @@ woomera_session_close:
|
|||
woomera->q931_rel_cause_tosig);
|
||||
woomera_set_flag(woomera, WFLAG_WAIT_FOR_NACK_ACK_SENT);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_START_NACK [w%dg%d] [%s] ptr=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "Woomera Sent SIGBOOST_EVENT_CALL_START_NACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1, chan+1,woomera->interface,woomera);
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "Woomera Not Sent CALL STOPPED - Instead NACK [w%dg%d] [%s] ptr=%p\n",
|
||||
log_printf(SMG_LOG_ALL, woomera->log, "Woomera Not Sent CALL STOPPED - Instead NACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1, chan+1,woomera->interface,woomera);
|
||||
|
||||
}
|
||||
|
@ -4797,7 +4870,7 @@ woomera_session_close:
|
|||
failure */
|
||||
if (!woomera->index) {
|
||||
/* In this case we really failed to tx STOP */
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log, "FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
}
|
||||
}
|
||||
|
@ -4825,14 +4898,14 @@ woo_re_hangup:
|
|||
woomera->q931_rel_cause_tosig);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log,
|
||||
"Sent (Ack) to SIGBOOST_EVENT_CALL_STOPPED_ACK [w%dg%d] [%s] ptr=%p\n",
|
||||
"Sent (Ack) to SIGBOOST_EVENT_CALL_STOPPED_ACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1,chan+1,woomera->interface,woomera);
|
||||
|
||||
}else{
|
||||
/* This should never happen! If it does
|
||||
we broke protocol */
|
||||
log_printf(SMG_LOG_ALL, woomera->log,
|
||||
"FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED_ACK [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
"FAILED: Woomera (R) SIGBOOST_EVENT_CALL_STOPPED_ACK [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
}
|
||||
|
||||
|
@ -4856,7 +4929,7 @@ woo_re_hangup:
|
|||
woomera->q931_rel_cause_tosig);
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_MISC, woomera->log,
|
||||
"Sent (Nack Ack) to SIGBOOST_EVENT_CALL_START_NACK_ACK [w%dg%d] [%s] ptr=%p\n",
|
||||
"Sent (Nack Ack) to SIGBOOST_EVENT_CALL_START_NACK_ACK [s%dc%d] [%s] ptr=%p\n",
|
||||
span+1,chan+1,woomera->interface,woomera);
|
||||
|
||||
woomera->index=0;
|
||||
|
@ -4872,7 +4945,7 @@ woo_re_hangup:
|
|||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, woomera->log,
|
||||
"FAILED: Sent (Nack Ack) SIGBOOST_EVENT_CALL_START_NACK_ACK [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
"FAILED: Sent (Nack Ack) SIGBOOST_EVENT_CALL_START_NACK_ACK [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
}
|
||||
|
||||
|
@ -5098,7 +5171,7 @@ woo_re_hangup:
|
|||
|
||||
if (server.process_table[span][chan]){
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Sanity Span Chan Still in use: [w%dg%d] [%s] Index=%d ptr=%p\n",
|
||||
"Sanity Span Chan Still in use: [s%dc%d] [%s] Index=%d ptr=%p\n",
|
||||
span+1, chan+1, woomera->interface, woomera->index, woomera);
|
||||
//server.process_table[span][chan] = NULL;
|
||||
}
|
||||
|
@ -5300,7 +5373,9 @@ static int configure_server(void)
|
|||
struct woomera_config cfg;
|
||||
char *var, *val;
|
||||
int cnt = 0;
|
||||
struct smg_tdm_ip_bridge *ip_bridge=NULL;
|
||||
|
||||
|
||||
server.dtmf_intr_ch = -1;
|
||||
|
||||
if (!woomera_open_file(&cfg, server.config_file)) {
|
||||
|
@ -5407,19 +5482,71 @@ static int configure_server(void)
|
|||
server.base_media_port = base;
|
||||
server.next_media_port = base;
|
||||
server.max_media_port = server.base_media_port + WOOMERA_MAX_MEDIA_PORTS;
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Base Media Port: %d\n",server.base_media_port);
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Base Media Port: %d\n",server.base_media_port);
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "max_media_ports")) {
|
||||
int max = atoi(val);
|
||||
if (max > WOOMERA_MAX_MEDIA_PORTS) {
|
||||
if (max >= 0) {
|
||||
server.max_media_port = server.base_media_port+max;
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Max Media Port: %d\n",server.max_media_port);
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Max Media Port: %d\n",server.max_media_port);
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "media_ip")) {
|
||||
strncpy(server.media_ip, val, sizeof(server.media_ip) -1);
|
||||
log_printf(SMG_LOG_ALL,server.log, "Server - Media IP: %s\n",server.media_ip);
|
||||
|
||||
} else if (!strcasecmp(var, "bridge_tdm_ip")) {
|
||||
int err=smg_get_ip_bridge_session(&ip_bridge);
|
||||
if (err) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error failed to get free ip bridge %i!\n",err);
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log, "\n======================= \n");
|
||||
log_printf(SMG_LOG_ALL,server.log, "Bridge - Configuration \n");
|
||||
log_printf(SMG_LOG_ALL,server.log, "======================= \n");
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "bridge_span")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && max <= 32 && ip_bridge) {
|
||||
ip_bridge->span=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Span: %i\n",ip_bridge->span);
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Span: ERROR: Invalid Value %s\n",val);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_chan")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && max < MAX_SMG_BRIDGE && ip_bridge) {
|
||||
ip_bridge->chan=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Chan: %i\n",ip_bridge->chan);
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Chan: ERROR: Invalid Value %s\n",val);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_local_ip")) {
|
||||
if (ip_bridge) {
|
||||
strncpy(ip_bridge->mcon.cfg.local_ip, val,
|
||||
sizeof(ip_bridge->mcon.cfg.local_ip) -1);
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Local IP: %s\n",ip_bridge->mcon.cfg.local_ip);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_remote_ip")) {
|
||||
if (ip_bridge) {
|
||||
strncpy(ip_bridge->mcon.cfg.remote_ip, val,
|
||||
sizeof(ip_bridge->mcon.cfg.remote_ip) -1);
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Remote IP: %s\n",ip_bridge->mcon.cfg.remote_ip);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_port")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && ip_bridge) {
|
||||
ip_bridge->mcon.cfg.local_port=max;
|
||||
ip_bridge->mcon.cfg.remote_port=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Port: %i\n",max);
|
||||
}
|
||||
} else if (!strcasecmp(var, "bridge_period")) {
|
||||
int max = atoi(val);
|
||||
if (max > 0 && ip_bridge) {
|
||||
ip_bridge->period=max;
|
||||
log_printf(SMG_LOG_ALL, server.log, "Bridge Period: %ims\n",ip_bridge->period);
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Invalid Option %s at line %d!\n", var, cfg.lineno);
|
||||
}
|
||||
|
@ -5797,10 +5924,11 @@ static int woomera_startup(int argc, char **argv)
|
|||
usleep(5000);
|
||||
|
||||
woomera_set_flag(&server.master_connection, WFLAG_RUNNING);
|
||||
|
||||
if (launch_monitor_thread()) {
|
||||
woomera_clear_flag(&server.master_connection, WFLAG_RUNNING);
|
||||
smg_log_cleanup();
|
||||
return 0;
|
||||
smg_log_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, "%s", WELCOME_TEXT);
|
||||
|
@ -5882,7 +6010,8 @@ int main(int argc, char *argv[])
|
|||
mlockall(MCL_FUTURE);
|
||||
memset(&server, 0, sizeof(server));
|
||||
memset(&woomera_dead_dev, 0, sizeof(woomera_dead_dev));
|
||||
|
||||
memset(&g_smg_ip_bridge_idx,0, sizeof(g_smg_ip_bridge_idx));
|
||||
|
||||
ret=nice(-5);
|
||||
|
||||
sdla_memdbg_init();
|
||||
|
@ -5892,12 +6021,17 @@ int main(int argc, char *argv[])
|
|||
openlog (ps_progname ,LOG_PID, LOG_LOCAL2);
|
||||
|
||||
if (! (ret = woomera_startup(argc, argv))) {
|
||||
exit(0);
|
||||
exit(0);
|
||||
}
|
||||
ret = main_thread();
|
||||
|
||||
ret = smg_ip_bridge_start();
|
||||
if (ret == 0) {
|
||||
ret = main_thread();
|
||||
}
|
||||
|
||||
woomera_shutdown();
|
||||
|
||||
smg_ip_bridge_stop();
|
||||
sdla_memdbg_free(1);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -32,8 +32,8 @@ woomera_port => 42420
|
|||
# If changing from default values
|
||||
# ensure that woomera client
|
||||
# UDP ports do not conflict.
|
||||
base_media_port => 9000
|
||||
max_media_ports => 899
|
||||
base_media_port => 10000
|
||||
max_media_ports => 5000
|
||||
|
||||
|
||||
#Used to play Sangoma Rocks on all
|
||||
|
@ -94,3 +94,31 @@ woomera_udp_seq => 0
|
|||
call_timeout=100
|
||||
|
||||
|
||||
#Enable tdm bridge profile 1
|
||||
#Note profile number must not be zero.
|
||||
#Configure all parameters for the bridge.
|
||||
#The opposite sangoma_mgd must be configured
|
||||
#with same parameters except IP address
|
||||
#need to be swaped.
|
||||
#bridge_tdm_ip => 1
|
||||
#bridge_span => 1
|
||||
#bridge_chan => 1
|
||||
#bridge_local_ip => 192.168.1.251
|
||||
#bridge_remote_ip => 192.168.1.252
|
||||
#bridge_port => 60000
|
||||
#bridge_period => 10 #milliseconds
|
||||
|
||||
|
||||
#Enable tdm bridge profile 2
|
||||
#Note profile number must not be zero.
|
||||
#Configure all parameters for the bridge.
|
||||
#The opposite sangoma_mgd must be configured
|
||||
#with same parameters except IP address
|
||||
#need to be swaped.
|
||||
#bridge_tdm_ip => 2
|
||||
#bridge_span => 1
|
||||
#bridge_chan => 2
|
||||
#bridge_local_ip => 192.168.1.251
|
||||
#bridge_remote_ip => 192.168.1.252
|
||||
#bridge_port => 60001
|
||||
#bridge_period => 10 #milliseconds
|
||||
|
|
|
@ -62,13 +62,13 @@
|
|||
#define PIDFILE "/var/run/sangoma_mgd.pid"
|
||||
#define PIDFILE_UNIT "/var/run/sangoma_mgd_unit.pid"
|
||||
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 899
|
||||
#define WOOMERA_MAX_MEDIA_PORTS 5000
|
||||
|
||||
#define CORE_EVENT_LEN 512
|
||||
#define WOOMERA_STRLEN 256
|
||||
#define WOOMERA_ARRAY_LEN 50
|
||||
#define WOOMERA_BODYLEN 2048
|
||||
#define WOOMERA_MIN_MEDIA_PORT 9000
|
||||
#define WOOMERA_MIN_MEDIA_PORT 10000
|
||||
#define WOOMERA_MAX_MEDIA_PORT (WOOMERA_MIN_MEDIA_PORT + WOOMERA_MAX_MEDIA_PORTS)
|
||||
#define WOOMERA_HARD_TIMEOUT 0
|
||||
#define WOOMERA_LINE_SEPERATOR "\r\n"
|
||||
|
@ -297,6 +297,26 @@ struct woomera_session {
|
|||
pthread_mutex_t media_lock;
|
||||
};
|
||||
|
||||
struct smg_tdm_ip_bridge {
|
||||
int init;
|
||||
int end;
|
||||
int span;
|
||||
int chan;
|
||||
#if 0
|
||||
int port;
|
||||
char local_ip[25];
|
||||
char remote_ip[25];
|
||||
#endif
|
||||
int period;
|
||||
int tdm_fd;
|
||||
call_signal_connection_t mcon;
|
||||
pthread_t thread;
|
||||
};
|
||||
|
||||
extern struct smg_tdm_ip_bridge g_smg_ip_bridge_idx[];
|
||||
extern pthread_mutex_t g_smg_ip_bridge_lock;
|
||||
|
||||
#define MAX_SMG_BRIDGE 32
|
||||
#define CORE_TANK_LEN CORE_MAX_CHAN_PER_SPAN*CORE_MAX_SPANS
|
||||
|
||||
struct woomera_server {
|
||||
|
@ -342,11 +362,12 @@ struct woomera_server {
|
|||
struct timeval all_ckt_busy_time;
|
||||
struct timeval restart_timeout;
|
||||
int dtmf_on;
|
||||
int dtmf_off;
|
||||
int dtmf_intr_ch;
|
||||
int dtmf_size;
|
||||
int dtmf_off;
|
||||
int dtmf_intr_ch;
|
||||
int dtmf_size;
|
||||
int strip_cid_non_digits;
|
||||
int call_timeout;
|
||||
struct smg_tdm_ip_bridge ip_bridge_idx[MAX_SMG_BRIDGE];
|
||||
};
|
||||
|
||||
extern struct woomera_server server;
|
||||
|
@ -359,6 +380,28 @@ struct woomera_config {
|
|||
int lineno;
|
||||
};
|
||||
|
||||
static inline int smg_get_ip_bridge_session(struct smg_tdm_ip_bridge **ip_bridge)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<MAX_SMG_BRIDGE;i++) {
|
||||
if (g_smg_ip_bridge_idx[i].init) {
|
||||
continue;
|
||||
}
|
||||
g_smg_ip_bridge_idx[i].init=1;
|
||||
*ip_bridge=&g_smg_ip_bridge_idx[i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
*ip_bridge=NULL;
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
static inline int smg_free_ip_bridge_session(struct smg_tdm_ip_bridge *ip_bridge)
|
||||
{
|
||||
memset(ip_bridge,0,sizeof(struct smg_tdm_ip_bridge));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void smg_get_current_priority(int *policy, int *priority)
|
||||
{
|
||||
|
@ -706,7 +749,7 @@ static inline int open_span_chan (unsigned char span, unsigned char chan)
|
|||
pthread_mutex_lock(&server.process_table[span][chan].media_lock);
|
||||
if(server.process_table[span][chan].media_used > 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log,
|
||||
"Critical Error: channel already opened [w%ig%i]\n", span, chan);
|
||||
"Critical Error: channel already opened [s%ic%i]\n", span, chan);
|
||||
} else {
|
||||
server.process_table[span][chan].media_used++;
|
||||
|
||||
|
@ -736,5 +779,8 @@ static inline void close_span_chan (int *socket, unsigned char span, unsigned ch
|
|||
|
||||
extern int smg_log_init(void);
|
||||
extern void smg_log_cleanup(void);
|
||||
extern int smg_ip_bridge_start(void);
|
||||
extern int smg_ip_bridge_stop(void);
|
||||
extern int waitfor_2sockets(int fda, int fdb, char *a, char *b, int timeout);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,376 @@
|
|||
|
||||
#include "sangoma_mgd.h"
|
||||
static int bridge_threads=0;
|
||||
|
||||
#define TEST_SEQ 0
|
||||
|
||||
static void *bridge_thread_run(void *obj)
|
||||
{
|
||||
struct smg_tdm_ip_bridge *bridge= (struct smg_tdm_ip_bridge*)obj;
|
||||
call_signal_connection_t *mcon = &bridge->mcon;
|
||||
wanpipe_tdm_api_t tdm_api;
|
||||
int ss = 0;
|
||||
char a=0,b=0;
|
||||
int bytes=0,err;
|
||||
unsigned char data[1024];
|
||||
unsigned int fromlen = sizeof(struct sockaddr_in);
|
||||
sangoma_api_hdr_t hdrframe;
|
||||
unsigned int udp_rx=0,udp_tx=0,tdm_rx=0,tdm_tx=0;
|
||||
unsigned int udp_rx_err=0, udp_tx_err=0;
|
||||
unsigned int tdm_rx_err=0, tdm_tx_err=0;
|
||||
int bridge_ip_sync=0;
|
||||
int err_flag=0;
|
||||
unsigned char prev_status=0;
|
||||
#if TEST_SEQ
|
||||
unsigned char tx_seq_cnt=0;
|
||||
unsigned char rx_seq_cnt=0;
|
||||
int i;
|
||||
int insync=0;
|
||||
#endif
|
||||
|
||||
memset(&hdrframe,0,sizeof(hdrframe));
|
||||
memset(data,0,sizeof(data));
|
||||
memset(&tdm_api,0,sizeof(tdm_api));
|
||||
|
||||
if (bridge->period) {
|
||||
err=sangoma_tdm_set_usr_period(bridge->tdm_fd, &tdm_api,bridge->period);
|
||||
if (err) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Failed to execute set period %i\n",__FUNCTION__,bridge->period);
|
||||
}
|
||||
}
|
||||
|
||||
sangoma_tdm_disable_hwec(bridge->tdm_fd, &tdm_api);
|
||||
|
||||
err=sangoma_tdm_flush_bufs(bridge->tdm_fd, &tdm_api);
|
||||
if (err) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Failed to execute tdm flush\n",__FUNCTION__);
|
||||
}
|
||||
|
||||
while (!bridge->end &&
|
||||
woomera_test_flag(&server.master_connection, WFLAG_RUNNING)) {
|
||||
|
||||
err_flag=0;
|
||||
|
||||
ss = waitfor_2sockets(mcon->socket,
|
||||
bridge->tdm_fd,
|
||||
&a, &b, 1000);
|
||||
|
||||
if (ss > 0) {
|
||||
|
||||
if (a) {
|
||||
|
||||
bytes = recvfrom(mcon->socket, &data[0], sizeof(data), MSG_DONTWAIT,
|
||||
(struct sockaddr *) &mcon->local_addr, &fromlen);
|
||||
|
||||
#if TEST_SEQ
|
||||
for (i=0;i<bytes;i++) {
|
||||
if (data[i] != rx_seq_cnt) {
|
||||
if (insync) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"Error: Data rx seq cnt %i expected %i\n",data[i],rx_seq_cnt);
|
||||
}
|
||||
rx_seq_cnt=data[i];
|
||||
insync=0;
|
||||
} else if (insync == 0) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"In sync\n");
|
||||
insync=1;
|
||||
}
|
||||
rx_seq_cnt++;
|
||||
}
|
||||
|
||||
|
||||
for (i=0;i<bytes;i++) {
|
||||
data[i]=tx_seq_cnt++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bytes > 0) {
|
||||
|
||||
if (bridge_ip_sync == 0) {
|
||||
bridge_ip_sync=1;
|
||||
log_printf(SMG_LOG_ALL,server.log,"Bridge IP Sync: span=%i chan=%i port=%d len=%i\n",bridge->span,bridge->chan,bridge->mcon.cfg.local_port,bytes);
|
||||
}
|
||||
udp_rx++;
|
||||
|
||||
err=sangoma_sendmsg_socket(bridge->tdm_fd,
|
||||
&hdrframe,
|
||||
sizeof(hdrframe),
|
||||
data,
|
||||
bytes, 0);
|
||||
if (err != bytes) {
|
||||
|
||||
unsigned char current_status;
|
||||
unsigned char verbose=1;
|
||||
|
||||
sangoma_tdm_get_link_status(bridge->tdm_fd, &tdm_api, ¤t_status);
|
||||
if (current_status != WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED) {
|
||||
if (prev_status == current_status) {
|
||||
verbose=0;
|
||||
}
|
||||
}
|
||||
|
||||
prev_status = current_status;
|
||||
|
||||
if (verbose) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge tdm write failed (span=%i,chan=%i)! len=%i status=%s - %s\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan,bytes, current_status==WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED?"Connected":"Disconnected",
|
||||
strerror(errno));
|
||||
sangoma_tdm_flush_bufs(bridge->tdm_fd, &tdm_api);
|
||||
err_flag++;
|
||||
}
|
||||
|
||||
tdm_tx_err++;
|
||||
|
||||
} else {
|
||||
tdm_tx++;
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge sctp read failed (span=%i,chan=%i)! len=%i - %s\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan,bytes,strerror(errno));
|
||||
udp_rx_err++;
|
||||
err_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
if (b) {
|
||||
bytes = sangoma_readmsg_socket(bridge->tdm_fd,
|
||||
&hdrframe,
|
||||
sizeof(hdrframe),
|
||||
data,
|
||||
sizeof(data), 0);
|
||||
|
||||
if (bytes > 0) {
|
||||
tdm_rx++;
|
||||
err=sendto(mcon->socket,
|
||||
data,
|
||||
bytes, 0,
|
||||
(struct sockaddr *) &mcon->remote_addr,
|
||||
sizeof(mcon->remote_addr));
|
||||
if (err != bytes) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge sctp write failed (span=%i,chan=%i)! len=%i - %s\n",__FUNCTION__,bridge->span,bridge->chan,bytes,strerror(errno));
|
||||
udp_tx_err++;
|
||||
err_flag++;
|
||||
} else {
|
||||
udp_tx++;
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Error: Bridge tdm read failed (span=%i,chan=%i)! len=%i - %s\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan,bytes,strerror(errno));
|
||||
tdm_rx_err++;
|
||||
err_flag++;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (ss < 0) {
|
||||
if (!bridge->end) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Poll failed on fd exiting bridge (span=%i,chan=%i)\n",
|
||||
__FUNCTION__,bridge->span,bridge->chan);
|
||||
}
|
||||
break;
|
||||
|
||||
} else if (ss == 0) {
|
||||
|
||||
if (bridge_ip_sync) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"Bridge IP Timeout: span=%i chan=%i port=%d \n",
|
||||
bridge->span,bridge->chan,bridge->mcon.cfg.local_port);
|
||||
err_flag++;
|
||||
}
|
||||
bridge_ip_sync=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if TEST_SEQ
|
||||
if (udp_rx % 1000 == 0) {
|
||||
err_flag++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (err_flag) {
|
||||
log_printf(SMG_LOG_ALL,server.log,"Bridge (s%02ic%02i) urx/ttx=(%i/%i) ue/te=(%i/%i) | trx/utx=(%i/%i) te/ue=(%i/%i) \n",
|
||||
bridge->span,bridge->chan,
|
||||
udp_rx,tdm_tx,udp_rx_err,tdm_tx_err,
|
||||
tdm_rx,udp_tx,tdm_rx_err,udp_tx_err);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_smg_ip_bridge_lock);
|
||||
bridge_threads--;
|
||||
pthread_mutex_unlock(&g_smg_ip_bridge_lock);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int launch_bridge_thread(int idx)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int result = 0;
|
||||
struct sched_param param;
|
||||
|
||||
param.sched_priority = 9;
|
||||
result = pthread_attr_init(&attr);
|
||||
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||
pthread_attr_setschedpolicy(&attr, SCHED_RR);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
pthread_attr_setstacksize(&attr, MGD_STACK_SIZE);
|
||||
|
||||
result = pthread_attr_setschedparam (&attr, ¶m);
|
||||
|
||||
log_printf(SMG_LOG_ALL,server.log,"%s: Bridge Priority=%i res=%i \n",__FUNCTION__,
|
||||
param.sched_priority,result);
|
||||
|
||||
bridge_threads++;
|
||||
|
||||
result = pthread_create(&g_smg_ip_bridge_idx[idx].thread, &attr, bridge_thread_run, &g_smg_ip_bridge_idx[idx]);
|
||||
if (result) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "%s: Error: Creating Thread! %s\n",
|
||||
__FUNCTION__,strerror(errno));
|
||||
g_smg_ip_bridge_idx[idx].end=1;
|
||||
bridge_threads--;
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int create_udp_socket(call_signal_connection_t *ms, char *local_ip, int local_port, char *ip, int port)
|
||||
{
|
||||
int rc;
|
||||
struct hostent *result, *local_result;
|
||||
char buf[512], local_buf[512];
|
||||
int err = 0;
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_9,server.log,"LocalIP %s:%d IP %s:%d \n",local_ip, local_port, ip, port);
|
||||
|
||||
memset(&ms->remote_hp, 0, sizeof(ms->remote_hp));
|
||||
memset(&ms->local_hp, 0, sizeof(ms->local_hp));
|
||||
if ((ms->socket = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) {
|
||||
gethostbyname_r(ip, &ms->remote_hp, buf, sizeof(buf), &result, &err);
|
||||
gethostbyname_r(local_ip, &ms->local_hp, local_buf, sizeof(local_buf), &local_result, &err);
|
||||
if (result && local_result) {
|
||||
ms->remote_addr.sin_family = ms->remote_hp.h_addrtype;
|
||||
memcpy((char *) &ms->remote_addr.sin_addr.s_addr, ms->remote_hp.h_addr_list[0], ms->remote_hp.h_length);
|
||||
ms->remote_addr.sin_port = htons(port);
|
||||
|
||||
ms->local_addr.sin_family = ms->local_hp.h_addrtype;
|
||||
memcpy((char *) &ms->local_addr.sin_addr.s_addr, ms->local_hp.h_addr_list[0], ms->local_hp.h_length);
|
||||
ms->local_addr.sin_port = htons(local_port);
|
||||
|
||||
rc = bind(ms->socket, (struct sockaddr *) &ms->local_addr, sizeof(ms->local_addr));
|
||||
if (rc < 0) {
|
||||
close(ms->socket);
|
||||
ms->socket = -1;
|
||||
|
||||
log_printf(SMG_LOG_DEBUG_9,server.log,
|
||||
"Failed to bind LocalIP %s:%d IP %s:%d (%s)\n",
|
||||
local_ip, local_port, ip, port,strerror(errno));
|
||||
}
|
||||
|
||||
/* OK */
|
||||
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,
|
||||
"Failed to get hostbyname LocalIP %s:%d IP %s:%d (%s)\n",
|
||||
local_ip, local_port, ip, port,strerror(errno));
|
||||
}
|
||||
} else {
|
||||
log_printf(SMG_LOG_ALL,server.log,
|
||||
"Failed to create/allocate UDP socket\n");
|
||||
}
|
||||
|
||||
return ms->socket;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int smg_ip_bridge_start(void)
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
struct smg_tdm_ip_bridge *bridge;
|
||||
call_signal_connection_t *mcon;
|
||||
|
||||
pthread_mutex_init(&g_smg_ip_bridge_lock,NULL);
|
||||
|
||||
for (i=0;i<MAX_SMG_BRIDGE;i++) {
|
||||
if (!g_smg_ip_bridge_idx[i].init) {
|
||||
continue;
|
||||
}
|
||||
bridge=&g_smg_ip_bridge_idx[i];
|
||||
mcon=&bridge->mcon;
|
||||
|
||||
log_printf(SMG_LOG_ALL, server.log, "Opening Bridge MCON Socket [%d] local %s/%d remote %s/%d \n",
|
||||
mcon->socket,mcon->cfg.local_ip,mcon->cfg.local_port,mcon->cfg.remote_ip,mcon->cfg.remote_port);
|
||||
|
||||
#if 0
|
||||
if (call_signal_connection_open(mcon,
|
||||
mcon->cfg.local_ip,
|
||||
mcon->cfg.local_port,
|
||||
mcon->cfg.remote_ip,
|
||||
mcon->cfg.remote_port) < 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error: Opening Bridge MCON Socket [%d] local %s/%d remote %s/%d %s\n",
|
||||
mcon->socket,mcon->cfg.local_ip,mcon->cfg.local_port,mcon->cfg.remote_ip,mcon->cfg.remote_port,strerror(errno));
|
||||
bridge->end=1;
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
if (create_udp_socket(mcon,
|
||||
mcon->cfg.local_ip,
|
||||
mcon->cfg.local_port,
|
||||
mcon->cfg.remote_ip,
|
||||
mcon->cfg.remote_port) < 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error: Opening Bridge MCON Socket [%d] local %s/%d remote %s/%d %s\n",
|
||||
mcon->socket,mcon->cfg.local_ip,mcon->cfg.local_port,mcon->cfg.remote_ip,mcon->cfg.remote_port,strerror(errno));
|
||||
bridge->end=1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bridge->tdm_fd=open_span_chan(bridge->span, bridge->chan);
|
||||
if (bridge->tdm_fd < 0) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Error: Failed to open span=%i chan=%i - %s\n",
|
||||
bridge->span,bridge->chan,strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
err=launch_bridge_thread(i);
|
||||
if (err) {
|
||||
bridge->end=1;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int smg_ip_bridge_stop(void)
|
||||
{
|
||||
int i;
|
||||
int timeout=10;
|
||||
|
||||
for (i=0;i<MAX_SMG_BRIDGE;i++) {
|
||||
if (g_smg_ip_bridge_idx[i].init) {
|
||||
g_smg_ip_bridge_idx[i].end=1;
|
||||
g_smg_ip_bridge_idx[i].init=0;
|
||||
}
|
||||
}
|
||||
|
||||
while (bridge_threads) {
|
||||
log_printf(SMG_LOG_ALL, server.log, "Waiting for bridge threads %i\n",
|
||||
bridge_threads);
|
||||
sleep(1);
|
||||
timeout--;
|
||||
if (timeout == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&g_smg_ip_bridge_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 43
|
||||
/svn/sangoma_mgd/!svn/ver/185/trunk/scripts
|
||||
/svn/sangoma_mgd/!svn/ver/231/trunk/scripts
|
||||
END
|
||||
astxs
|
||||
K 25
|
||||
|
@ -9,12 +9,24 @@ svn:wc:ra_dav:version-url
|
|||
V 47
|
||||
/svn/sangoma_mgd/!svn/ver/1/trunk/scripts/astxs
|
||||
END
|
||||
stats.sh
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 52
|
||||
/svn/sangoma_mgd/!svn/ver/229/trunk/scripts/stats.sh
|
||||
END
|
||||
set_debug.sh
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 54
|
||||
/svn/sangoma_mgd/!svn/ver/1/trunk/scripts/set_debug.sh
|
||||
END
|
||||
sig_state.sh
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 56
|
||||
/svn/sangoma_mgd/!svn/ver/231/trunk/scripts/sig_state.sh
|
||||
END
|
||||
clog.sh
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/scripts
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
||||
|
||||
2009-07-15T16:39:13.271272Z
|
||||
185
|
||||
2009-11-20T23:39:34.767214Z
|
||||
231
|
||||
ncorbic
|
||||
|
||||
|
||||
|
@ -44,6 +44,19 @@ dir
|
|||
init.d
|
||||
dir
|
||||
|
||||
stats.sh
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-11-20T06:03:29.000000Z
|
||||
145db0085aa2270552002e4a92fd2112
|
||||
2009-11-20T08:09:27.705239Z
|
||||
229
|
||||
ncorbic
|
||||
has-props
|
||||
|
||||
set_debug.sh
|
||||
file
|
||||
|
||||
|
@ -57,6 +70,19 @@ fb580ba2a5e39574a4980ca545e01d27
|
|||
root
|
||||
has-props
|
||||
|
||||
sig_state.sh
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-11-24T17:29:10.000000Z
|
||||
d10d944bb164db02c3317dfa0d5e82da
|
||||
2009-11-20T23:39:34.767214Z
|
||||
231
|
||||
ncorbic
|
||||
has-props
|
||||
|
||||
ss7
|
||||
dir
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
K 14
|
||||
svn:executable
|
||||
V 1
|
||||
*
|
||||
END
|
|
@ -0,0 +1,5 @@
|
|||
K 14
|
||||
svn:executable
|
||||
V 1
|
||||
*
|
||||
END
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/sh
|
||||
|
||||
CMD=${1:-none}
|
||||
|
||||
|
||||
echo "$DEVS"
|
||||
WAN_DIR=/etc/wanpipe
|
||||
|
||||
|
||||
for ((i=1;i<=32;i++))
|
||||
do
|
||||
voice_flag=0;
|
||||
sig_flag=0;
|
||||
|
||||
if [ ! -e $WAN_DIR/wanpipe$i.conf ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
status=`cat /proc/net/wanrouter/status | grep "wanpipe$i " | cut -d'|' -f4`
|
||||
status=${status// /}
|
||||
|
||||
voice_cfg=`grep TDM_VOICE_API $WAN_DIR/wanpipe$i.conf`
|
||||
xmtp2_cfg=`grep XMTP2_API $WAN_DIR/wanpipe$i.conf`
|
||||
span_cfg=`grep TDMV_SPAN $WAN_DIR/wanpipe$i.conf | cut -d'=' -f2`
|
||||
span_cfg=${span_cfg// /}
|
||||
|
||||
if [ "$voice_cfg" != "" ]; then
|
||||
voice_flag=1
|
||||
fi
|
||||
if [ "$xmtp2_cfg" != "" ]; then
|
||||
sig_flag=1
|
||||
fi
|
||||
|
||||
if [ $voice_flag -eq 0 ] && [ $sig_flag -eq 0 ] ; then
|
||||
echo "========================================================"
|
||||
echo "Error: Invalid Interface configuration in $WAN_DIR/wanpipe$i.conf"
|
||||
echo "========================================================"
|
||||
continue
|
||||
fi
|
||||
if [ "$span_cfg" = " " ]; then
|
||||
echo "========================================================"
|
||||
echo "Error: Invalid Span configuration in $WAN_DIR/wanpipe$i.conf"
|
||||
echo "========================================================"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ $i -lt 10 ]; then
|
||||
echo -n "wanpipe$i: "
|
||||
else
|
||||
echo -n "wanpipe$i: "
|
||||
fi
|
||||
echo -n "Sig=$sig_flag Voice=$voice_flag "
|
||||
|
||||
if [ $span_cfg -lt 10 ]; then
|
||||
echo -n "Span=$span_cfg "
|
||||
else
|
||||
echo -n "Span=$span_cfg "
|
||||
fi
|
||||
|
||||
#echo "Status = $status"
|
||||
|
||||
if [ "$status" = "Connected" ]; then
|
||||
echo -n "Stat=Conn";
|
||||
else
|
||||
echo -n "Stat=Disc";
|
||||
fi
|
||||
echo
|
||||
|
||||
done
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
CMD=${1:-none}
|
||||
|
||||
DEVS=$(cat /proc/net/dev | egrep "w.*g" | cut -d':' -f1 | xargs)
|
||||
|
||||
echo "$DEVS"
|
||||
|
||||
echo $(date) >> stats.out
|
||||
for dev in $DEVS
|
||||
do
|
||||
if [ "$CMD" = "clear" ]; then
|
||||
wanpipemon -i $dev -c fc
|
||||
fi
|
||||
line=`wanpipemon -i $dev -c sc | grep "overrun"`
|
||||
echo "IF => $dev $line" | tee -a stats.out
|
||||
done
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/scripts/callgen
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 50
|
||||
/svn/sangoma_mgd/!svn/ver/175/trunk/scripts/init.d
|
||||
/svn/sangoma_mgd/!svn/ver/224/trunk/scripts/init.d
|
||||
END
|
||||
smgss7_init_ctrl
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 67
|
||||
/svn/sangoma_mgd/!svn/ver/175/trunk/scripts/init.d/smgss7_init_ctrl
|
||||
/svn/sangoma_mgd/!svn/ver/224/trunk/scripts/init.d/smgss7_init_ctrl
|
||||
END
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/scripts/init.d
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
||||
|
||||
2009-05-13T21:19:52.845605Z
|
||||
175
|
||||
2009-11-13T19:11:52.785901Z
|
||||
224
|
||||
ncorbic
|
||||
|
||||
|
||||
|
@ -32,10 +32,10 @@ file
|
|||
|
||||
|
||||
|
||||
2009-05-13T19:31:42.000000Z
|
||||
25c6714516b4a626ac83723a32f0cfcb
|
||||
2009-05-13T21:19:52.845605Z
|
||||
175
|
||||
2009-11-13T16:27:51.000000Z
|
||||
0d80ca93e586ff8f022d4148cbb9f7fe
|
||||
2009-11-13T19:11:52.785901Z
|
||||
224
|
||||
ncorbic
|
||||
has-props
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
WAN_LOCK=/var/lock/wanrouter_lock
|
||||
|
||||
SS7_LOCK=/var/lock/ss7box_wanrouter_lock
|
||||
|
||||
#Set the ss7boost file name
|
||||
ss7boost="ss7boost"
|
||||
|
@ -125,9 +125,10 @@ function ss7_boost_ctrl ()
|
|||
function ss7_box_ctrl ()
|
||||
{
|
||||
local wp_list
|
||||
cmd=$1
|
||||
local ss7_lock="NO"
|
||||
cmd=$1
|
||||
|
||||
cd $ss7dir
|
||||
cd $ss7dir
|
||||
|
||||
if [ $cmd != "start" ]; then
|
||||
echo "Stopping: $ss7box"
|
||||
|
@ -143,17 +144,48 @@ function ss7_box_ctrl ()
|
|||
|
||||
eval "modprobe -r xmtp2km >> $smgctrl_log 2>> $smgctrl_log"
|
||||
|
||||
if [ $cmd = "start" ]; then
|
||||
sleep 1
|
||||
if [ $cmd = "start" ]; then
|
||||
sleep 1
|
||||
echo "Starting: $ss7box"
|
||||
eval "$NICE ./$ss7box >> $smgctrl_log"
|
||||
eval "$NICE ./$ss7box >> $smgctrl_log"
|
||||
sleep 2
|
||||
while [ -e $WAN_LOCK ]
|
||||
|
||||
while [ -e $SS7_LOCK ]
|
||||
do
|
||||
echo "wanrouter lock detected $WAN_LOCK..."
|
||||
ss7_lock="YES"
|
||||
echo "ss7box lock detected $SS7_LOCK..."
|
||||
sleep 1
|
||||
done
|
||||
sleep 1
|
||||
|
||||
if [ $ss7_lock = "NO" ]; then
|
||||
while [ 1 ]
|
||||
do
|
||||
cnt=5
|
||||
while [ -e $WAN_LOCK ]
|
||||
do
|
||||
echo "wanrouter lock detected $WAN_LOCK..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
endloop=0
|
||||
while [ ! -e $WAN_LOCK ]
|
||||
do
|
||||
echo "Waiting for ss7box to finish wanpipe start ..."
|
||||
sleep 1
|
||||
cnt=$((cnt-1))
|
||||
if [ $cnt -lt 1 ]; then
|
||||
endloop=1
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $endloop -gt 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
sleep 2
|
||||
|
||||
echo "Starting: wanrouter start"
|
||||
eval "wanrouter start >> $smgctrl_log 2>> $smgctrl_log"
|
||||
|
@ -163,9 +195,9 @@ function ss7_box_ctrl ()
|
|||
sleep 5;
|
||||
echo "Waiting for ss7box to connect $i/6..."
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $homedir
|
||||
cd $homedir
|
||||
}
|
||||
|
||||
function stop_running_wanpipes ()
|
||||
|
@ -211,13 +243,13 @@ case "$arg1" in
|
|||
stop)
|
||||
|
||||
if [ "$arg2" == isup ]; then
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
else
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
ss7_box_ctrl "$arg1"
|
||||
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
else
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
ss7_box_ctrl "$arg1"
|
||||
|
||||
if [ -e /proc/net/wanrouter/status ]; then
|
||||
cat /proc/net/wanrouter/status
|
||||
else
|
||||
|
@ -225,14 +257,14 @@ case "$arg1" in
|
|||
echo "Wanrouter Stopped"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
restart)
|
||||
|
||||
cd "$homedir"
|
||||
$prog stop "$arg2"
|
||||
$prog start "$arg2"
|
||||
$prog stop "$arg2"
|
||||
$prog start "$arg2"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
WAN_LOCK=/var/lock/wanrouter_lock
|
||||
|
||||
SS7_LOCK=/var/lock/ss7box_wanrouter_lock
|
||||
|
||||
#Set the ss7boost file name
|
||||
ss7boost="ss7boost"
|
||||
|
@ -125,9 +125,10 @@ function ss7_boost_ctrl ()
|
|||
function ss7_box_ctrl ()
|
||||
{
|
||||
local wp_list
|
||||
cmd=$1
|
||||
local ss7_lock="NO"
|
||||
cmd=$1
|
||||
|
||||
cd $ss7dir
|
||||
cd $ss7dir
|
||||
|
||||
if [ $cmd != "start" ]; then
|
||||
echo "Stopping: $ss7box"
|
||||
|
@ -143,17 +144,48 @@ function ss7_box_ctrl ()
|
|||
|
||||
eval "modprobe -r xmtp2km >> $smgctrl_log 2>> $smgctrl_log"
|
||||
|
||||
if [ $cmd = "start" ]; then
|
||||
sleep 1
|
||||
if [ $cmd = "start" ]; then
|
||||
sleep 1
|
||||
echo "Starting: $ss7box"
|
||||
eval "$NICE ./$ss7box >> $smgctrl_log"
|
||||
eval "$NICE ./$ss7box >> $smgctrl_log"
|
||||
sleep 2
|
||||
while [ -e $WAN_LOCK ]
|
||||
|
||||
while [ -e $SS7_LOCK ]
|
||||
do
|
||||
echo "wanrouter lock detected $WAN_LOCK..."
|
||||
ss7_lock="YES"
|
||||
echo "ss7box lock detected $SS7_LOCK..."
|
||||
sleep 1
|
||||
done
|
||||
sleep 1
|
||||
|
||||
if [ $ss7_lock = "NO" ]; then
|
||||
while [ 1 ]
|
||||
do
|
||||
cnt=5
|
||||
while [ -e $WAN_LOCK ]
|
||||
do
|
||||
echo "wanrouter lock detected $WAN_LOCK..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
endloop=0
|
||||
while [ ! -e $WAN_LOCK ]
|
||||
do
|
||||
echo "Waiting for ss7box to finish wanpipe start ..."
|
||||
sleep 1
|
||||
cnt=$((cnt-1))
|
||||
if [ $cnt -lt 1 ]; then
|
||||
endloop=1
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $endloop -gt 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
sleep 2
|
||||
|
||||
echo "Starting: wanrouter start"
|
||||
eval "wanrouter start >> $smgctrl_log 2>> $smgctrl_log"
|
||||
|
@ -163,9 +195,9 @@ function ss7_box_ctrl ()
|
|||
sleep 5;
|
||||
echo "Waiting for ss7box to connect $i/6..."
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $homedir
|
||||
cd $homedir
|
||||
}
|
||||
|
||||
function stop_running_wanpipes ()
|
||||
|
@ -211,13 +243,13 @@ case "$arg1" in
|
|||
stop)
|
||||
|
||||
if [ "$arg2" == isup ]; then
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
else
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
ss7_box_ctrl "$arg1"
|
||||
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
else
|
||||
pbx_ctrl "$arg1"
|
||||
ss7_boost_ctrl "$arg1"
|
||||
ss7_box_ctrl "$arg1"
|
||||
|
||||
if [ -e /proc/net/wanrouter/status ]; then
|
||||
cat /proc/net/wanrouter/status
|
||||
else
|
||||
|
@ -225,14 +257,14 @@ case "$arg1" in
|
|||
echo "Wanrouter Stopped"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
restart)
|
||||
|
||||
cd "$homedir"
|
||||
$prog stop "$arg2"
|
||||
$prog start "$arg2"
|
||||
$prog stop "$arg2"
|
||||
$prog start "$arg2"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
#!/bin/sh
|
||||
|
||||
CMD=${1:-none}
|
||||
|
||||
|
||||
echo "$DEVS"
|
||||
WAN_DIR=/etc/wanpipe
|
||||
|
||||
|
||||
for ((i=1;i<=32;i++))
|
||||
do
|
||||
voice_flag=0;
|
||||
sig_flag=0;
|
||||
|
||||
if [ ! -e $WAN_DIR/wanpipe$i.conf ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
status=`cat /proc/net/wanrouter/status | grep "wanpipe$i " | cut -d'|' -f4`
|
||||
status=${status// /}
|
||||
|
||||
voice_cfg=`grep TDM_VOICE_API $WAN_DIR/wanpipe$i.conf`
|
||||
xmtp2_cfg=`grep XMTP2_API $WAN_DIR/wanpipe$i.conf`
|
||||
span_cfg=`grep TDMV_SPAN $WAN_DIR/wanpipe$i.conf | cut -d'=' -f2`
|
||||
span_cfg=${span_cfg// /}
|
||||
|
||||
if [ "$voice_cfg" != "" ]; then
|
||||
voice_flag=1
|
||||
fi
|
||||
if [ "$xmtp2_cfg" != "" ]; then
|
||||
sig_flag=1
|
||||
fi
|
||||
|
||||
if [ $voice_flag -eq 0 ] && [ $sig_flag -eq 0 ] ; then
|
||||
echo "========================================================"
|
||||
echo "Error: Invalid Interface configuration in $WAN_DIR/wanpipe$i.conf"
|
||||
echo "========================================================"
|
||||
continue
|
||||
fi
|
||||
if [ "$span_cfg" = " " ]; then
|
||||
echo "========================================================"
|
||||
echo "Error: Invalid Span configuration in $WAN_DIR/wanpipe$i.conf"
|
||||
echo "========================================================"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ $i -lt 10 ]; then
|
||||
echo -n "wanpipe$i: "
|
||||
else
|
||||
echo -n "wanpipe$i: "
|
||||
fi
|
||||
echo -n "Sig=$sig_flag Voice=$voice_flag "
|
||||
|
||||
if [ $span_cfg -lt 10 ]; then
|
||||
echo -n "Span=$span_cfg "
|
||||
else
|
||||
echo -n "Span=$span_cfg "
|
||||
fi
|
||||
|
||||
#echo "Status = $status"
|
||||
|
||||
if [ "$status" = "Connected" ]; then
|
||||
echo -n "Stat=Conn";
|
||||
else
|
||||
echo -n "Stat=Disc";
|
||||
fi
|
||||
echo
|
||||
|
||||
done
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/scripts/ss7
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
CMD=${1:-none}
|
||||
|
||||
DEVS=$(cat /proc/net/dev | egrep "w.*g" | cut -d':' -f1 | xargs)
|
||||
|
||||
echo "$DEVS"
|
||||
|
||||
echo $(date) >> stats.out
|
||||
for dev in $DEVS
|
||||
do
|
||||
if [ "$CMD" = "clear" ]; then
|
||||
wanpipemon -i $dev -c fc
|
||||
fi
|
||||
line=`wanpipemon -i $dev -c sc | grep "overrun"`
|
||||
echo "IF => $dev $line" | tee -a stats.out
|
||||
done
|
||||
|
|
@ -37,6 +37,7 @@ enum e_sigboost_event_id_values
|
|||
SIGBOOST_EVENT_REMOVE_CHECK_LOOP = 0x8b, /*139*/
|
||||
SIGBOOST_EVENT_AUTO_CALL_GAP_ABATE = 0x8c, /*140*/
|
||||
SIGBOOST_EVENT_DIGIT_IN = 0x8d, /*141*/
|
||||
SIGBOOST_EVENT_CALL_START_ACK_NO_MEDIA = 0x8e, /*141*/
|
||||
};
|
||||
enum e_sigboost_release_cause_values
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ SIG_LOG=$LOG
|
|||
PRI=0
|
||||
BRI=0
|
||||
SS7=0
|
||||
PROD="smg_ctrl"
|
||||
|
||||
ulimit -n 65000
|
||||
|
||||
|
@ -46,12 +47,19 @@ function usage()
|
|||
return 1
|
||||
}
|
||||
|
||||
logit()
|
||||
{
|
||||
local data="$1"
|
||||
|
||||
echo "$PROD: $data"
|
||||
logger "$PROD: $data"
|
||||
}
|
||||
|
||||
function stop_all()
|
||||
{
|
||||
|
||||
echo " "
|
||||
echo "Stopping running processes..."
|
||||
logit "Stopping running processes..."
|
||||
|
||||
stop_safe_sangoma
|
||||
stop_sigdaemon
|
||||
|
@ -61,6 +69,8 @@ function stop_all()
|
|||
fi
|
||||
|
||||
remove_pid_files
|
||||
|
||||
stop_scripts
|
||||
}
|
||||
|
||||
function stop_sigdaemon()
|
||||
|
@ -74,6 +84,7 @@ function stop_sigdaemon()
|
|||
echo "OK"
|
||||
else
|
||||
echo "FAILED"
|
||||
logit "Failed to TERM $sigd"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
|
@ -81,10 +92,10 @@ function stop_sigdaemon()
|
|||
do
|
||||
eval "pidof $sigd >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$sigd is stopped"
|
||||
logit "$sigd is stopped"
|
||||
return;
|
||||
else
|
||||
echo "waiting for $sigd to finish($i/$max_retry)...."
|
||||
logit "waiting for $sigd to finish($i/$max_retry)...."
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
@ -96,6 +107,7 @@ function stop_sigdaemon()
|
|||
echo "OK"
|
||||
else
|
||||
echo "FAILED"
|
||||
logit "Failed to KILL $sigd"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
|
@ -103,10 +115,10 @@ function stop_sigdaemon()
|
|||
do
|
||||
eval "pidof $sigd >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$sigd is stopped"
|
||||
logit "$sigd is stopped"
|
||||
break;
|
||||
else
|
||||
echo "waiting for $sigd to finish($i/$max_retry)...."
|
||||
logit "waiting for $sigd to finish($i/$max_retry)...."
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
@ -127,7 +139,7 @@ function stop_sangoma_mgd()
|
|||
return 0;
|
||||
fi
|
||||
else
|
||||
echo "sangoma_mgd not running..."
|
||||
logit "sangoma_mgd not running..."
|
||||
return;
|
||||
fi
|
||||
|
||||
|
@ -135,10 +147,10 @@ function stop_sangoma_mgd()
|
|||
do
|
||||
eval "pidof sangoma_mgd >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "sangoma_mgd is stopped"
|
||||
logit "sangoma_mgd is stopped"
|
||||
return 0
|
||||
else
|
||||
echo "waiting for sangoma_mgd to finish($i/$max_retry)...."
|
||||
logit "waiting for sangoma_mgd to finish($i/$max_retry)...."
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
@ -167,7 +179,7 @@ function stop_safe_sangoma()
|
|||
if [ $? -eq 0 ]; then
|
||||
echo -n "Sending TERM signal to safe_sangoma..."
|
||||
else
|
||||
echo "safe_sangoma not running..."
|
||||
logit "safe_sangoma not running..."
|
||||
return;
|
||||
fi
|
||||
sleep 1
|
||||
|
@ -181,7 +193,7 @@ function stop_safe_sangoma()
|
|||
echo "OK"
|
||||
else
|
||||
echo "FAILED"
|
||||
echo "Failed to stop safe_sangoma"
|
||||
logit "Failed to stop safe_sangoma"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
|
@ -196,14 +208,14 @@ function remove_pid_files()
|
|||
eval "rm -f /var/run/$sigd.pid > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo " "
|
||||
echo "Failed to remove /var/run/$sigd.pid, try to remove it manually"
|
||||
logit "Failed to remove /var/run/$sigd.pid, try to remove it manually"
|
||||
fi
|
||||
fi
|
||||
if [ -e /var/run/sangoma_mgd.pid ]; then
|
||||
eval "rm -f /var/run/sangoma_mgd.pid > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo " "
|
||||
echo "Failed to remove /var/run/sangoma_mgd.pid, try to remove it manually"
|
||||
logit "Failed to remove /var/run/sangoma_mgd.pid, try to remove it manually"
|
||||
fi
|
||||
fi
|
||||
echo "done"
|
||||
|
@ -212,7 +224,7 @@ function remove_pid_files()
|
|||
function start_test()
|
||||
{
|
||||
echo " "
|
||||
echo "Testing configuration files..."
|
||||
logit "Testing configuration files..."
|
||||
if [ $use_syslog -eq 1 ]; then
|
||||
eval "$sigd -t"
|
||||
else
|
||||
|
@ -220,13 +232,37 @@ function start_test()
|
|||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
logit "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
logit "Failed"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function start_scripts()
|
||||
{
|
||||
if [ -d /etc/wanpipe/smg_ctrl.d ]; then
|
||||
for script in /etc/wanpipe/smg_ctrl.d/*.start; do
|
||||
if [ -x $script ]; then
|
||||
logit "Executing startup script: $script"
|
||||
source $script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function stop_scripts()
|
||||
{
|
||||
if [ -d /etc/wanpipe/smg_ctrl.d ]; then
|
||||
for script in /etc/wanpipe/smg_ctrl.d/*.stop; do
|
||||
if [ -x $script ]; then
|
||||
logit "Executing stop script: $script"
|
||||
source $script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function start_all()
|
||||
{
|
||||
#post_args=$post_args" >/dev/null 2>/dev/null &"
|
||||
|
@ -241,6 +277,9 @@ function start_all()
|
|||
ret=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
start_scripts
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
|
@ -250,14 +289,17 @@ function start_sigd()
|
|||
pre_args="";
|
||||
post_args="";
|
||||
echo " "
|
||||
echo "Starting processes..."
|
||||
if [ $use_safe -eq 1 ]; then
|
||||
logit "Starting smg_ctrl in safe mode ..."
|
||||
fi
|
||||
logit "Starting processes..."
|
||||
echo -n "Loading SCTP..."
|
||||
eval "modprobe sctp >>$LOG 2>>$LOG"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
echo "Failed to load SCTP module, check $LOG"
|
||||
logit "Failed"
|
||||
logit "Failed to load SCTP module, check $LOG"
|
||||
return 1;
|
||||
fi
|
||||
sleep 1
|
||||
|
@ -266,8 +308,8 @@ function start_sigd()
|
|||
if [ $? -ne 0 ]; then
|
||||
eval "ls /dev/wanpipe* >/dev/null 2>/dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No Sangoma TDM API interfaces running"
|
||||
echo "Did you start wanrouter? "
|
||||
logit "No Sangoma TDM API interfaces running"
|
||||
logit "Did you start wanrouter? "
|
||||
return 1;
|
||||
fi
|
||||
fi
|
||||
|
@ -288,24 +330,24 @@ function start_sigd()
|
|||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
echo "Failed to start $sigd, check $SIG_LOG for errors"
|
||||
logit "Failed"
|
||||
logit "Failed to start $sigd, check $SIG_LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
sleep 2
|
||||
if [ ! $(pidof $sigd) ]; then
|
||||
echo "$sigd failed to start"
|
||||
echo "check $SIG_LOG for errors"
|
||||
logit "$sigd failed to start"
|
||||
logit "check $SIG_LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
sleep 3
|
||||
if [ "$xtraargs" = "sigdonly" ]; then
|
||||
|
||||
echo "Sangoma $sigd running.."
|
||||
logit "Sangoma $sigd running.."
|
||||
if [ $use_syslog -eq 1 ]; then
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
else
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
fi
|
||||
echo " "
|
||||
fi
|
||||
|
@ -314,7 +356,6 @@ function start_sigd()
|
|||
}
|
||||
function start_smg()
|
||||
{
|
||||
#check_sigd_running
|
||||
check_smg_running
|
||||
pre_args="";
|
||||
post_args="";
|
||||
|
@ -327,7 +368,7 @@ function start_smg()
|
|||
fi
|
||||
|
||||
if [ -e /etc/wanpipe/.no_smg_load ]; then
|
||||
echo "Skipping sangoma_mgd..."
|
||||
logit "Skipping sangoma_mgd..."
|
||||
return 0;
|
||||
fi
|
||||
|
||||
|
@ -336,23 +377,23 @@ function start_smg()
|
|||
if [ $? -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed"
|
||||
echo "Failed to start sangoma_mgd, check $LOG for errors"
|
||||
logit "Failed"
|
||||
logit "Failed to start sangoma_mgd, check $LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
if [ ! $(pidof sangoma_mgd) ]; then
|
||||
echo "sangoma_mgd failed to start"
|
||||
echo "check $LOG for errors"
|
||||
logit "sangoma_mgd failed to start"
|
||||
logit "check $LOG for errors"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
echo "Sangoma SMG running.."
|
||||
if [ $use_syslog -eq 1 ]; then
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
else
|
||||
echo "log file: $LOG and /var/log/messages"
|
||||
logit "log file: $LOG and /var/log/messages"
|
||||
fi
|
||||
echo " "
|
||||
|
||||
|
@ -367,10 +408,13 @@ function check_sigd_running()
|
|||
eval "pidof $sigd 2> /dev/null > /dev/null"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "$sigd is currently running"
|
||||
echo "exiting..."
|
||||
logit "$sigd is currently running"
|
||||
logit "exiting..."
|
||||
exit 0
|
||||
fi
|
||||
if [ -e /var/run/$sigd.pid ];then
|
||||
eval "rm -f /var/run/$sigd.pid >/dev/null 2>/dev/null";
|
||||
fi
|
||||
return 0
|
||||
|
||||
}
|
||||
|
@ -381,13 +425,10 @@ function check_smg_running()
|
|||
eval "pidof sangoma_mgd 2> /dev/null > /dev/null"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "sangoma_mgd is currently running"
|
||||
echo "exiting..."
|
||||
logit "sangoma_mgd is currently running"
|
||||
logit "exiting..."
|
||||
exit 0
|
||||
fi
|
||||
if [ -e /var/run/$sigd.pid ];then
|
||||
eval "rm -f /var/run/$sigd.pid >/dev/null 2>/dev/null";
|
||||
fi
|
||||
if [ -e /var/run/sangoma_mgd.pid ];then
|
||||
eval "rm -f /var/run/sangoma_mgd.pid >/dev/null 2>/dev/null";
|
||||
fi
|
||||
|
@ -397,7 +438,7 @@ function check_smg_running()
|
|||
function check_pid_sigd()
|
||||
{
|
||||
if [ ! $(pidof $sigd) ]; then
|
||||
echo "$sigd is not running"
|
||||
logit "$sigd is not running"
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
|
@ -410,9 +451,9 @@ function toggle_capture()
|
|||
eval "kill -SIGRTMIN+2 $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Protocol capture toggled"
|
||||
logit "BRI: Protocol capture toggled"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -423,13 +464,13 @@ function increase_verbose()
|
|||
local rc
|
||||
check_pid_sigd
|
||||
SIG_VAL=`kill -l SIGRTMIN`
|
||||
echo "signal: $SIG_VAL"
|
||||
logit "signal: $SIG_VAL"
|
||||
eval "kill -SIGRTMIN $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Verbosity increased"
|
||||
logit "BRI: Verbosity increased"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -442,9 +483,9 @@ function decrease_verbose()
|
|||
eval "kill -SIGRTMIN+1 $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Verbosity decreased"
|
||||
logit "BRI: Verbosity decreased"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -457,9 +498,9 @@ function show_calls()
|
|||
eval "kill -SIGRTMIN+3 $(pidof $sigd) "
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Show calls"
|
||||
logit "BRI: Show calls"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -472,9 +513,9 @@ function show_spans()
|
|||
eval "kill -SIGRTMIN+4 $(pidof $sigd)"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "BRI: Show spans"
|
||||
logit "BRI: Show spans"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
logit "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
|
@ -507,7 +548,7 @@ read_smg_conf ()
|
|||
if [ -f $META_SMG_CONF ]
|
||||
then . $META_SMG_CONF
|
||||
else
|
||||
echo " $META_SMG_CONF not found !!!!"
|
||||
logit " $META_SMG_CONF not found !!!!"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
|
@ -521,6 +562,7 @@ SANGOMA_BRID=
|
|||
SANGOMA_SS7ISUP=
|
||||
SANGOMA_MEDIA_GATEWAY=
|
||||
SANGOMA_SS7BOOST=
|
||||
SANGOMA_SAFE_MODE=
|
||||
}
|
||||
######################
|
||||
#main start here
|
||||
|
@ -539,11 +581,12 @@ elif [ "$SANGOMA_SS7ISUP" = "YES" ]; then
|
|||
elif [ "$SANGOMA_SS7BOOST" = "YES" ]; then
|
||||
sigd="ss7boost"
|
||||
else
|
||||
echo "Failed to specify sigd!!! check $META_SMG_CONF "
|
||||
logit "Failed to specify sigd!!! check $META_SMG_CONF "
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $SANGOMA_MEDIA_GATEWAY = "NO" ]; then
|
||||
xtraargs="sigdonly"
|
||||
fi
|
||||
|
@ -559,7 +602,7 @@ if [ $sigd = "ss7boost" ] || [ $sigd = "sangoma_isupd" ]; then
|
|||
eval "type $sigd 2> /dev/null > /dev/null"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo
|
||||
echo "Error $sigd is not found"
|
||||
logit "Error $sigd is not found"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
@ -586,6 +629,10 @@ done
|
|||
|
||||
ret=0
|
||||
|
||||
if [ "$cmd" = "start" ] && [ "$SANGOMA_SAFE_MODE" = "YES" ]; then
|
||||
cmd="safe_start"
|
||||
fi
|
||||
|
||||
if [ "$cmd" = "start" ]; then
|
||||
start_all
|
||||
ret=$?
|
||||
|
@ -605,14 +652,17 @@ elif [ "$cmd" = "stop" ]; then
|
|||
ret=$?
|
||||
elif [ "$cmd" = "restart" ]; then
|
||||
stop_all
|
||||
if [ "$SANGOMA_SAFE_MODE" = "YES" ]; then
|
||||
use_safe=1
|
||||
fi
|
||||
start_all
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
stop_all
|
||||
fi
|
||||
ret=$?
|
||||
else
|
||||
if [ $SS7 -eq 1 ]; then
|
||||
echo "Error: Unsupported command $cmd for SS7"
|
||||
logit "Error: Unsupported command $cmd for SS7"
|
||||
echo
|
||||
usage
|
||||
exit 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit/core
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit/tests
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit/tests/1_loop
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit/tests/1_loop/tmp
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit/tests/2_loop_call
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
8
|
||||
|
||||
dir
|
||||
204
|
||||
232
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd/trunk/unit/tests/2_loop_call/tmp
|
||||
https://www.sangomapbx.com/svn/sangoma_mgd
|
||||
|
||||
|
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue