Friday, April 13, 2007

T1/E1 jumper on TE11xP, TE2xxP, and TE4xxP

These cards have a physical jumper for selecting whether the ports are T1 (open) or E1 (closed).
But there is also a software override for the jumper in the wct4xxp and wct11xp drivers. (See http://kb.digium.com/entry/1/121/)

To set all spans to E1 mode, use:

insmod wct4xxp t1e1override=0xFF

To set all spans to T1 mode, use:

insmod wct4xxp t1e1override=0x00

An even easier way is to add this to your /etc/modprobe.d/zaptel file:

options wct4xxp t1e1override=0xFF

The argument is a bitmask, which can be used to set each span separately, if that is needed for some reason. Span 1 is 0x01, span 2 is 0x02, span 3 is 0x04, and span 4 is 0x08. For example, "t1e1override=0x0B" would set spans 1, 2, and 4 to E1 mode, and leave span 3 in T1 mode.

custom log4j appender for jboss

it is very interesting to customize a log4j append, through which the jboss can send log to google talk IM.

To deploying the gtalklogger(written by myself) and its dependent jar files, you cannot put them simplily into jboss../server/default/lib directory.

Instead, you need to create a directory to Set the boot patch directory, which Must be absolute or url.

./run.sh -d absolute-path-to-the-boot-batch-directory


refer to the output of:
$./run.sh --help

Thursday, April 12, 2007

TE412P and centos 4.4

i am struggling with the TE412P and cent os 4.4.

(1)libpri-1.2.2
(2)zaptel-1.2.3
(3)zaptel-1.2.3

These packages are a bit old because i am trying to duplicate an old system.


when i run /sbin/ztcfg, i always got the following error:
-----------------------
Notice: Configuration file is /etc/zaptel.conf
line 0: Unable to open master device '/dev/zap/ctl'

1 error(s) detected
-----------------------

I know it is related to udev of linux kernel 2.6.* . And also i read README.udev in zaptel-1.2.3 directory.

Unless i run following modprobe manually, the /dev/zap/.... files get created. But these files should be created automatically when rebooting (udev system's function)

$modprobe zaptel
$modprobe wct4xxp

Only after above manually loaded module, the os will create the /dev/zap/xxxx .

.... BAD experience.....

Saturday, April 7, 2007

asterisk <---IAX2---> asterisk

i have two asterisk Boxes:

mobile users<--ISDN/PRI->BOX A<--IAX2-->BOX B.

(1)CALLERID(dnid) issue
When mobile users dial DDI number assigned to BOX A, the CALLERID(dnid) is available. But when Box A forward the call to BOX B, the CALLERID(dnid) is empty within Box B dialplan.

To work around this problem, i make an agreement between Box A and Box B. When Box A dial Box B, it specifies the IAX2/peer/extensionnumber, where extension number is the CALLER(dnid) of BOX A. And in dialplan of Box B, add Set(CALLERID(dnid)=${EXTEN}) to reset the CALLERID(dnid).

(2)CALLERID(num) issue:
To send the caller ID to box B, sendani=yes, need to be configured in the box A peer configuration

(3)Native transfer
To control the media path, notransfer=yes, need to be configured in the Box B.

Thursday, April 5, 2007

IP traffic monitoring

I want to monitor the network usage between two servers. After researching, i recommended following two tools:

(1)ntop
(2)iptraf

Sunday, April 1, 2007

Java and OpenVZ VPS

After installation of openvz VPS by following its user guide, i cannot even run $java -version within the VPS.

After discovering, i found that the default VPS configuration cannot be used to run java application.

(1)Example, VPS 101 is running the vps.basic configuration profile. I run the following command: $vzcalc 101 and the result show that my hardware can support about 80 VPS. But if these VPSes are used to run java application, it is obviously not correct.

(2)So, i need to create/calcualte the profile myself. Fortunately, OpenVZ has command :
$vzsplit -n 10 -f vps.java
This means that i want to create 10 VPSes for java application in the hardware node.

(3)Finally, i apply this new configuration profile to VPS 101.
$vzctl set 101 --applyconfig vps.java --save

(4)Login into VPS 101 again. It is very happy to run java.