Install a Digium card on the server and install the driver.
The required packages
http://downloads.asterisk.org/pub/telephony
asterisk-11.17.1.tar.gz
libpri-1.4.15.tar.gz
dahdi-linux-complete-current.tar.gz
1, install the dependency package
Yum-y Install libtermcap-devel libxml2-devel zlib-devel zib sqlite-devel openssl-devel ncurses-devel ncurses Kernel-devel
2, install Dahdi Drive
#tar zxf dahdi-linux-complete-current.tar.gz && cd dahdi-linux-complete-current
#cd Linux
#make && make install
#cd../tools
#./configure
#make && make install
#Make config generate startup file
2, install Libpri
#Tar zxf libpri-1.4.15.tar.gz & & CD libpri-1.4.15 needs to be installed behind dahdi, and make & & make install
3, install asterisk
#tar zxf asterisk-11.17.1.tar.gz && cd asterisk-11.17.1
#./configure
#make
#make install
#Make samples generate asterisk sample configuration file
#Make config generate startup file
#/etc/init.d/asterisk start
#Asterisk - crvvvv - enter the console
4, configuration asterisk--sip.conf
#cd /etc/asterisk.conf
#cp -pa sip.conf sip.conf.bak
#> sip.conf
#vi sip.conf
[general]
allowguest=yes
allowoverlap=yes
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
dtfmode=rfc2833
disallow=all
allow=g729
allow=gsm
[sip](!)
type=friend
host=dynamic
nat=no
canreinvite=no
context=demo99
[9901](sip)
username=9901
secret=123456
[9902](sip)
username=9902
secret=123456
5, configuration asterisk--iax.conf
#cp -pa iax.conf iax.conf.bak
#> iax.conf
#vi iax.conf
[general]
bindport=4569
bindaddr=0.0.0.0
bandwidth=low
disallow=all
allow=gsm
allow=g729
jitterbuffer=no
forcejitterbuffer=no
autokill=yes
[iax](!)
type=friend
port=4569
host=dynamic
context=demo99
qualify=yes
;transfer=no
;auth=md5
[6601](iax)
username=6601
secret=123456
[6602](iax)
username=6602
secret=123456
6, Configuration extension.conf
Assign the system a phone number 1) If you need to dial an outside line 9;2) If you are on the phone (even in Asterisk
The phone on the server), Dial (DAHDI/G1,20,RT), 3) want to transfer the incoming phone to the phone (the phone number is
990X), Dial (sip/990x,20):
#cp -pa extension.conf extension.conf.bak
#> extension.conf
#vi extension.conf
[general]
Static=yes
writeprotect=no
autofallthrough=no
clearglobalvars=no
priorityjumping=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
[demo99]
Exten = > 1, dial (SIP / ${extension},, R) × $extension is the number that matches the registration, such as 9901, which matches 9901
exten => _99.,2,Hangup
exten => _66.,1,Dial(IAX2/${EXTEN},20,r)
exten => _66.,2,Hangup
exten => 99999,1,Dial(dahdi/g1,20,rt)
exten => 99999,2,Hangup
exten => _9.,1,Dial(dahdi/g2/${EXTEN:1})
[incoming]
exten => s,1,Answer()
exten => s,2,Dial(dahdi/g1,20,rt)
7, go to the console, reload
*CLI> reload
*CLI > iax2 reload
*CLI > SIP reload
8. Connect directly to the SIP server using the Android Zoiper
*cli> SIP Show Peers # you can see the number that has been registered
Installing and configuring Asterisk and Digium cards under Centos 5.4