2007年12月20日 星期四

SIP Transaction and Dialog parameters

Transaction:
Via - Must contain a branch parameter to identify the transaction created by that request. The branch ID must always begin with the characters “z9hG4bK” as a magic cookie.
Branch parameter “branch=z9hG4bK776asdhds” to identify the transaction


Dialog:
The combination of the “To tag”, “From tag”, and “Call-ID” completely defines a peer-to-peer SIP relationship between Alice and Bob and is referred to as a dialog.

2007年12月19日 星期三

bash, tcsh shell variable experience

Default file permission is 666 (user, group, other can read/write file)
Default directory permission is 777 (user, group, other can none/add, delete/list the files of the directory)

#tcsh .tcshrc file

alias h history 25
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lA
alias su su -m

setenv EDITOR vi
setenv VISUAL ${EDITOR}
setenv EXINIT 'set autoindent'
setenv PAGER more

set path = (~/bin /bin /sbin /usr/local/{,s}bin /usr/{bin,sbin,X11R6/bin,pkg/{,s}bin,games} )

if ($?prompt) then
# An interactive shell -- set some stuff up
set filec
set history = 1000
# set ignoreeof
set mail = (/var/mail/$USER)
set mch = `hostname -s`
set prompt = "${mch:q}: {\!} "
umask 22
endif
alias vi env TERM=xterm vim
setenv CVSROOT :ext:username@IP-Address:/home/cvsroot
setenv CVS_RSH /usr/local/bin/ssh
set prompt="[%{^[[1;32m%}%n%{^[[31m%}@%{^[[33m%}%m%{^[[36m%}(%{^[[34m%}%p%{^[[36m%}):%{^[[35m%}~%C2%{^[[0m%}]"
setenv LD_LIBRARY_PATH /usr/pkg/lib:/usr/lib/compat/aout:/usr/X11R6/lib:/usr/local/lib:/usr/X11R6/lib/aout:/usr/lib/aout:/usr/lib
#setenv ENABLE_STARTUP_LOCALE zh_TW.Big5
#setenv LC_CTYPE en_US.ISO_8859-1
#setenv LANG zh_TW.Big5
# 若要支援中文顯示, 請設定成下面的 LC settings
setenv LANG zh_TW.UTF-8
setenv LC_CTYPE zh_TW.UTF-8
setenv LC_ALL zh_TW.UTF-8
setenv LC_MESSAGES zh_TW.UTF-8
unset autologout

tcshell 的cvs environment variable設定方法
setenv CVSROOT ":ext:username@1.2.3.4:/home/cvsroot"
setenv CVS_RSH "/usr/bin/ssh"

bashrc 的cvs environment variable設定方法
export CVSROOT=:ext:username@1.2.3.4:/home/cvsroot
export CVS_RSH=/usr/bin/ssh

The following are reference from http://www.horde.org/source/using.php
sh, ksh, bash, zsh:
export CVSROOT=:pserver:cvsread@anoncvs.horde.org:/repository

csh, tcsh:
setenv CVSROOT :pserver:cvsread@anoncvs.horde.org:/repository


# 另外要設定環境變數, 一般可以使用 export (設定單個) or source (讀入一個config file)

在/root/.bashrc or /root/.bash_profile檔案中,
加入下列的參數
export PS1='[fish]# '
則shell 的prompt ]就會變成
[fish]#

sh, bash:
set environment variable:
# export Variable_Name=Variable_Value
show all the environment variable values
# set
reload config file
# source /to/path/.bashrc

csh, tcsh:
set environment variable:
# setenv Variable_Name Variable_Value
show all the environment variable values
# setenv