Below is a quick list of commands and configs that i've used to install asterisk and connect two softphones to the system.
Tested on Backtrack 4 (Will be installing on a Ubuntu 10.04 later).
Get the dependecies asterisk may require:
Then insall asterisk:
# cd /usr/src
# wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
# tar -zxvf asterisk-1.4-current.tar.gz
# cd asterisk-1.4-current
# ./configure && make && make install && make samples
Then we can configure our sip.conf, and extensions.conf as follows
##### sip.conf #####
[general]
port = 5060
bindaddr = 0.0.0.0
context = default
[100]
type=friend
context=incoming-calls
secret=100
host=dynamic
[101]
type=friend
context=my-phones
secret=101
host=dynamic
[others]
################
##### extensions.conf #####
[incoming-calls]
exten => 100,1,Dial(SIP/100,10)
exten => 101,1,Dial(SIP/100,10)
################
You will have to configure your softphones to match the settings in the sip.conf file
References / Good Reading: