wanpipe-3.3.9.tgz
This commit is contained in:
parent
86ec86f099
commit
73961977ee
|
@ -8,6 +8,50 @@ Author: Nenad Corbic <ncorbic@sangoma.com>
|
|||
Copyright (c) 1995-2008 Sangoma Technologies Inc.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
* Fri Apr 30 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.9
|
||||
======================================================================
|
||||
|
||||
- AFT BRI Clock Reference Update
|
||||
Disabled reference clocking feature on original A500 BRI Cards.
|
||||
It has been determined that reference clocking feature is not always stable
|
||||
on original A500 BRI cards. It can cause noise and call drops in some
|
||||
circumstances where BRI lines go up and down due to power saving mode.
|
||||
|
||||
If you have problems with FAX synchronization on an original A500 BRI Card
|
||||
contact Sangoma Support and we will swap out the card for one with
|
||||
an updated CPLD that will work with the reference clock and provide
|
||||
reliable FAXing.
|
||||
|
||||
Run wanrouter hwprobe verbose to determine your A500 BRI CPLD Version
|
||||
-> wanrouter hwprobe verbose
|
||||
-C00 -> old bri cpld (non reference clock)
|
||||
-C01 -> new bri cpld (reference clock enabled)
|
||||
|
||||
|
||||
- Manually Disabling BRI Clock Reference
|
||||
This option is valid from 3.3.6 release and greater.
|
||||
This option can be used in case of noise and voice quality issues
|
||||
and call drop issues on BRI card.
|
||||
|
||||
In order to disable BRI clock reference manually one can add
|
||||
RM_BRI_CLOCK=OSC in each BRI wanpipe config file in /etc/wanpipe directory.
|
||||
1. vi /etc/wanpipe/wanpipe1.conf
|
||||
2. Under the TDMV_SPAN option add
|
||||
RM_BRI_CLOCK=OSC
|
||||
3. Save file
|
||||
4. Repeat for all BRI wanpipe configuration files
|
||||
5. Restart all wanpipe devices
|
||||
|
||||
Note from 3.3.9 release on, all old CPLD A500 BRI cards
|
||||
have clock referencing disabled automatically.
|
||||
|
||||
- Updated BRI Stack
|
||||
Fix for RDNIS not cleared
|
||||
Support for show_spans and show_calls.
|
||||
Added support for multiple MSNs.
|
||||
Added support for timer_t3 and timer_t302
|
||||
http://wiki.sangoma.com/sangoma-wanpipe-smg-asterisk-bri-installation
|
||||
|
||||
|
||||
* Fri Apr 25 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.8
|
||||
======================================================================
|
||||
|
|
5
Setup
5
Setup
|
@ -3015,6 +3015,9 @@ if [ -z $NONINTERACTIVE ]; then
|
|||
enable_protocols "TDM"
|
||||
SSMG_BRI=YES
|
||||
|
||||
elif [ "$response" -eq 8 ]; then
|
||||
enable_protocols "AFT_TE1"
|
||||
|
||||
elif [ "$response" -eq 9 ]; then
|
||||
enable_custom_protocols
|
||||
else
|
||||
|
@ -6598,7 +6601,7 @@ KERNEL_UNAME=`uname -r`
|
|||
PKG_NAME=wanpipe
|
||||
DISTR_NAME="WANPIPE"
|
||||
PROD=wanrouter
|
||||
PROD_VER=3.3.8
|
||||
PROD_VER=3.3.9
|
||||
PROD_HOME=`pwd`
|
||||
META_CONF=$PROD_HOME/$PROD.rc
|
||||
WAN_INTR_DIR=$PROD_HOME/interfaces
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: wanpipe
|
||||
Version: 3.3.8-0
|
||||
Version: 3.3.9-0
|
||||
Section: networking
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
#define FE_LINENO(fe_cfg) ((fe_cfg)->line_no)
|
||||
#define FE_TXTRISTATE(fe_cfg) ((fe_cfg)->tx_tristate_mode)
|
||||
#define FE_TDMV_LAW(fe_cfg) ((fe_cfg)->tdmv_law)
|
||||
#define FE_NETWORK_SYNC(fe_cfg) ((fe_cfg)->network_sync)
|
||||
|
||||
#define IS_T1_MEDIA(fe_cfg) (FE_MEDIA(fe_cfg) == WAN_MEDIA_T1)
|
||||
#define IS_E1_MEDIA(fe_cfg) (FE_MEDIA(fe_cfg) == WAN_MEDIA_E1)
|
||||
|
@ -203,6 +204,8 @@ typedef struct {
|
|||
unsigned char tx_tristate_mode;
|
||||
unsigned int tdmv_law;
|
||||
unsigned char poll_mode;
|
||||
int network_sync;
|
||||
|
||||
union {
|
||||
sdla_te_cfg_t te_cfg;
|
||||
sdla_te3_cfg_t te3_cfg;
|
||||
|
@ -278,6 +281,7 @@ 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 FE_MEDIA_DECODE(fe) MEDIA_DECODE(&((fe)->fe_cfg))
|
||||
#define FE_LCODE_DECODE(fe) LCODE_DECODE(&((fe)->fe_cfg))
|
||||
|
|
|
@ -135,7 +135,6 @@ typedef struct sdla_remora_cfg_ {
|
|||
int reversepolarity;
|
||||
int battthresh;
|
||||
int battdebounce;
|
||||
int network_sync;
|
||||
|
||||
u_int8_t relaxcfg; /* do not failed during config if one of
|
||||
** the modules failed to configure */
|
||||
|
|
|
@ -102,6 +102,8 @@ enum wanpipe_tdm_api_cmds {
|
|||
SIOC_WP_TDM_SET_FE_STATUS, /* 0x1E */
|
||||
SIOC_WP_TDM_GET_FE_STATUS, /* 0x1F */
|
||||
|
||||
SIOC_WP_TDM_GET_HW_DTMF, /* 0x20 */
|
||||
|
||||
SIOC_WP_TDM_NOTSUPP /* */
|
||||
|
||||
};
|
||||
|
@ -312,6 +314,7 @@ typedef struct wanpipe_tdm_api_cmd{
|
|||
unsigned int data_len;
|
||||
void *data;
|
||||
unsigned char fe_status; /* FE status - Connected or Disconnected */
|
||||
unsigned int hw_dtmf; /* HW DTMF enabled */
|
||||
}wanpipe_tdm_api_cmd_t;
|
||||
|
||||
typedef struct wanpipe_tdm_api_event{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define WANPIPE_COMPANY "Sangoma Technologies Inc"
|
||||
|
||||
/********** LINUX **********/
|
||||
#define WANPIPE_VERSION "3.3.8"
|
||||
#define WANPIPE_VERSION "3.3.9"
|
||||
#define WANPIPE_SUB_VERSION "0"
|
||||
#define WANPIPE_VERSION_BETA 1
|
||||
#define WANPIPE_LITE_VERSION "1.1.1"
|
||||
|
|
|
@ -335,7 +335,7 @@ int aft_analog_global_chip_config(sdla_t *card)
|
|||
wan_set_bit(AFT_CHIPCFG_SFR_EX_BIT,®);
|
||||
wan_set_bit(AFT_CHIPCFG_SFR_IN_BIT,®);
|
||||
|
||||
if (card->fe.fe_cfg.cfg.remora.network_sync) {
|
||||
if (WAN_FE_NETWORK_SYNC(&card->fe)){ /*card->fe.fe_cfg.cfg.remora.network_sync*/
|
||||
DEBUG_EVENT("%s: Analog Clock set to Network Sync!\n",
|
||||
card->devname);
|
||||
wan_set_bit(AFT_CHIPCFG_ANALOG_CLOCK_SELECT_BIT,®);
|
||||
|
|
|
@ -538,7 +538,7 @@ int aft_bri_global_chip_config(sdla_t *card)
|
|||
|
||||
DEBUG_CFG("--- Chip enable/config. -- \n");
|
||||
|
||||
if (card->fe.fe_cfg.cfg.remora.network_sync) {
|
||||
if (WAN_FE_NETWORK_SYNC(&card->fe)){ /*card->fe.fe_cfg.cfg.remora.network_sync*/
|
||||
DEBUG_EVENT("%s: ISDN BRI Clock set to (External) Network Sync!\n",
|
||||
card->devname);
|
||||
wan_set_bit(AFT_CHIPCFG_A500_NET_SYNC_CLOCK_SELECT_BIT,®);
|
||||
|
|
|
@ -10857,10 +10857,6 @@ aft_tdm_bh_skip:
|
|||
|
||||
#ifdef AFT_TDM_API_SUPPORT
|
||||
|
||||
if (card->wandev.fe_iface.watchdog){
|
||||
err = card->wandev.fe_iface.watchdog(&card->fe);
|
||||
}
|
||||
|
||||
wanpipe_tdm_api_rx_tx(&chan->wp_tdm_api_dev,
|
||||
rxbuf,
|
||||
txbuf,
|
||||
|
@ -10954,9 +10950,6 @@ defined(AFT_TDMV_BH_ENABLE)
|
|||
if (!chan->tdmv_zaptel_cfg){
|
||||
|
||||
#endif
|
||||
if (card->wandev.fe_iface.watchdog) {
|
||||
err = card->wandev.fe_iface.watchdog(&card->fe);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PRODUCT_WANPIPE_TDM_VOICE
|
||||
if (card->sdla_tdmv_dummy) {
|
||||
|
@ -10971,6 +10964,10 @@ defined(AFT_TDMV_BH_ENABLE)
|
|||
wan_set_bit(AFT_DMACTRL_TDMV_TX_TOGGLE,®);
|
||||
card->hw_iface.bus_write_4(card->hw,AFT_PORT_REG(card,AFT_DMA_CTRL_REG),reg);
|
||||
}
|
||||
|
||||
if (card->wandev.fe_iface.watchdog) {
|
||||
err = card->wandev.fe_iface.watchdog(&card->fe);
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_TEST("%s: Master device tx rx %i!\n",
|
||||
|
@ -12511,6 +12508,11 @@ static int aft_handle_clock_master (sdla_t *card_ptr)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Only enable clock recovery on cards with new CPLD */
|
||||
if (!aft_is_bri_512khz_card(card)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (aft_is_bri_te_card(card) && !wan_test_bit(CARD_MASTER_CLOCK,&card->wandev.critical)) {
|
||||
if (card->wandev.state == WAN_CONNECTED) {
|
||||
if (card->wandev.fe_iface.clock_ctrl){
|
||||
|
|
|
@ -1367,6 +1367,14 @@ int wanpipe_tdm_api_ioctl(wanpipe_tdm_api_dev_t *tdm_api, struct ifreq *ifr)
|
|||
card->hw_iface.hw_unlock(card->hw,&smp_flags1);
|
||||
}
|
||||
break;
|
||||
|
||||
case SIOC_WP_TDM_GET_HW_DTMF:
|
||||
if (card->wandev.ec_enable && card->u.aft.tdmv_hw_dtmf == WANOPT_YES) {
|
||||
usr_tdm_api.hw_dtmf = WANOPT_YES;
|
||||
} else {
|
||||
usr_tdm_api.hw_dtmf = WANOPT_NO;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIOC_WP_TDM_GET_STATS:
|
||||
memcpy(&usr_tdm_api.stats,&tdm_api->cfg.stats,sizeof(tdm_api->cfg.stats));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%define WANPIPE_VER wanpipe-modules
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.3.8
|
||||
%define version 3.3.9
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define MODULES_DIR /lib/modules
|
||||
|
@ -51,6 +51,50 @@ echo "Wanpipe Modules located in %{MODULES_DIR}/%{KVERSION}"
|
|||
|
||||
%changelog
|
||||
|
||||
* Fri Apr 30 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.9
|
||||
======================================================================
|
||||
|
||||
- AFT BRI Clock Reference Update
|
||||
Disabled reference clocking feature on original A500 BRI Cards.
|
||||
It has been determined that reference clocking feature is not always stable
|
||||
on original A500 BRI cards. It can cause noise and call drops in some
|
||||
circumstances where BRI lines go up and down due to power saving mode.
|
||||
|
||||
If you have problems with FAX synchronization on an original A500 BRI Card
|
||||
contact Sangoma Support and we will swap out the card for one with
|
||||
an updated CPLD that will work with the reference clock and provide
|
||||
reliable FAXing.
|
||||
|
||||
Run wanrouter hwprobe verbose to determine your A500 BRI CPLD Version
|
||||
-> wanrouter hwprobe verbose
|
||||
-C00 -> old bri cpld (non reference clock)
|
||||
-C01 -> new bri cpld (reference clock enabled)
|
||||
|
||||
|
||||
- Manually Disabling BRI Clock Reference
|
||||
This option is valid from 3.3.6 release and greater.
|
||||
This option can be used in case of noise and voice quality issues
|
||||
and call drop issues on BRI card.
|
||||
|
||||
In order to disable BRI clock reference manually one can add
|
||||
RM_BRI_CLOCK=OSC in each BRI wanpipe config file in /etc/wanpipe directory.
|
||||
1. vi /etc/wanpipe/wanpipe1.conf
|
||||
2. Under the TDMV_SPAN option add
|
||||
RM_BRI_CLOCK=OSC
|
||||
3. Save file
|
||||
4. Repeat for all BRI wanpipe configuration files
|
||||
5. Restart all wanpipe devices
|
||||
|
||||
Note from 3.3.9 release on, all old CPLD A500 BRI cards
|
||||
have clock referencing disabled automatically.
|
||||
|
||||
- Updated BRI Stack
|
||||
Fix for RDNIS not cleared
|
||||
Support for show_spans and show_calls.
|
||||
Added support for multiple MSNs.
|
||||
Added support for timer_t3 and timer_t302
|
||||
http://wiki.sangoma.com/sangoma-wanpipe-smg-asterisk-bri-installation
|
||||
|
||||
|
||||
* Fri Apr 25 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.8
|
||||
======================================================================
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%define KERNEL_VERSION %{?kern_ver}
|
||||
%define WANPIPE_VER wanpipe-util
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.3.8
|
||||
%define version 3.3.9
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define ETC_DIR /etc
|
||||
|
@ -328,6 +328,50 @@ enable_smg_log;
|
|||
|
||||
%changelog
|
||||
|
||||
* Fri Apr 30 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.9
|
||||
======================================================================
|
||||
|
||||
- AFT BRI Clock Reference Update
|
||||
Disabled reference clocking feature on original A500 BRI Cards.
|
||||
It has been determined that reference clocking feature is not always stable
|
||||
on original A500 BRI cards. It can cause noise and call drops in some
|
||||
circumstances where BRI lines go up and down due to power saving mode.
|
||||
|
||||
If you have problems with FAX synchronization on an original A500 BRI Card
|
||||
contact Sangoma Support and we will swap out the card for one with
|
||||
an updated CPLD that will work with the reference clock and provide
|
||||
reliable FAXing.
|
||||
|
||||
Run wanrouter hwprobe verbose to determine your A500 BRI CPLD Version
|
||||
-> wanrouter hwprobe verbose
|
||||
-C00 -> old bri cpld (non reference clock)
|
||||
-C01 -> new bri cpld (reference clock enabled)
|
||||
|
||||
|
||||
- Manually Disabling BRI Clock Reference
|
||||
This option is valid from 3.3.6 release and greater.
|
||||
This option can be used in case of noise and voice quality issues
|
||||
and call drop issues on BRI card.
|
||||
|
||||
In order to disable BRI clock reference manually one can add
|
||||
RM_BRI_CLOCK=OSC in each BRI wanpipe config file in /etc/wanpipe directory.
|
||||
1. vi /etc/wanpipe/wanpipe1.conf
|
||||
2. Under the TDMV_SPAN option add
|
||||
RM_BRI_CLOCK=OSC
|
||||
3. Save file
|
||||
4. Repeat for all BRI wanpipe configuration files
|
||||
5. Restart all wanpipe devices
|
||||
|
||||
Note from 3.3.9 release on, all old CPLD A500 BRI cards
|
||||
have clock referencing disabled automatically.
|
||||
|
||||
- Updated BRI Stack
|
||||
Fix for RDNIS not cleared
|
||||
Support for show_spans and show_calls.
|
||||
Added support for multiple MSNs.
|
||||
Added support for timer_t3 and timer_t302
|
||||
http://wiki.sangoma.com/sangoma-wanpipe-smg-asterisk-bri-installation
|
||||
|
||||
|
||||
* Fri Apr 25 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.8
|
||||
======================================================================
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%define KERNEL_VERSION %{?kern_ver}
|
||||
%define WANPIPE_VER wanpipe
|
||||
%define name %{WANPIPE_VER}
|
||||
%define version 3.3.8
|
||||
%define version 3.3.9
|
||||
%define release 0
|
||||
%define serial 1
|
||||
%define UTILS_DIR /usr/sbin
|
||||
|
@ -255,6 +255,50 @@ install_init;
|
|||
|
||||
%changelog
|
||||
|
||||
* Fri Apr 30 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.9
|
||||
======================================================================
|
||||
|
||||
- AFT BRI Clock Reference Update
|
||||
Disabled reference clocking feature on original A500 BRI Cards.
|
||||
It has been determined that reference clocking feature is not always stable
|
||||
on original A500 BRI cards. It can cause noise and call drops in some
|
||||
circumstances where BRI lines go up and down due to power saving mode.
|
||||
|
||||
If you have problems with FAX synchronization on an original A500 BRI Card
|
||||
contact Sangoma Support and we will swap out the card for one with
|
||||
an updated CPLD that will work with the reference clock and provide
|
||||
reliable FAXing.
|
||||
|
||||
Run wanrouter hwprobe verbose to determine your A500 BRI CPLD Version
|
||||
-> wanrouter hwprobe verbose
|
||||
-C00 -> old bri cpld (non reference clock)
|
||||
-C01 -> new bri cpld (reference clock enabled)
|
||||
|
||||
|
||||
- Manually Disabling BRI Clock Reference
|
||||
This option is valid from 3.3.6 release and greater.
|
||||
This option can be used in case of noise and voice quality issues
|
||||
and call drop issues on BRI card.
|
||||
|
||||
In order to disable BRI clock reference manually one can add
|
||||
RM_BRI_CLOCK=OSC in each BRI wanpipe config file in /etc/wanpipe directory.
|
||||
1. vi /etc/wanpipe/wanpipe1.conf
|
||||
2. Under the TDMV_SPAN option add
|
||||
RM_BRI_CLOCK=OSC
|
||||
3. Save file
|
||||
4. Repeat for all BRI wanpipe configuration files
|
||||
5. Restart all wanpipe devices
|
||||
|
||||
Note from 3.3.9 release on, all old CPLD A500 BRI cards
|
||||
have clock referencing disabled automatically.
|
||||
|
||||
- Updated BRI Stack
|
||||
Fix for RDNIS not cleared
|
||||
Support for show_spans and show_calls.
|
||||
Added support for multiple MSNs.
|
||||
Added support for timer_t3 and timer_t302
|
||||
http://wiki.sangoma.com/sangoma-wanpipe-smg-asterisk-bri-installation
|
||||
|
||||
|
||||
* Fri Apr 25 2008 Nenad Corbic <ncorbic@sangoma.com> - Beta - 3.3.8
|
||||
======================================================================
|
||||
|
|
|
@ -2194,7 +2194,7 @@ init_global_params()
|
|||
{
|
||||
|
||||
if [ $OSYSTEM = "Linux" ]; then
|
||||
ROUTER_VERSION=3.3.8
|
||||
ROUTER_VERSION=3.3.9
|
||||
IFCONFIG_LIST=ifconfig
|
||||
MODULE_STAT=lsmod
|
||||
WAN_DRIVERS="wanpipe"
|
||||
|
|
|
@ -5,6 +5,30 @@ Author: David Yat Sin <david.yatsin@sangoma.com>
|
|||
Copyright (c) 2007-2008 Sangoma Technologies Inc.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
* Mon April 30 2008 David Yat Sin <david.yatsin@sangoma.com> - 1.39
|
||||
====================================================================
|
||||
- Fix for RDNIS not cleared
|
||||
|
||||
* Wed April 16 2008 David Yat Sin <david.yatsin@sangoma.com> - 1.38
|
||||
====================================================================
|
||||
- Support for show_spans and show_calls.
|
||||
|
||||
* Tues April 15 2008 David Yat Sin <david.yatsin@sangoma.com> - 1.37
|
||||
====================================================================
|
||||
- Added support for multiple MSNs.
|
||||
|
||||
* Mon April 14 2008 David Yat Sin <david.yatsin@sangoma.com> - 1.36
|
||||
====================================================================
|
||||
- Added support for timer_t3 and timer_t302
|
||||
- Changed boost_msg.cpp to use shared path for all SMG-BRI messages
|
||||
- Minor changes: Increased verbosity level for some informational
|
||||
- messages
|
||||
|
||||
* Mon April 05 2008 David Yat Sin <david.yatsin@sangoma.com> - 1.35d
|
||||
====================================================================
|
||||
- Fix for TEI not being re-negotiated on PHY disconnect.
|
||||
|
||||
|
||||
* Mon April 03 2008 David Yat Sin <david.yatsin@sangoma.com> - 1.35
|
||||
====================================================================
|
||||
- First stable release.
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
cmd=$1;
|
||||
cnt=0;
|
||||
max_retry=5;
|
||||
|
@ -165,7 +165,20 @@ function start_all()
|
|||
echo " "
|
||||
}
|
||||
|
||||
if [ "$cmd" = "start" ]; then
|
||||
function usage()
|
||||
{
|
||||
echo " "
|
||||
echo "Usage: smg_ctrl <options>"
|
||||
echo " options:"
|
||||
echo " "
|
||||
echo "start :start sangoma_brid and sangoma media gateway"
|
||||
echo "stop :stop sangoma_brid and sangoma media gateway"
|
||||
echo "restart :restart sangoma_brid and sangoma media gateway"
|
||||
echo " "
|
||||
|
||||
}
|
||||
function check_running ()
|
||||
{
|
||||
if [ $(pidof sangoma_brid) ]; then
|
||||
echo "sangoma_brid is currently running"
|
||||
echo "exiting..."
|
||||
|
@ -177,23 +190,93 @@ if [ "$cmd" = "start" ]; then
|
|||
echo "exiting..."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
function check_pid_brid()
|
||||
{
|
||||
if [ ! $(pidof sangoma_brid) ]; then
|
||||
echo "sangoma_brid is not running"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function toggle_capture()
|
||||
{
|
||||
check_pid_brid
|
||||
eval "kill -SIGRTMIN+2 $(pidof sangoma_brid)"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "BRI: Protocol capture toggled"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
fi
|
||||
}
|
||||
|
||||
function increase_verbose()
|
||||
{
|
||||
check_pid_brid
|
||||
SIG_VAL=`kill -l SIGRTMIN`
|
||||
echo "signal: $SIG_VAL"
|
||||
eval "kill -SIGRTMIN $(pidof sangoma_brid)"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "BRI: Verbosity increased"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function decrease_verbose()
|
||||
{
|
||||
check_pid_brid
|
||||
eval "kill -SIGRTMIN+1 $(pidof sangoma_brid)"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "BRI: Verbosity decreased"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
fi
|
||||
}
|
||||
|
||||
function show_calls()
|
||||
{
|
||||
check_pid_brid
|
||||
eval "kill -SIGRTMIN+3 $(pidof sangoma_brid) "
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "BRI: Show calls"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
fi
|
||||
}
|
||||
|
||||
function show_spans()
|
||||
{
|
||||
check_pid_brid
|
||||
eval "kill -SIGRTMIN+4 $(pidof sangoma_brid)"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "BRI: Show spans"
|
||||
else
|
||||
echo "BRI: Failed to send command"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$cmd" = "start" ]; then
|
||||
check_running
|
||||
start_all
|
||||
elif [ "$cmd" = "stop" ]; then
|
||||
|
||||
stop_all
|
||||
elif [ "$cmd" = "restart" ]; then
|
||||
stop_all
|
||||
start_all
|
||||
elif [ "$cmd" = "capture" ]; then
|
||||
toggle_capture
|
||||
elif [ "$cmd" = "v+" ]; then
|
||||
increase_verbose
|
||||
elif [ "$cmd" = "v-" ]; then
|
||||
decrease_verbose
|
||||
elif [ "$cmd" = "show_spans" ]; then
|
||||
show_spans
|
||||
elif [ "$cmd" = "show_calls" ]; then
|
||||
show_calls
|
||||
else
|
||||
echo " "
|
||||
echo "Usage: smg_ctrl <options>"
|
||||
echo " options:"
|
||||
echo " "
|
||||
echo "start :start sangoma_brid and sangoma media gateway"
|
||||
echo "stop :stop sangoma_brid and sangoma media gateway"
|
||||
echo "restart :restart sangoma_brid and sangoma media gateway"
|
||||
echo " "
|
||||
usage
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
0
|
|
@ -1 +1 @@
|
|||
/usr/src/asterisk
|
||||
/usr/src/ast1.4/asterisk-1.4.11
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 35
|
||||
/svn/chan_woomera/!svn/ver/45/trunk
|
||||
/svn/chan_woomera/!svn/ver/54/trunk
|
||||
END
|
||||
chan_woomera.c
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 50
|
||||
/svn/chan_woomera/!svn/ver/50/trunk/chan_woomera.c
|
||||
/svn/chan_woomera/!svn/ver/54/trunk/chan_woomera.c
|
||||
END
|
||||
g711.h
|
||||
K 25
|
||||
|
@ -19,7 +19,7 @@ Changelog.chan_woomera
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 58
|
||||
/svn/chan_woomera/!svn/ver/49/trunk/Changelog.chan_woomera
|
||||
/svn/chan_woomera/!svn/ver/51/trunk/Changelog.chan_woomera
|
||||
END
|
||||
woomera.conf
|
||||
K 25
|
||||
|
@ -37,5 +37,5 @@ Makefile
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 44
|
||||
/svn/chan_woomera/!svn/ver/45/trunk/Makefile
|
||||
/svn/chan_woomera/!svn/ver/54/trunk/Makefile
|
||||
END
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
8
|
||||
|
||||
dir
|
||||
45
|
||||
54
|
||||
https://www.sangomapbx.com/svn/chan_woomera/trunk
|
||||
https://www.sangomapbx.com/svn/chan_woomera
|
||||
|
||||
|
||||
|
||||
2008-02-13T18:54:06.884970Z
|
||||
45
|
||||
2008-04-30T17:19:30.864674Z
|
||||
54
|
||||
ncorbic
|
||||
|
||||
|
||||
|
@ -28,14 +28,14 @@ b26a191e-ab3a-0410-a271-b1e04e243bf1
|
|||
|
||||
chan_woomera.c
|
||||
file
|
||||
50
|
||||
|
||||
|
||||
|
||||
2008-02-13T21:58:55.000000Z
|
||||
ba9205aebeac14f550d1ad25c67c6ffa
|
||||
2008-02-13T21:50:57.705432Z
|
||||
50
|
||||
|
||||
2008-04-30T17:32:57.000000Z
|
||||
347be96c59c9219397944b429f0da683
|
||||
2008-04-30T17:19:30.864674Z
|
||||
54
|
||||
ncorbic
|
||||
|
||||
g711.h
|
||||
|
@ -52,15 +52,15 @@ root
|
|||
|
||||
Changelog.chan_woomera
|
||||
file
|
||||
49
|
||||
|
||||
|
||||
|
||||
2008-02-13T21:01:28.000000Z
|
||||
1fee9ae858e70d2fd245ecde0cb16425
|
||||
2008-02-13T20:52:53.736809Z
|
||||
49
|
||||
ncorbic
|
||||
|
||||
2008-04-29T13:31:02.000000Z
|
||||
3af78f81e62b12e800004b2453a0671a
|
||||
2008-04-29T13:18:49.191645Z
|
||||
51
|
||||
davidy
|
||||
|
||||
woomera.conf
|
||||
file
|
||||
|
@ -92,9 +92,9 @@ file
|
|||
|
||||
|
||||
|
||||
2008-02-13T19:13:00.000000Z
|
||||
03f330a361fe8308a90ff2aef6b7cd77
|
||||
2008-02-13T18:54:06.884970Z
|
||||
45
|
||||
2008-04-30T17:32:57.000000Z
|
||||
38f96c4f795f92b46fea492c9f4fb4ee
|
||||
2008-04-30T17:19:30.864674Z
|
||||
54
|
||||
ncorbic
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
chan_woomera.c
|
||||
======================================
|
||||
|
||||
April 29 2008
|
||||
* v1.28 David Yat Sin <davidy@sangoma.com>
|
||||
* Fix for compilation issues with Callweaver v1.99
|
||||
*
|
||||
|
||||
Feb 13 2008
|
||||
* v1.27 David Yat Sin <davidy@sangoma.com>
|
||||
* Fixed issue channel type not defined when calling tech_call
|
||||
|
|
|
@ -25,25 +25,23 @@ $(shell echo $(PBXDIR) > .pbxdir)
|
|||
|
||||
PBXMODDIR=/usr/lib/asterisk/modules
|
||||
PBXCFGDIR=/etc/asterisk
|
||||
PBXDEFINES=
|
||||
|
||||
#Check for Asterisk AST_CONTROL_SRC feature
|
||||
$(shell if [[ -f $(PBXDIR)/include/asterisk/frame.h ]]; then grep -c AST_CONTROL_SRC $(PBXDIR)/include/asterisk/frame.h > .ast_src_check; else echo 0 > .ast_src_check; fi;)
|
||||
ifeq (1,$(shell cat .ast_src_check))
|
||||
PBXDEFINES=-DWOO_CONTROL_SRC_FEATURE
|
||||
endif
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver.h))
|
||||
PBXFLAGS_EXTRA=-DCALLWEAVER -DHAVE_CONFIG_H
|
||||
PBXFLAGS_EXTRA=-DCALLWEAVER
|
||||
PBXMODDIR=/usr/local/lib/callweaver/modules
|
||||
PBXCFGDIR=/usr/local/etc/callweaver
|
||||
|
||||
#Enable this for callweaver 1.2-rc5
|
||||
# PBXFLAGS_EXTRA += -DCALLWEAVER_1_2
|
||||
endif
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/asterisk.h))
|
||||
ifneq (,$(wildcard $(PBXDIR)/configure))
|
||||
PBXFLAGS_EXTRA=-DAST14 -DAST_MODULE=\"chan_woomera\"
|
||||
else
|
||||
PBXFLAGS_EXTRA=
|
||||
endif
|
||||
endif
|
||||
|
||||
PBXFLAGS_EXTRA=-DAST14 -DAST_MODULE=\"chan_woomera\"
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
|
||||
|
@ -54,7 +52,7 @@ 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 -O6 -fomit-frame-pointer -fPIC
|
||||
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
|
||||
|
||||
|
||||
all: chan_woomera.so
|
||||
|
|
|
@ -5,14 +5,28 @@
|
|||
* Woomera Channel Driver
|
||||
*
|
||||
* Copyright (C) 05-08 Nenad Corbic
|
||||
* David Yat Sin
|
||||
* Anthony Minessale II
|
||||
*
|
||||
* Nenad Corbic <ncorbic@sangoma.com>
|
||||
* David Yat Sin <davidy@sangoma.com>
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License
|
||||
* =============================================
|
||||
* v1.29 David Yat Sin <davidy@sangoma.com>
|
||||
* Apr 30 2008
|
||||
* Added AST_CONTROL_SRCUPDATE in tech_indicate
|
||||
*
|
||||
* v1.29 David Yat Sin <davidy@sangoma.com>
|
||||
* April 29 2008
|
||||
* Support for HW DTMF
|
||||
*
|
||||
* v1.28 David Yat Sin <davidy@sangoma.com>
|
||||
* Apr 29 2008
|
||||
* Fix for compilation issues with Callweaver v1.99
|
||||
*
|
||||
* v1.27 David Yat Sin <davidy@sangoma.com>
|
||||
* Feb 13 2008
|
||||
* Fix for ast_channel type not defined on
|
||||
|
@ -129,6 +143,9 @@
|
|||
#include "confdefs.h"
|
||||
#endif
|
||||
|
||||
#if defined (cw_config)
|
||||
#define CALLWEAVER_19
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -165,7 +182,7 @@
|
|||
#include "asterisk/dsp.h"
|
||||
#include "asterisk/musiconhold.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.29 $")
|
||||
|
||||
#else
|
||||
|
||||
|
@ -188,9 +205,118 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
|||
#include "callweaver.h"
|
||||
#include "confdefs.h"
|
||||
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.29 $")
|
||||
|
||||
// strings...
|
||||
/* CALLWEAVER v1.9 and later */
|
||||
#if defined (CALLWEAVER_19)
|
||||
#define
|
||||
#define ast_config cw_config
|
||||
#define AST_CONTROL_RINGING CW_CONTROL_RINGING
|
||||
#define AST_CONTROL_BUSY CW_CONTROL_BUSY
|
||||
#define AST_CONTROL_CONGESTION CW_CONTROL_CONGESTION
|
||||
#define AST_CONTROL_PROCEEDING CW_CONTROL_PROCEEDING
|
||||
#define AST_CONTROL_PROGRESS CW_CONTROL_PROGRESS
|
||||
#define AST_CONTROL_HOLD CW_CONTROL_HOLD
|
||||
#define AST_CONTROL_UNHOLD CW_CONTROL_UNHOLD
|
||||
#define AST_CONTROL_VIDUPDATE CW_CONTROL_VIDUPDATE
|
||||
|
||||
|
||||
#define LOG_NOTICE CW_LOG_NOTICE
|
||||
|
||||
#define LOG_DEBUG CW_LOG_DEBUG
|
||||
|
||||
#define LOG_ERROR CW_LOG_ERROR
|
||||
|
||||
#define LOG_WARNING CW_LOG_WARNING
|
||||
|
||||
#define AST_FORMAT_SLINEAR CW_FORMAT_SLINEAR
|
||||
#define AST_FORMAT_ULAW CW_FORMAT_ULAW
|
||||
#define AST_FORMAT_ALAW CW_FORMAT_ALAW
|
||||
#define ast_mutex_t cw_mutex_t
|
||||
#define ast_frame cw_frame
|
||||
#define ast_verbose cw_verbose
|
||||
#define AST_FRIENDLY_OFFSET CW_FRIENDLY_OFFSET
|
||||
#define AST_MUTEX_DEFINE_STATIC CW_MUTEX_DEFINE_STATIC
|
||||
#define AST_CONTROL_PROGRESS CW_CONTROL_PROGRESS
|
||||
#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL CW_CAUSE_REQUESTED_CHAN_UNAVAIL
|
||||
#define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION CW_CAUSE_NORMAL_CIRCUIT_CONGESTION
|
||||
#define AST_CAUSE_USER_BUSY CW_CAUSE_USER_BUSY
|
||||
#define AST_CAUSE_NO_ANSWER CW_CAUSE_NO_ANSWER
|
||||
#define AST_CAUSE_NORMAL_CLEARING CW_CAUSE_NORMAL_CLEARING
|
||||
#define AST_SOFTHANGUP_EXPLICIT CW_SOFTHANGUP_EXPLICIT
|
||||
#define AST_SOFTHANGUP_DEV CW_SOFTHANGUP_DEV
|
||||
#define AST_CAUSE_NORMAL_CLEARING CW_CAUSE_NORMAL_CLEARING
|
||||
#define AST_FRAME_DTMF CW_FRAME_DTMF
|
||||
#define AST_FRAME_CONTROL CW_FRAME_CONTROL
|
||||
#define AST_CONTROL_ANSWER CW_CONTROL_ANSWER
|
||||
#define AST_STATE_UP CW_STATE_UP
|
||||
#define AST_STATE_RINGING CW_STATE_RINGING
|
||||
#define AST_STATE_DOWN CW_STATE_DOWN
|
||||
#define AST_FLAGS_ALL CW_FLAGS_ALL
|
||||
#define AST_FRAME_VOICE CW_FRAME_VOICE
|
||||
#define ASTERISK_GPL_KEY 0
|
||||
#define ast_channel_tech opbx_channel_tech
|
||||
#define ast_test_flag cw_test_flag
|
||||
#define ast_queue_frame cw_queue_frame
|
||||
#define ast_frdup cw_frdup
|
||||
#define ast_channel cw_channel
|
||||
#define ast_exists_extension cw_exists_extension
|
||||
#define ast_hostent cw_hostent
|
||||
#define ast_clear_flag cw_clear_flag
|
||||
#define ast_log cw_log
|
||||
#define ast_set_flag cw_set_flag
|
||||
#define ast_copy_string cw_copy_string
|
||||
#define ast_set_flag cw_set_flag
|
||||
#define ast_set2_flag cw_set2_flag
|
||||
#define ast_setstate cw_setstate
|
||||
#define ast_test_flag cw_test_flag
|
||||
#define ast_softhangup cw_softhangup
|
||||
#define ast_true cw_true
|
||||
#define ast_false cw_false
|
||||
#define ast_strlen_zero cw_strlen_zero
|
||||
#define ast_exists_extension cw_exists_extension
|
||||
#define ast_frame cw_frame
|
||||
#define ast_jb_conf cw_jb_conf
|
||||
#define ast_carefulwrite cw_carefulwrite
|
||||
#define ast_channel_unregister cw_channel_unregister
|
||||
#define ast_cli cw_cli
|
||||
#define ast_cli_register cw_cli_register
|
||||
#define ast_cli_unregister cw_cli_unregister
|
||||
#define ast_jb_read_conf cw_jb_read_conf
|
||||
#define ast_mutex_destroy cw_mutex_destroy
|
||||
#define ast_mutex_init cw_mutex_init
|
||||
#define ast_mutex_lock cw_mutex_lock
|
||||
#define ast_mutex_unlock cw_mutex_unlock
|
||||
#define ast_mutex_t cw_mutex_t
|
||||
#define ast_queue_control cw_queue_control
|
||||
#define ast_queue_frame cw_queue_frame
|
||||
#define ast_queue_hangup cw_queue_hangup
|
||||
#define ast_set_callerid cw_set_callerid
|
||||
#define ast_variable cw_variable
|
||||
#define ast_pthread_create cw_pthread_create
|
||||
#define ast_cli_entry cw_cli_entry
|
||||
#define ast_channel_register cw_channel_register
|
||||
#define ast_config_load cw_config_load
|
||||
#define ast_config_destroy cw_config_destroy
|
||||
#define ast_category_browse cw_category_browse
|
||||
#define ast_variable_browse cw_variable_browse
|
||||
#define ast_gethostbyname cw_gethostbyname
|
||||
#define ast_channel_alloc cw_channel_alloc
|
||||
#define ast_dsp_new cw_dsp_new
|
||||
#define ast_dsp cw_dsp
|
||||
#define ast_dsp_set_features cw_dsp_set_features
|
||||
#define ast_dsp_digitmode cw_dsp_digitmode
|
||||
#define ast_dsp_set_call_progress_zone cw_dsp_set_call_progress_zone
|
||||
#define ast_dsp_set_busy_count cw_dsp_set_busy_count
|
||||
#define ast_dsp_set_busy_pattern cw_dsp_set_busy_pattern
|
||||
#define ast_dsp_process cw_dsp_process
|
||||
#define ast_strdupa cw_strdupa
|
||||
#define ast_mutex_trylock cw_mutex_trylock
|
||||
#define ast_cause2str cw_cause2str
|
||||
#define ast_pbx_start cw_pbx_start
|
||||
#define ast_hangup cw_hangup
|
||||
|
||||
#else /* CALLWEAVER prior to v1.9 */
|
||||
|
||||
#define ast_config opbx_config
|
||||
#define AST_CONTROL_RINGING OPBX_CONTROL_RINGING
|
||||
|
@ -305,6 +431,8 @@ CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
|||
#define ast_pbx_start opbx_pbx_start
|
||||
#define ast_hangup opbx_hangup
|
||||
|
||||
|
||||
#endif /* CALLWEAVER_19 */
|
||||
#endif
|
||||
|
||||
#include "g711.h"
|
||||
|
@ -322,7 +450,7 @@ CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
|||
|
||||
extern int option_verbose;
|
||||
|
||||
#define WOOMERA_VERSION "v1.27"
|
||||
#define WOOMERA_VERSION "v1.29"
|
||||
#ifndef WOOMERA_CHAN_NAME
|
||||
#define WOOMERA_CHAN_NAME "SS7"
|
||||
#endif
|
||||
|
@ -3811,6 +3939,11 @@ static int tech_indicate(struct ast_channel *self, int condition)
|
|||
ast_set_flag(tech_pvt, TFLAG_ACCEPT);
|
||||
}
|
||||
break;
|
||||
#ifdef WOO_CONTROL_SRC_FEATURE
|
||||
case AST_CONTROL_SRCUPDATE:
|
||||
res = 0;
|
||||
break;
|
||||
#endif
|
||||
case -1:
|
||||
res = -1;
|
||||
break;
|
||||
|
@ -4132,6 +4265,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
{
|
||||
|
||||
char *raw_audio_header;
|
||||
char *hw_dtmf;
|
||||
char ip[25];
|
||||
char *ptr;
|
||||
int port = 0;
|
||||
|
@ -4161,7 +4295,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
ptr++;
|
||||
port = atoi(ptr);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
audio_codec = woomera_message_header(wmsg, "Receive-Audio-Codec");
|
||||
if (audio_codec) {
|
||||
|
@ -4174,7 +4308,22 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
hw_dtmf = woomera_message_header(wmsg, "DTMF");
|
||||
if (hw_dtmf != NULL) {
|
||||
if (strncmp(hw_dtmf, "OutofBand" ,9) == 0) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
|
||||
tech_pvt->dsp_features &= ~DSP_FEATURE_DTMF_DETECT;
|
||||
ast_dsp_set_features(tech_pvt->dsp, tech_pvt->dsp_features);
|
||||
} else {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF not supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Sanity Check */
|
||||
owner = tech_get_owner(tech_pvt);
|
||||
|
@ -4342,7 +4491,7 @@ static int woomera_event_incoming (private_object *tech_pvt)
|
|||
|
||||
if(tech_pvt->profile->tg_language[group] != NULL &&
|
||||
strlen(tech_pvt->profile->tg_language[group])){
|
||||
strncpy(owner->language, tech_pvt->profile->tg_language[group], sizeof(owner->language) - 1);
|
||||
strncpy((char*)owner->language, (char*)tech_pvt->profile->tg_language[group], sizeof(owner->language) - 1);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
@ -4469,23 +4618,26 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
return;
|
||||
|
||||
} else if (!strcasecmp(wmsg->command, "DTMF")) {
|
||||
struct ast_frame dtmf_frame = {AST_FRAME_DTMF};
|
||||
int x = 0;
|
||||
for (x = 0; x < strlen(wmsg->command_args); x++) {
|
||||
struct ast_channel *owner = tech_get_owner(tech_pvt);
|
||||
dtmf_frame.subclass = wmsg->command_args[x];
|
||||
|
||||
if (owner) {
|
||||
ast_queue_frame(owner, ast_frdup(&dtmf_frame));
|
||||
}
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "SEND DTMF [%c] to %s\n", dtmf_frame.subclass,tech_pvt->callid);
|
||||
|
||||
char *content_len = woomera_message_header(wmsg, "Content-Length");
|
||||
struct ast_channel *owner = tech_get_owner(tech_pvt);
|
||||
if (owner && content_len && atoi(content_len) > 0) {
|
||||
int clen=atoi(content_len);
|
||||
int x;
|
||||
for (x = 0; x < clen; x++) {
|
||||
struct ast_frame dtmf_frame = {AST_FRAME_DTMF};
|
||||
dtmf_frame.subclass = wmsg->body[x];
|
||||
ast_queue_frame(owner, &dtmf_frame);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "SEND DTMF [%c] to %s\n", dtmf_frame.subclass,tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (!strcasecmp(wmsg->command, "PROCEED")) {
|
||||
/* This packet has lots of info so well keep it */
|
||||
char *chan_name = woomera_message_header(wmsg, "Channel-Name");
|
||||
|
@ -4551,7 +4703,6 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
|
||||
|
||||
} else if (!strcasecmp(wmsg->command, "MEDIA")) {
|
||||
|
||||
int err;
|
||||
err=woomera_event_media (tech_pvt, wmsg);
|
||||
if (err != 0) {
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
chan_woomera.c
|
||||
======================================
|
||||
|
||||
April 29 2008
|
||||
* v1.28 David Yat Sin <davidy@sangoma.com>
|
||||
* Fix for compilation issues with Callweaver v1.99
|
||||
*
|
||||
|
||||
Feb 13 2008
|
||||
* v1.27 David Yat Sin <davidy@sangoma.com>
|
||||
* Fixed issue channel type not defined when calling tech_call
|
||||
|
|
|
@ -25,25 +25,23 @@ $(shell echo $(PBXDIR) > .pbxdir)
|
|||
|
||||
PBXMODDIR=/usr/lib/asterisk/modules
|
||||
PBXCFGDIR=/etc/asterisk
|
||||
PBXDEFINES=
|
||||
|
||||
#Check for Asterisk AST_CONTROL_SRC feature
|
||||
$(shell if [[ -f $(PBXDIR)/include/asterisk/frame.h ]]; then grep -c AST_CONTROL_SRC $(PBXDIR)/include/asterisk/frame.h > .ast_src_check; else echo 0 > .ast_src_check; fi;)
|
||||
ifeq (1,$(shell cat .ast_src_check))
|
||||
PBXDEFINES=-DWOO_CONTROL_SRC_FEATURE
|
||||
endif
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/callweaver.h))
|
||||
PBXFLAGS_EXTRA=-DCALLWEAVER -DHAVE_CONFIG_H
|
||||
PBXFLAGS_EXTRA=-DCALLWEAVER
|
||||
PBXMODDIR=/usr/local/lib/callweaver/modules
|
||||
PBXCFGDIR=/usr/local/etc/callweaver
|
||||
|
||||
#Enable this for callweaver 1.2-rc5
|
||||
# PBXFLAGS_EXTRA += -DCALLWEAVER_1_2
|
||||
endif
|
||||
|
||||
ifneq (,$(wildcard $(PBXDIR)/include/asterisk.h))
|
||||
ifneq (,$(wildcard $(PBXDIR)/configure))
|
||||
PBXFLAGS_EXTRA=-DAST14 -DAST_MODULE=\"chan_woomera\"
|
||||
else
|
||||
PBXFLAGS_EXTRA=
|
||||
endif
|
||||
endif
|
||||
|
||||
PBXFLAGS_EXTRA=-DAST14 -DAST_MODULE=\"chan_woomera\"
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
|
||||
|
@ -54,7 +52,7 @@ 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 -O6 -fomit-frame-pointer -fPIC
|
||||
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
|
||||
|
||||
|
||||
all: chan_woomera.so
|
||||
|
|
|
@ -5,14 +5,28 @@
|
|||
* Woomera Channel Driver
|
||||
*
|
||||
* Copyright (C) 05-08 Nenad Corbic
|
||||
* David Yat Sin
|
||||
* Anthony Minessale II
|
||||
*
|
||||
* Nenad Corbic <ncorbic@sangoma.com>
|
||||
* David Yat Sin <davidy@sangoma.com>
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License
|
||||
* =============================================
|
||||
* v1.29 David Yat Sin <davidy@sangoma.com>
|
||||
* Apr 30 2008
|
||||
* Added AST_CONTROL_SRCUPDATE in tech_indicate
|
||||
*
|
||||
* v1.29 David Yat Sin <davidy@sangoma.com>
|
||||
* April 29 2008
|
||||
* Support for HW DTMF
|
||||
*
|
||||
* v1.28 David Yat Sin <davidy@sangoma.com>
|
||||
* Apr 29 2008
|
||||
* Fix for compilation issues with Callweaver v1.99
|
||||
*
|
||||
* v1.27 David Yat Sin <davidy@sangoma.com>
|
||||
* Feb 13 2008
|
||||
* Fix for ast_channel type not defined on
|
||||
|
@ -129,6 +143,9 @@
|
|||
#include "confdefs.h"
|
||||
#endif
|
||||
|
||||
#if defined (cw_config)
|
||||
#define CALLWEAVER_19
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -165,7 +182,7 @@
|
|||
#include "asterisk/dsp.h"
|
||||
#include "asterisk/musiconhold.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.29 $")
|
||||
|
||||
#else
|
||||
|
||||
|
@ -188,9 +205,118 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
|||
#include "callweaver.h"
|
||||
#include "confdefs.h"
|
||||
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
||||
CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.29 $")
|
||||
|
||||
// strings...
|
||||
/* CALLWEAVER v1.9 and later */
|
||||
#if defined (CALLWEAVER_19)
|
||||
#define
|
||||
#define ast_config cw_config
|
||||
#define AST_CONTROL_RINGING CW_CONTROL_RINGING
|
||||
#define AST_CONTROL_BUSY CW_CONTROL_BUSY
|
||||
#define AST_CONTROL_CONGESTION CW_CONTROL_CONGESTION
|
||||
#define AST_CONTROL_PROCEEDING CW_CONTROL_PROCEEDING
|
||||
#define AST_CONTROL_PROGRESS CW_CONTROL_PROGRESS
|
||||
#define AST_CONTROL_HOLD CW_CONTROL_HOLD
|
||||
#define AST_CONTROL_UNHOLD CW_CONTROL_UNHOLD
|
||||
#define AST_CONTROL_VIDUPDATE CW_CONTROL_VIDUPDATE
|
||||
|
||||
|
||||
#define LOG_NOTICE CW_LOG_NOTICE
|
||||
|
||||
#define LOG_DEBUG CW_LOG_DEBUG
|
||||
|
||||
#define LOG_ERROR CW_LOG_ERROR
|
||||
|
||||
#define LOG_WARNING CW_LOG_WARNING
|
||||
|
||||
#define AST_FORMAT_SLINEAR CW_FORMAT_SLINEAR
|
||||
#define AST_FORMAT_ULAW CW_FORMAT_ULAW
|
||||
#define AST_FORMAT_ALAW CW_FORMAT_ALAW
|
||||
#define ast_mutex_t cw_mutex_t
|
||||
#define ast_frame cw_frame
|
||||
#define ast_verbose cw_verbose
|
||||
#define AST_FRIENDLY_OFFSET CW_FRIENDLY_OFFSET
|
||||
#define AST_MUTEX_DEFINE_STATIC CW_MUTEX_DEFINE_STATIC
|
||||
#define AST_CONTROL_PROGRESS CW_CONTROL_PROGRESS
|
||||
#define AST_CAUSE_REQUESTED_CHAN_UNAVAIL CW_CAUSE_REQUESTED_CHAN_UNAVAIL
|
||||
#define AST_CAUSE_NORMAL_CIRCUIT_CONGESTION CW_CAUSE_NORMAL_CIRCUIT_CONGESTION
|
||||
#define AST_CAUSE_USER_BUSY CW_CAUSE_USER_BUSY
|
||||
#define AST_CAUSE_NO_ANSWER CW_CAUSE_NO_ANSWER
|
||||
#define AST_CAUSE_NORMAL_CLEARING CW_CAUSE_NORMAL_CLEARING
|
||||
#define AST_SOFTHANGUP_EXPLICIT CW_SOFTHANGUP_EXPLICIT
|
||||
#define AST_SOFTHANGUP_DEV CW_SOFTHANGUP_DEV
|
||||
#define AST_CAUSE_NORMAL_CLEARING CW_CAUSE_NORMAL_CLEARING
|
||||
#define AST_FRAME_DTMF CW_FRAME_DTMF
|
||||
#define AST_FRAME_CONTROL CW_FRAME_CONTROL
|
||||
#define AST_CONTROL_ANSWER CW_CONTROL_ANSWER
|
||||
#define AST_STATE_UP CW_STATE_UP
|
||||
#define AST_STATE_RINGING CW_STATE_RINGING
|
||||
#define AST_STATE_DOWN CW_STATE_DOWN
|
||||
#define AST_FLAGS_ALL CW_FLAGS_ALL
|
||||
#define AST_FRAME_VOICE CW_FRAME_VOICE
|
||||
#define ASTERISK_GPL_KEY 0
|
||||
#define ast_channel_tech opbx_channel_tech
|
||||
#define ast_test_flag cw_test_flag
|
||||
#define ast_queue_frame cw_queue_frame
|
||||
#define ast_frdup cw_frdup
|
||||
#define ast_channel cw_channel
|
||||
#define ast_exists_extension cw_exists_extension
|
||||
#define ast_hostent cw_hostent
|
||||
#define ast_clear_flag cw_clear_flag
|
||||
#define ast_log cw_log
|
||||
#define ast_set_flag cw_set_flag
|
||||
#define ast_copy_string cw_copy_string
|
||||
#define ast_set_flag cw_set_flag
|
||||
#define ast_set2_flag cw_set2_flag
|
||||
#define ast_setstate cw_setstate
|
||||
#define ast_test_flag cw_test_flag
|
||||
#define ast_softhangup cw_softhangup
|
||||
#define ast_true cw_true
|
||||
#define ast_false cw_false
|
||||
#define ast_strlen_zero cw_strlen_zero
|
||||
#define ast_exists_extension cw_exists_extension
|
||||
#define ast_frame cw_frame
|
||||
#define ast_jb_conf cw_jb_conf
|
||||
#define ast_carefulwrite cw_carefulwrite
|
||||
#define ast_channel_unregister cw_channel_unregister
|
||||
#define ast_cli cw_cli
|
||||
#define ast_cli_register cw_cli_register
|
||||
#define ast_cli_unregister cw_cli_unregister
|
||||
#define ast_jb_read_conf cw_jb_read_conf
|
||||
#define ast_mutex_destroy cw_mutex_destroy
|
||||
#define ast_mutex_init cw_mutex_init
|
||||
#define ast_mutex_lock cw_mutex_lock
|
||||
#define ast_mutex_unlock cw_mutex_unlock
|
||||
#define ast_mutex_t cw_mutex_t
|
||||
#define ast_queue_control cw_queue_control
|
||||
#define ast_queue_frame cw_queue_frame
|
||||
#define ast_queue_hangup cw_queue_hangup
|
||||
#define ast_set_callerid cw_set_callerid
|
||||
#define ast_variable cw_variable
|
||||
#define ast_pthread_create cw_pthread_create
|
||||
#define ast_cli_entry cw_cli_entry
|
||||
#define ast_channel_register cw_channel_register
|
||||
#define ast_config_load cw_config_load
|
||||
#define ast_config_destroy cw_config_destroy
|
||||
#define ast_category_browse cw_category_browse
|
||||
#define ast_variable_browse cw_variable_browse
|
||||
#define ast_gethostbyname cw_gethostbyname
|
||||
#define ast_channel_alloc cw_channel_alloc
|
||||
#define ast_dsp_new cw_dsp_new
|
||||
#define ast_dsp cw_dsp
|
||||
#define ast_dsp_set_features cw_dsp_set_features
|
||||
#define ast_dsp_digitmode cw_dsp_digitmode
|
||||
#define ast_dsp_set_call_progress_zone cw_dsp_set_call_progress_zone
|
||||
#define ast_dsp_set_busy_count cw_dsp_set_busy_count
|
||||
#define ast_dsp_set_busy_pattern cw_dsp_set_busy_pattern
|
||||
#define ast_dsp_process cw_dsp_process
|
||||
#define ast_strdupa cw_strdupa
|
||||
#define ast_mutex_trylock cw_mutex_trylock
|
||||
#define ast_cause2str cw_cause2str
|
||||
#define ast_pbx_start cw_pbx_start
|
||||
#define ast_hangup cw_hangup
|
||||
|
||||
#else /* CALLWEAVER prior to v1.9 */
|
||||
|
||||
#define ast_config opbx_config
|
||||
#define AST_CONTROL_RINGING OPBX_CONTROL_RINGING
|
||||
|
@ -305,6 +431,8 @@ CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
|||
#define ast_pbx_start opbx_pbx_start
|
||||
#define ast_hangup opbx_hangup
|
||||
|
||||
|
||||
#endif /* CALLWEAVER_19 */
|
||||
#endif
|
||||
|
||||
#include "g711.h"
|
||||
|
@ -322,7 +450,7 @@ CALLWEAVER_FILE_VERSION(__FILE__, "$Revision: 1.27 $")
|
|||
|
||||
extern int option_verbose;
|
||||
|
||||
#define WOOMERA_VERSION "v1.27"
|
||||
#define WOOMERA_VERSION "v1.29"
|
||||
#ifndef WOOMERA_CHAN_NAME
|
||||
#define WOOMERA_CHAN_NAME "SS7"
|
||||
#endif
|
||||
|
@ -3811,6 +3939,11 @@ static int tech_indicate(struct ast_channel *self, int condition)
|
|||
ast_set_flag(tech_pvt, TFLAG_ACCEPT);
|
||||
}
|
||||
break;
|
||||
#ifdef WOO_CONTROL_SRC_FEATURE
|
||||
case AST_CONTROL_SRCUPDATE:
|
||||
res = 0;
|
||||
break;
|
||||
#endif
|
||||
case -1:
|
||||
res = -1;
|
||||
break;
|
||||
|
@ -4132,6 +4265,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
{
|
||||
|
||||
char *raw_audio_header;
|
||||
char *hw_dtmf;
|
||||
char ip[25];
|
||||
char *ptr;
|
||||
int port = 0;
|
||||
|
@ -4161,7 +4295,7 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
ptr++;
|
||||
port = atoi(ptr);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
audio_codec = woomera_message_header(wmsg, "Receive-Audio-Codec");
|
||||
if (audio_codec) {
|
||||
|
@ -4174,7 +4308,22 @@ static int woomera_event_media (private_object *tech_pvt, woomera_message *wmsg)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
hw_dtmf = woomera_message_header(wmsg, "DTMF");
|
||||
if (hw_dtmf != NULL) {
|
||||
if (strncmp(hw_dtmf, "OutofBand" ,9) == 0) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
|
||||
tech_pvt->dsp_features &= ~DSP_FEATURE_DTMF_DETECT;
|
||||
ast_dsp_set_features(tech_pvt->dsp, tech_pvt->dsp_features);
|
||||
} else {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "HW DTMF not supported %s\n", tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Sanity Check */
|
||||
owner = tech_get_owner(tech_pvt);
|
||||
|
@ -4342,7 +4491,7 @@ static int woomera_event_incoming (private_object *tech_pvt)
|
|||
|
||||
if(tech_pvt->profile->tg_language[group] != NULL &&
|
||||
strlen(tech_pvt->profile->tg_language[group])){
|
||||
strncpy(owner->language, tech_pvt->profile->tg_language[group], sizeof(owner->language) - 1);
|
||||
strncpy((char*)owner->language, (char*)tech_pvt->profile->tg_language[group], sizeof(owner->language) - 1);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
@ -4469,23 +4618,26 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
return;
|
||||
|
||||
} else if (!strcasecmp(wmsg->command, "DTMF")) {
|
||||
struct ast_frame dtmf_frame = {AST_FRAME_DTMF};
|
||||
int x = 0;
|
||||
for (x = 0; x < strlen(wmsg->command_args); x++) {
|
||||
struct ast_channel *owner = tech_get_owner(tech_pvt);
|
||||
dtmf_frame.subclass = wmsg->command_args[x];
|
||||
|
||||
if (owner) {
|
||||
ast_queue_frame(owner, ast_frdup(&dtmf_frame));
|
||||
}
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "SEND DTMF [%c] to %s\n", dtmf_frame.subclass,tech_pvt->callid);
|
||||
|
||||
char *content_len = woomera_message_header(wmsg, "Content-Length");
|
||||
struct ast_channel *owner = tech_get_owner(tech_pvt);
|
||||
if (owner && content_len && atoi(content_len) > 0) {
|
||||
int clen=atoi(content_len);
|
||||
int x;
|
||||
for (x = 0; x < clen; x++) {
|
||||
struct ast_frame dtmf_frame = {AST_FRAME_DTMF};
|
||||
dtmf_frame.subclass = wmsg->body[x];
|
||||
ast_queue_frame(owner, &dtmf_frame);
|
||||
|
||||
if (globals.debug > 1 && option_verbose > 1) {
|
||||
if (option_verbose > 2) {
|
||||
ast_verbose(WOOMERA_DEBUG_PREFIX "SEND DTMF [%c] to %s\n", dtmf_frame.subclass,tech_pvt->callid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (!strcasecmp(wmsg->command, "PROCEED")) {
|
||||
/* This packet has lots of info so well keep it */
|
||||
char *chan_name = woomera_message_header(wmsg, "Channel-Name");
|
||||
|
@ -4551,7 +4703,6 @@ static void woomera_check_event (private_object *tech_pvt, int res, woomera_mess
|
|||
|
||||
|
||||
} else if (!strcasecmp(wmsg->command, "MEDIA")) {
|
||||
|
||||
int err;
|
||||
err=woomera_event_media (tech_pvt, wmsg);
|
||||
if (err != 0) {
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
# 05 Jun 93
|
||||
#
|
||||
# $Id: Makefile7.FreeBSD,v 1.1 2008/03/12 18:57:08 sangoma Exp $
|
||||
#
|
||||
|
||||
# Uncomment this to output debug messages
|
||||
DEBUG=2
|
||||
|
||||
#***************************************************************************
|
||||
# don't change anything below
|
||||
|
||||
.OBJDIR = /usr/obj${.CURDIR}
|
||||
BINDIR = /usr/local/sbin
|
||||
PROG = wancfg
|
||||
LDADD = -ll -ly -lm -lstdc++
|
||||
CFLAGS += -Wall -O2 -D_DEBUG_=$(DEBUG) -D_GNUC_
|
||||
CFLAGS += -I. -I/common/include -I/wanpipe/code/include
|
||||
SRCS = cpp_string.cpp\
|
||||
conf_file_reader.cpp\
|
||||
text_box_yes_no.cpp\
|
||||
dialog_yes_no.cpp\
|
||||
text_box.cpp\
|
||||
menu_base.cpp\
|
||||
input_box.cpp\
|
||||
dialog_base.cpp\
|
||||
menu_main_configuration_options.cpp\
|
||||
menu_list_existing_wanpipes.cpp\
|
||||
menu_list_all_wanpipes.cpp\
|
||||
menu_new_device_configuration.cpp\
|
||||
menu_hardware_setup.cpp\
|
||||
menu_hardware_card_type.cpp\
|
||||
menu_select_card_type_manualy.cpp\
|
||||
menu_hardware_serial_card_advanced_options.cpp\
|
||||
menu_hardware_select_serial_clock_source.cpp\
|
||||
menu_hardware_te1_card_advanced_options.cpp\
|
||||
menu_hardware_te3_card_advanced_options.cpp\
|
||||
menu_hardware_select_comms_port.cpp\
|
||||
menu_te1_select_media.cpp\
|
||||
menu_te3_select_media.cpp\
|
||||
menu_hardware_serial_select_medium.cpp\
|
||||
menu_s508_io_port_select.cpp\
|
||||
menu_s508_irq_select.cpp\
|
||||
menu_s508_memory_addr.cpp\
|
||||
menu_te_select_line_decoding.cpp\
|
||||
menu_te_select_framing.cpp\
|
||||
menu_t1_lbo.cpp\
|
||||
input_box_active_channels.cpp\
|
||||
menu_te1_clock_mode.cpp\
|
||||
menu_hardware_probe.cpp\
|
||||
menu_aft_logical_channels_list.cpp\
|
||||
input_box_number_of_logical_channels.cpp\
|
||||
menu_aft_logical_channel_cfg.cpp\
|
||||
menu_advanced_pci_configuration.cpp\
|
||||
menu_hardware_cpu_number.cpp\
|
||||
menu_wan_channel_cfg.cpp\
|
||||
menu_frame_relay_basic_cfg.cpp\
|
||||
menu_frame_relay_signalling.cpp\
|
||||
input_box_number_of_dlcis.cpp\
|
||||
menu_frame_relay_dlci_configuration.cpp\
|
||||
menu_frame_relay_advanced_dlci_configuration.cpp\
|
||||
menu_frame_relay_cir_configuration.cpp\
|
||||
menu_frame_relay_arp.cpp\
|
||||
menu_frame_relay_manual_or_auto_dlci_cfg.cpp\
|
||||
input_box_frame_relay_dlci_number.cpp\
|
||||
menu_frame_relay_dlci_list.cpp\
|
||||
menu_frame_relay_advanced_global_configuration.cpp\
|
||||
menu_select_protocol.cpp\
|
||||
menu_ppp_basic_cfg.cpp\
|
||||
menu_ppp_ip_mode.cpp\
|
||||
menu_ppp_select_authentication_protocol.cpp\
|
||||
menu_net_interfaces_list.cpp\
|
||||
menu_net_interface_setup.cpp\
|
||||
net_interface_file_reader.cpp\
|
||||
menu_net_interface_ip_configuration.cpp\
|
||||
menu_net_interface_operation_mode.cpp\
|
||||
menu_net_interface_miscellaneous_options.cpp\
|
||||
menu_chdlc_basic_cfg.cpp\
|
||||
menu_chdlc_advanced_cfg.cpp\
|
||||
menu_device_miscellaneous_options.cpp\
|
||||
conf_file_writer.cpp\
|
||||
menu_adsl_encapsulation.cpp\
|
||||
menu_adsl_advanced_cfg.cpp\
|
||||
menu_adsl_standard.cpp\
|
||||
menu_adsl_trellis.cpp\
|
||||
menu_adsl_coding_gain.cpp\
|
||||
menu_adsl_rx_bin_adjust.cpp\
|
||||
menu_adsl_framing_struct.cpp\
|
||||
menu_adsl_exchange_type.cpp\
|
||||
menu_adsl_clock_type.cpp\
|
||||
wanrouter_rc_file_reader.cpp\
|
||||
menu_wan_channel_cfg_v1.cpp\
|
||||
menu_lapb_basic_cfg.cpp\
|
||||
menu_atm_basic_cfg.cpp\
|
||||
menu_atm_interface_configuration.cpp\
|
||||
message_box.cpp\
|
||||
menu_tdmv_law.cpp\
|
||||
menu_e1_lbo.cpp\
|
||||
main.cpp
|
||||
|
||||
NO_MAN =
|
||||
|
||||
.include <bsd.prog.mk>
|
|
@ -108,7 +108,10 @@ key_word_t common_conftab[] = /* Common configuration parameters */
|
|||
{ "TDMV_OPERMODE", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, opermode_name), DTYPE_STR },
|
||||
{ "RM_BATTTHRESH", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, battthresh), DTYPE_UINT },
|
||||
{ "RM_BATTDEBOUNCE", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, battdebounce), DTYPE_UINT },
|
||||
{ "RM_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, network_sync), DTYPE_UINT },
|
||||
|
||||
// { "RM_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, network_sync), DTYPE_UINT },
|
||||
{ "RM_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, network_sync), DTYPE_UINT },
|
||||
{ "FE_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, network_sync), DTYPE_UINT },
|
||||
|
||||
{ "RM_BRI_CLOCK_MASTER", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_bri_cfg_t, clock_mode), DTYPE_UCHAR },
|
||||
|
||||
|
|
|
@ -1597,8 +1597,8 @@ TE3_TXLBO = NO # NO (default) / YES
|
|||
fe_cfg->cfg.remora.battdebounce);
|
||||
te1_cfg_string += tmp_buff;
|
||||
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, "RM_NETWORK_SYNC = %s\n",
|
||||
fe_cfg->cfg.remora.network_sync == WANOPT_YES ? "YES" : "NO");
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, "FE_NETWORK_SYNC = %s\n",
|
||||
fe_cfg->network_sync == WANOPT_YES ? "YES" : "NO");
|
||||
te1_cfg_string += tmp_buff;
|
||||
|
||||
break;
|
||||
|
@ -1612,11 +1612,16 @@ TE3_TXLBO = NO # NO (default) / YES
|
|||
snprintf(tmp_buff, MAX_PATH_LENGTH, "RM_BRI_CLOCK_MASTER = %s\n",
|
||||
(fe_cfg->cfg.bri.clock_mode == WANOPT_YES ? "YES":"NO"));
|
||||
te1_cfg_string += tmp_buff;
|
||||
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, "FE_NETWORK_SYNC = %s\n",
|
||||
fe_cfg->network_sync == WANOPT_YES ? "YES" : "NO");
|
||||
te1_cfg_string += tmp_buff;
|
||||
|
||||
break;
|
||||
|
||||
case WAN_MEDIA_SERIAL:
|
||||
;//do nothing
|
||||
break;
|
||||
case WAN_MEDIA_SERIAL:
|
||||
;//do nothing
|
||||
break;
|
||||
|
||||
default:
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, "FE_TXTRISTATE = %s\n",
|
||||
|
|
|
@ -2165,7 +2165,7 @@ int main(int argc, char *argv[])
|
|||
Debug(DBG_WANCFG_MAIN, ("%s: main()\n", WANCFG_PROGRAM_NAME));
|
||||
|
||||
if(argc == 2 && !strcmp(argv[1], "version")){
|
||||
printf("\nwancfg version: 1.34\n");
|
||||
printf("\nwancfg version: 1.35 (April 28, 2008)\n");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -172,9 +172,9 @@ enum HW_SETUP_OPTIONS {
|
|||
TDMV_LAW_SELECT,
|
||||
TDMV_OPERMODE,
|
||||
AFT_ANALOG_ADVANCED,
|
||||
AFT_SERIAL_CONNECTION_TYPE,
|
||||
AFT_SERIAL_LINE_CODING,
|
||||
AFT_SERIAL_LINE_IDLE
|
||||
AFT_SERIAL_CONNECTION_TYPE,
|
||||
AFT_SERIAL_LINE_CODING,
|
||||
AFT_SERIAL_LINE_IDLE
|
||||
};
|
||||
|
||||
menu_hardware_setup::menu_hardware_setup( IN char * lxdialog_path,
|
||||
|
@ -419,7 +419,7 @@ again:
|
|||
menu_str += tmp_buff;
|
||||
menu_str += " \"Advanced Physical Medium Configuration\" ";
|
||||
break;
|
||||
case AFT_ADPTR_2SERIAL_V35X21:
|
||||
case AFT_ADPTR_2SERIAL_V35X21:
|
||||
form_AFT_Serial_options_menu(menu_str, number_of_items);
|
||||
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"%d\" ", EMPTY_LINE);
|
||||
|
|
|
@ -150,7 +150,8 @@ enum TE1_ADVANCED_OPTIONS{
|
|||
E1_SIG_MODE,
|
||||
TE_HIGHIMPEDANCE,
|
||||
BRI_CLOCK_MASTER,
|
||||
TE_RX_SLEVEL
|
||||
TE_RX_SLEVEL,
|
||||
RM_NETWORK_SYNC
|
||||
};
|
||||
|
||||
|
||||
|
@ -250,7 +251,8 @@ int menu_hardware_te1_card_advanced_options::run(OUT int * selection_index)
|
|||
link_def_t * link_def;
|
||||
wandev_conf_t *linkconf;
|
||||
sdla_te_cfg_t* te_cfg;
|
||||
const te_rx_slevel_t *te_rx_slevel_ptr;
|
||||
const te_rx_slevel_t *te_rx_slevel_ptr;
|
||||
sdla_fe_cfg_t *sdla_fe_cfg;
|
||||
|
||||
input_box_active_channels act_channels_ip;
|
||||
|
||||
|
@ -271,6 +273,7 @@ again:
|
|||
link_def = cfr->link_defs;
|
||||
linkconf = cfr->link_defs->linkconf;
|
||||
te_cfg = &linkconf->fe_cfg.cfg.te_cfg;
|
||||
sdla_fe_cfg = &linkconf->fe_cfg;
|
||||
|
||||
Debug(DBG_MENU_HARDWARE_TE1_CARD_ADVANCED_OPTIONS,
|
||||
("cfr->link_defs->name: %s\n", link_def->name));
|
||||
|
@ -311,15 +314,20 @@ again:
|
|||
menu_str = "";
|
||||
|
||||
if(linkconf->fe_cfg.media == WAN_MEDIA_BRI){
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"%d\" ", RM_NETWORK_SYNC);
|
||||
menu_str += tmp_buff;
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"External Network Sync--> %s\" ",
|
||||
(sdla_fe_cfg->network_sync == WANOPT_YES ? "Yes" : "No"));
|
||||
menu_str += tmp_buff;
|
||||
number_of_items++;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"%d\" ", BRI_CLOCK_MASTER);
|
||||
menu_str += tmp_buff;
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"BRI Master Clock Port--> %s\" ",
|
||||
(linkconf->fe_cfg.cfg.bri.clock_mode == WANOPT_YES ? "Yes":"No"));
|
||||
#if 0
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"TE clock mode----> %s\" ",
|
||||
(linkconf->fe_cfg.cfg.te_cfg.te_clock == WANOPT_NORMAL_CLK ? "Normal" : "Master"));
|
||||
#endif
|
||||
menu_str += tmp_buff;
|
||||
|
||||
}else{
|
||||
|
@ -568,6 +576,32 @@ again:
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case RM_NETWORK_SYNC:
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, "Do you want to %s External Network Sync?",
|
||||
(sdla_fe_cfg->network_sync == WANOPT_NO ? "Enable" : "Disable"));
|
||||
|
||||
if(yes_no_question( selection_index,
|
||||
lxdialog_path,
|
||||
NO_PROTOCOL_NEEDED,
|
||||
tmp_buff) == NO){
|
||||
return NO;
|
||||
}
|
||||
|
||||
switch(*selection_index)
|
||||
{
|
||||
case YES_NO_TEXT_BOX_BUTTON_YES:
|
||||
if(sdla_fe_cfg->network_sync == WANOPT_NO){
|
||||
//was disabled - enable
|
||||
sdla_fe_cfg->network_sync = WANOPT_YES;
|
||||
}else{
|
||||
//was enabled - disable
|
||||
sdla_fe_cfg->network_sync = WANOPT_NO;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case BRI_CLOCK_MASTER:
|
||||
if(linkconf->fe_cfg.cfg.bri.clock_mode == WANOPT_YES){
|
||||
//It is currently Master, ask if user wants to change Normal mode
|
||||
|
@ -736,7 +770,6 @@ cleanup:
|
|||
enum {
|
||||
RM_BATTTHRESH=1,
|
||||
RM_BATTDEBOUNCE,
|
||||
RM_NETWORK_SYNC
|
||||
};
|
||||
|
||||
menu_hardware_analog_card_advanced_options::
|
||||
|
@ -771,6 +804,7 @@ int menu_hardware_analog_card_advanced_options::run(OUT int * selection_index)
|
|||
link_def_t * link_def;
|
||||
wandev_conf_t *linkconf;
|
||||
sdla_remora_cfg_t *remora_cfg;
|
||||
sdla_fe_cfg_t *sdla_fe_cfg;
|
||||
|
||||
input_box_active_channels act_channels_ip;
|
||||
|
||||
|
@ -791,6 +825,8 @@ again:
|
|||
|
||||
link_def = cfr->link_defs;
|
||||
linkconf = cfr->link_defs->linkconf;
|
||||
|
||||
sdla_fe_cfg = &linkconf->fe_cfg;
|
||||
remora_cfg = &linkconf->fe_cfg.cfg.remora;
|
||||
|
||||
Debug(DBG_MENU_HARDWARE_ANALOG_CARD_ADVANCED_OPTIONS,
|
||||
|
@ -815,7 +851,7 @@ again:
|
|||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"%d\" ", RM_NETWORK_SYNC);
|
||||
menu_str += tmp_buff;
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, " \"External Network Sync--> %s\" ",
|
||||
(remora_cfg->network_sync == WANOPT_YES ? "Yes" : "No"));
|
||||
(sdla_fe_cfg->network_sync == WANOPT_YES ? "Yes" : "No"));
|
||||
menu_str += tmp_buff;
|
||||
number_of_items++;
|
||||
|
||||
|
@ -928,7 +964,7 @@ show_RM_BATTDEBOUNCE_input_box:
|
|||
|
||||
case RM_NETWORK_SYNC:
|
||||
snprintf(tmp_buff, MAX_PATH_LENGTH, "Do you want to %s External Network Sync?",
|
||||
(remora_cfg->network_sync == WANOPT_NO ? "Enable" : "Disable"));
|
||||
(sdla_fe_cfg->network_sync == WANOPT_NO ? "Enable" : "Disable"));
|
||||
|
||||
if(yes_no_question( selection_index,
|
||||
lxdialog_path,
|
||||
|
@ -940,12 +976,12 @@ show_RM_BATTDEBOUNCE_input_box:
|
|||
switch(*selection_index)
|
||||
{
|
||||
case YES_NO_TEXT_BOX_BUTTON_YES:
|
||||
if(remora_cfg->network_sync == WANOPT_NO){
|
||||
if(sdla_fe_cfg->network_sync == WANOPT_NO){
|
||||
//was disabled - enable
|
||||
remora_cfg->network_sync = WANOPT_YES;
|
||||
sdla_fe_cfg->network_sync = WANOPT_YES;
|
||||
}else{
|
||||
//was enabled - disable
|
||||
remora_cfg->network_sync = WANOPT_NO;
|
||||
sdla_fe_cfg->network_sync = WANOPT_NO;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -910,7 +910,7 @@ sub copy_config_files{
|
|||
}
|
||||
|
||||
sub unload_zap_modules{
|
||||
my @modules_list = ("ztdummy","wctdm","wcfxo","wcte11xp","wct1xxp","wct4xxp","tor2","zttranscode","wcusb", "wctdm24xxp","xpp_usb","xpp" ,"wcte12xp", "zaptel");
|
||||
my @modules_list = ("ztdummy","wctdm","wcfxo","wcte11xp","wct1xxp","wct4xxp","tor2","zttranscode","wcusb", "wctdm24xxp","xpp_usb","xpp" ,"wcte12xp","opvxa1200", "zaptel");
|
||||
foreach my $module (@modules_list) {
|
||||
if ($modprobe_list =~ m/$module/){
|
||||
exec_command("$module_unload $module");
|
||||
|
|
|
@ -557,6 +557,7 @@ key_word_t common_conftab[] = /* Common configuration parameters */
|
|||
{ "FE_LINE", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, line_no), DTYPE_UINT },
|
||||
{ "FE_POLL", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, poll_mode), DTYPE_UCHAR },
|
||||
{ "FE_TXTRISTATE", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, tx_tristate_mode), DTYPE_UCHAR },
|
||||
{ "FE_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, network_sync), DTYPE_UINT },
|
||||
/* Front-End parameters (old style) */
|
||||
/* Front-End parameters (old style) */
|
||||
{ "MEDIA", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, media), DTYPE_UCHAR },
|
||||
|
@ -592,7 +593,7 @@ key_word_t common_conftab[] = /* Common configuration parameters */
|
|||
|
||||
{ "RM_BRI_CLOCK_MASTER", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_bri_cfg_t, clock_mode), DTYPE_UCHAR },
|
||||
{ "RM_BRI_CLOCK", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_bri_cfg_t, clock_mode), DTYPE_UCHAR },
|
||||
{ "RM_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, network_sync), DTYPE_UINT },
|
||||
{ "RM_NETWORK_SYNC", offsetof(wandev_conf_t, fe_cfg)+smemof(sdla_fe_cfg_t, network_sync), DTYPE_UINT },
|
||||
{ "RM_FASTRINGER", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, fxs_fastringer), DTYPE_UCHAR },
|
||||
{ "RM_LOWPOWER", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, fxs_lowpower), DTYPE_UCHAR },
|
||||
{ "RM_FXSTXGAIN", offsetof(wandev_conf_t, fe_cfg)+offsetof(sdla_fe_cfg_t, cfg) + smemof(sdla_remora_cfg_t, fxs_txgain), DTYPE_INT },
|
||||
|
|
Loading…
Reference in New Issue