TEJ FAQ

From synwaywiki
Revision as of 09:43, 14 May 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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