Difference between revisions of "TEJ FAQ"

From synwaywiki
Jump to: navigation, search
(Created page with "===Why do the indicators on the TEJ boards always flash with the circuitry already connected?=== It may be due to the incorrect configuration of the board impedance. You can t...")
 
 
Line 1: Line 1:
 +
===Why does the NT module fail to be used in the mode of bri_net_ptmp in Asteriak-1.8.7.0 and above versions? ===
 +
This is because the macro definition HAVE_PRI_CALL_HOLD in Asterisk has been cancelled by default in Asterisk-1.8.7.0 and above versions, which makes the NT module fail to connect with BRI phones while its signal type is set to bri_net_ptmp. <br />
 +
 +
To solve this problem, modify as follows: add the sentence ‘#define HAVE_PRI_CALL_HOLD 1’ to the file ‘include/asterisk/autoconfig.h’ under the Asterisk source code directory, then execute the command ‘#make’ and ‘#make install’.  <br />
 +
Note: ‘./configure’ command cannot be used here, otherwise the file ‘autoconfig.h’ will be reset to default settings.
 +
 
===Why do the indicators on the TEJ boards always flash with the circuitry already connected?===
 
===Why do the indicators on the TEJ boards always flash with the circuitry already connected?===
 
It may be due to the incorrect configuration of the board impedance. You can test by pulling the corresponding jumper cap out or plug it into the board.
 
It may be due to the incorrect configuration of the board impedance. You can test by pulling the corresponding jumper cap out or plug it into the board.
  
===How to determine the board arrangement when there are more than one AST board?===
+
===How to solve the problem that TEJ digital boards cannot be configured through the WEB interface while using Elastix 1.6-11?===
If zaptel is configured automatically, you may check /etc/zaptel.conf or /etc/dahdi/system.conf to see the board arrangement.
+
Use the file Span.pm in the driver installation package to replace  <br />
If zaptel is configured manually, you may execute the command #cat /var/log/messages | grep "Launching card" to check the board arrangement.
+
/usr/lib/perl5/site_perl/5.8.8/Dahdi/Span.pm.
If the board arrangement is determined by their serial number, pay attention to the time when you execute the command.
+
  
===How to install the SynAST driver in a dahdi version for which driver and tools are published separately?===
+
===How to adjust the gain increase, gain decrease, echo switch and loopback switch on  TEJ201P and TEJ101P series boards? ===
Please download the driver and tools of dahdi separately. <br />
+
1. Load the driver. <br />
 
+
2. Execute the command ‘#cat /proc/devices’ to obtain the major device number of tej201p, e.g. the major device number is 253. <br />
1.By Script
+
3. Create a device file.
 
<pre>
 
<pre>
#cd /opt # enter the directory to source codes
+
#mknod /dev/tej201 c 253 0
#tar –zxvf SynAST-2.0.1.0.tar.gz # decompress the SynAST driver
+
#cd SynAST-2.0.1.0 # enter the directory to the SynAST driver
+
#cd dahdi # enter the directory to the ‘synway ast for dahdi’ driver
+
#./Setup install # install the driver
+
Would you like to install SynAST AST package now? y # enter ‘y’ to install
+
Please enter working dahdi directory [q](exit install) : /opt/dahdi_driver
+
# enter the directory to dahdi_driver source codes
+
Please enter dahdi_tools source directory [q](exit install):
+
                                          # enter the directory to dahdi_tools source codes
+
SELECT TEJ MODE [t, e, j] :e   # select the tej mode, or the driver will be installed in e1 mode
+
SELECT TEJXAPCI [75, 120]ohm      # set the impedance of the TEJ pci board, 75 for coaxial cables, 120 for twisted-pair cables
+
SELECT TEJ201E [75, 120]ohm      # set the impedance of the tej201e board, 75 for coaxial cables, 120 for twisted-pair cables
+
 
</pre>
 
</pre>
2.Manually
+
Here we assume the major device number is 253. It varies on actual conditions. <br />
 +
4. Operate in user applications as follows: <br />
 +
Declare the following struct:
 +
        struct bshtej_cmd_ops {
 +
        unsigned char card;
 +
        unsigned char channel;
 +
        unsigned char value;
 +
        };
 +
The meanings of the parameters in the above struct are: <br />
 +
card: The board number (count from 0); <br />
 +
channel: The channel number on a certain board (count from 1, with Timeslot 1 and Timeslot 16 unavailable for settings); <br />
 +
value: The value to be set.  <br />
 +
Note: If you want to adjust the gain (IOCTL is set to BSHTEJ_MODIFY_VOICE_TX, BSHTEJ_MODIFY_VOICE_RX), the value mentioned herein indicates the gain value to be set. If IOCTL is set to BSHTEJ_MODIFY_EC, value=1 means the echo cancellation switch of this channel is enabled, and value=0 means the echo cancellation switch of this channel is disabled. If IOCTL is set to BSHTEJ_REMOTE_LOOPBACK, value=1 means the remote loopback feature is enabled, and value=0 means the remote loopback feature is disabled.
 
<pre>
 
<pre>
#cd /opt # enter the directory to the package of SynAST source codes
+
#define SYNWAY_TEJ_IOC_MAGIC 'S'           
#tar –zxvf SynAST-2.0.1.0.tar.gz # decompress the source codes
+
#define BSHTEJ_MODIFY_VOICE_TX    _IOW(SYNWAY_TEJ_IOC_MAGIC,5,unsigned long)
#cp –rf /opt/SynAST-2.0.1.0/dahdi/srcs/fxm/fxm8apci /opt/dahdi_driver/drivers/dahdi
+
#define BSHTEJ_MODIFY_VOICE_RX    _IOW(SYNWAY_TEJ_IOC_MAGIC,6,unsigned long)
# copy the fxm8apci driver to the dahdi_driver directory.
+
#define BSHTEJ_MODIFY_EC            _IOW(SYNWAY_TEJ_IOC_MAGIC,7,unsigned long)
#cd /opt/dahdi/linux/drivers/dahdi/fxm8apci
+
#define BSHTEJ_REMOTE_LOOPBACK  _IOW(SYNWAY_TEJ_IOC_MAGIC,8,unsigned long)
# enter the directory to SynAST source codes in dahdi
+
#define DEV_BSHTEJ201 "/dev/tej201"
#make # compile the driver
+
#insmod fxm8apci.ko # load the driver
+
 
+
#cd /opt/dahdi_tools                  # enter the directory to dahdi tools
+
#./configure
+
#make # compile dahdi_tools
+
#make install # install dahdi_tools
+
 
</pre>
 
</pre>
 
+
Then, use a system call (‘open’) to open the device file, and use another system call (‘ioctl’) to adjust some parameters in the driver. The meanings of the parameters in ioctl(fd,cmd,arg) are as follows. <br />
===How to solve the problem that the system reports error in loading channel_unicall.so when you start Asterisk after restarting ISDN in a system ever installed with SS1? ===
+
fd: The return value of ‘open’. <br />
1.Enter the Asterisk directory previously installed with SS1 and execute the following command:
+
cmd: BSHTEJ_MODIFY_VOICE_RX,TX, to adjust volume; or              <br />
<pre>
+
BSHTEJ_MODIFY_EC, to enable or disable the echo cancellation; or <br />
#make uninstall
+
BSHTEJ_REMOTE_LOOPBACK, to open the remote loopback feature. <br />
</pre>
+
arg: The pointer which points to the struct bshtej_cmd_ops
2.Enter the Asterisk directory to be installed with ISDN and execute the following command:
+
<pre>
+
#make install
+
<pre>
+
 
+
===How to determine the use of Zaptel or Dahdi for Asterisk?===
+
For Asterisk-1.4.21 and versions below, use Zaptel; for Asterisk-1.4.22 and versions above, use Dahdi.
+
 
+
===How to solve the problem that the system fails to detect the hangup at remote end as the volume of the recorded busy tone is quite low?  ===
+
Modify the file main/dsp.c under the Asterisk directory, changing the previous content ‘#define DEFAULT_THRESHOLD 512’ to ‘#define DEFAULT_THRESHOLD 448’. The value can be reduced again if the problem is not solved yet.
+
 
+
===How to solve the problem that the zaptel driver fails to be installed in the system of Ubuntu 8.10, kernel 2.6.27-7-server?===
+
Use the dahdi driver.
+
 
+
===How to solve the problem that the configuration files zaptel.conf and zapata.conf cannot be found under dahdi?===
+
/etc/dahdi/system.conf under dahdi corresponds to /etc/zaptel.conf under zaptel. The configuration files system.conf and zaptel.conf, although differ in name, are the same in content.
+
/etc/asterisk/chan_dahdi.conf under dahdi corresponds to /etc/asterisk/zapata.conf under zaptel. The configuration files chan_dahdi.conf and zapata.conf, although differ in name, are the same in content.
+
 
+
===How to solve the problem that TEJ digital boards cannot be configured through the WEB interface while using Elastix 1.6-11?===
+
Use the file Span.pm in the driver installation package to replace /usr/lib/perl5/site_perl/5.8.8/Dahdi/Span.pm.
+

Latest revision as of 09:43, 14 May 2015

Why does the NT module fail to be used in the mode of bri_net_ptmp in Asteriak-1.8.7.0 and above versions?

This is because the macro definition HAVE_PRI_CALL_HOLD in Asterisk has been cancelled by default in Asterisk-1.8.7.0 and above versions, which makes the NT module fail to connect with BRI phones while its signal type is set to bri_net_ptmp.

To solve this problem, modify as follows: add the sentence ‘#define HAVE_PRI_CALL_HOLD 1’ to the file ‘include/asterisk/autoconfig.h’ under the Asterisk source code directory, then execute the command ‘#make’ and ‘#make install’.
Note: ‘./configure’ command cannot be used here, otherwise the file ‘autoconfig.h’ will be reset to default settings.

Why do the indicators on the TEJ boards always flash with the circuitry already connected?

It may be due to the incorrect configuration of the board impedance. You can test by pulling the corresponding jumper cap out or plug it into the board.

How to solve the problem that TEJ digital boards cannot be configured through the WEB interface while using Elastix 1.6-11?

Use the file Span.pm in the driver installation package to replace
/usr/lib/perl5/site_perl/5.8.8/Dahdi/Span.pm.

How to adjust the gain increase, gain decrease, echo switch and loopback switch on TEJ201P and TEJ101P series boards?

1. Load the driver.
2. Execute the command ‘#cat /proc/devices’ to obtain the major device number of tej201p, e.g. the major device number is 253.
3. Create a device file.

#mknod /dev/tej201 c 253 0

Here we assume the major device number is 253. It varies on actual conditions.
4. Operate in user applications as follows:
Declare the following struct:

       struct bshtej_cmd_ops {
       unsigned char card;
       unsigned char channel;
       unsigned char value;
       };

The meanings of the parameters in the above struct are:
card: The board number (count from 0);
channel: The channel number on a certain board (count from 1, with Timeslot 1 and Timeslot 16 unavailable for settings);
value: The value to be set.
Note: If you want to adjust the gain (IOCTL is set to BSHTEJ_MODIFY_VOICE_TX, BSHTEJ_MODIFY_VOICE_RX), the value mentioned herein indicates the gain value to be set. If IOCTL is set to BSHTEJ_MODIFY_EC, value=1 means the echo cancellation switch of this channel is enabled, and value=0 means the echo cancellation switch of this channel is disabled. If IOCTL is set to BSHTEJ_REMOTE_LOOPBACK, value=1 means the remote loopback feature is enabled, and value=0 means the remote loopback feature is disabled.

#define SYNWAY_TEJ_IOC_MAGIC 'S'            
#define BSHTEJ_MODIFY_VOICE_TX     _IOW(SYNWAY_TEJ_IOC_MAGIC,5,unsigned long)
#define BSHTEJ_MODIFY_VOICE_RX     _IOW(SYNWAY_TEJ_IOC_MAGIC,6,unsigned long)
#define BSHTEJ_MODIFY_EC            _IOW(SYNWAY_TEJ_IOC_MAGIC,7,unsigned long)
#define BSHTEJ_REMOTE_LOOPBACK   _IOW(SYNWAY_TEJ_IOC_MAGIC,8,unsigned long)
#define DEV_BSHTEJ201 "/dev/tej201"

Then, use a system call (‘open’) to open the device file, and use another system call (‘ioctl’) to adjust some parameters in the driver. The meanings of the parameters in ioctl(fd,cmd,arg) are as follows.
fd: The return value of ‘open’.
cmd: BSHTEJ_MODIFY_VOICE_RX,TX, to adjust volume; or
BSHTEJ_MODIFY_EC, to enable or disable the echo cancellation; or
BSHTEJ_REMOTE_LOOPBACK, to open the remote loopback feature.
arg: The pointer which points to the struct bshtej_cmd_ops