4/29/2010

Asteris video conference

[general]
videosupport=yes

[xxx]
......
allow=h263
allow=h263p

Sync เวลา โดยใช้ ntpd

ติดตั้ง ntpd
#
Redhat/Centos : yum install ntp
Debian/Ubuntu : apt-get install ntp

#
แก้ไขไฟล์ /etc/ntp.conf
โดยประเทศไทยให้ใส่

server 1.th.pool.ntp.org
server 0.asia.pool.ntp.org
server 2.asia.pool.ntp.org

#
Restart ntpd /etc/init.d/ntp restart

4/19/2010

20 Network Tools

1: top - Process Activity Command
2: vmstat - System Activity, Hardware and System Information
3: w - Find Out Who Is Logged on And What They Are Doing
4: uptime - Tell How Long The System Has Been Running
5: ps - Displays The Processes
6: free - Memory Usage
7: iostat - Average CPU Load, Disk Activity
8: sar - Collect and Report System Activity
9: mpstat - Multiprocessor Usage
10: pmap - Process Memory Usage
11 and 12: netstat and ss - Network Statistics
13: iptraf - Real-time Network Statistics
14: tcpdump - Detailed Network Traffic Analysis
15: strace - System Calls
16: /Proc file system - Various Kernel Statistics
17: Nagios - Server And Network Monitoring
18: Cacti - Web-based Monitoring Tool
19: KDE System Guard - Real-time Systems Reporting and Graphing
20: Gnome System Monitor - Real-time Systems Reporting and Graphing

from : http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html

3/24/2010

Object-relational mapping (ORM)

ORM, O/RM, หรือ O/R mapping ย่อมาจาก Object / Relational Mapping หมายถึง การ map ข้อมูลในตารางข้อมูลของฐานข้อมูลให้อยู่ในรูปของ object-oriented language ซึงจะเป็นการสร้าง Database แบบเสมือนขึ้นให้มาอยู่ในรูป language programming ทำให้ไม่ต้องไปยุ่งกับ SQL Statement ซึ่งถ้ามีการเปลี่ยนแปลงแก้ไขต้องแก้ไขที่ตัวโปรแกรมแทน และการกระทำต่างๆยังคงเป็นแบบ Relational เหมือนเดิม

เพิ่มเติม : http://en.wikipedia.org/wiki/Object-relational_mapping

3/12/2010

Asterisk Special Variables

Special Variables
Asterisk has some special variables that are automatically defined when a new channel (call) starts up. Later you will see an example of using the ${EXTEN} variable. These definitions come from the README.variables file.

${ACCOUNTCODE} Account code (if specified)
${CALLERID} Caller ID
${CALLERIDNAME} Caller ID Name only
${CALLERIDNUM} Caller ID Number only
${CALLINGPRES} PRI Caller ID presentation for incoming calls
${CHANNEL} Current channel name
${CONTEXT} Current context
${DATETIME} Current date time in the format: YYYY-MM-DD_HH:MM:SS
${DNID} Dialed Number Identifier
${ENUM} Result of application EnumLookup
${EPOCH} Current unix style epoch
${EXTEN} Current extension
${ENV(VAR)} Environmental variable VAR
${HANGUPCAUSE} Asterisk hangup cause
${INVALID_EXTEN} The invalid called extension (used in the "i" extension)
${LANGUAGE} Current language
${LEN(VAR)} String length of VAR (integer)
${MEETMESECS} Number of seconds a user participated in a MeetMe
${PRIORITY} Current priority
${RDNIS} Redirected Dial Number ID Service
${TIMESTAMP} Current date time in the format: YYYYMMDD-HHMMSS
${TXTCIDNAME} Result of application TXTCIDName
${UNIQUEID} Current call unique identifier

${SIPCALLID} SIP Call-ID: header verbatim (for logging or CDR matching)
${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate)
${SIPUSERAGENT} SIP user agent

The dial() application sets the following variables:

${DIALEDPEERNAME} Dialed peer name
${DIALEDPEERNUMBER} Dialed peer number
${DIALEDTIME} Total time for the call in seconds (Network time).
${ANSWEREDTIME} Time from answer to end of call in seconds.
${DIALSTATUS} Status of the call, one of:
CHANUNAVAIL CONGESTION BUSY NOANSWER ANSWER CANCEL

3/05/2010

Asterisk CLI

start asterisk
#/etc/init.d/asterisk start

start CLI
#asterisk -r

-v Increase the level of verboseness on the console. The more times
-v is specified, the more verbose the output is.
Specifying this option implies -f and will cause asterisk to no
longer fork or detach from the controlling terminal. This
option may also be used in conjunction with -r and -R.

Note: This always sets the verbose level in the asterisk process,
even if it is running in the background. This will affect the
size of your log files.

3/03/2010

Iptables

Block ip address

#iptables -A INPUT -s XXX.XXX.XXX.XXX -j DROP
for example -># iptables -A INPUT -s 221.5.57.124 -j DROP
To save your changes type
#service iptables save
to View your IPTABLE list type
#iptables -L