Está en la página 1de 86

TRNG I HC BCH KHOA

KHOA IN T - VIN THNG






N TT NGHIP





ti:
TNG I ASTERISK

V CNG NGH VoIP

















NGI THC HIN : NGUYN TH QUNH TRANG
LP : 04DT1
NGI HNG DN : GVC.TS.NGUYN VN CNG









NNG, 06/2009









Cng ho x hi ch ngha Vit Nam

c lp - T do - Hnh Phc
*****


LI CAM OAN
Em tn l: Nguyn Th Qunh Trang
Sinh vin lp: 04T1
Em xin cam oan ni dung n ny khng ging hon ton vi bt c n hoc
cng trnh c t trc. Nu khng ng, em xin chu hon ton trch nhim.



Mc lc



MC LC


MC LC
M U
DANH MC HNH V
DANH MC BNG BIU
CC T VIT TT

CHNG 1

TNG QUAN V VOIP ................................................................. 1

1.1

1.2

Gii thiu chng ................................................................................... 1

Khi qut v mng VoIP........................................................................ 1
1.2.1 Gii thiu .............................................................................................. 1
1.2.2 Khi nim.............................................................................................. 1
1.2.3 c im ca in thoi IP ................................................................... 2
1.2.4 Cc hnh thc truyn thoi qua IP ........................................................ 4
1.2.5 Mt s ng dng VoIP ......................................................................... 6
1.2.6 c tnh ca mng VoIP ....................................................................... 7
1.2.7 Yu cu cht lng i vi VoIP ......................................................... 9

1.3

Kin trc v cc thnh phn mng VoIP ........................................... 10
1.3.1 Kin trc tng qut mng VoIP .......................................................... 10
1.3.2 M hnh phn lp chc nng .............................................................. 11
1.3.3 Cc thnh phn trong mng VoIP....................................................... 13

1.4

Kt lun chng ................................................................................... 14

CHNG 2

CC GIAO THC BO HIU TRONG MNG VOIP ........... 15

2.1

2.2

Gii thiu chng ................................................................................. 15

Cc giao thc bo hiu trong mng VoIP .......................................... 15
2.2.1 H.323................................................................................................... 15
2.2.2 SIP....................................................................................................... 23
2.2.3 Giao thc SGCP (Simple Gateway Control Protocol) ....................... 31
2.2.4 Giao thc MGCP (Media Gateway Control Protocol) ....................... 31
2.2.5 Kt lun chng.................................................................................. 32

CHNG 3

TNG I ASTERISK ................................................................ 33

3.1

3.2

Gii thiu chng ................................................................................. 33

Tng i IP-PBX .................................................................................. 33
3.2.1 Mt s m hnh cuc gi s dng tng i IP-PBX........................... 36



Mc lc



3.3



Tng i Asterisk.................................................................................. 37
3.3.1 Kin trc h thng Asterisk ................................................................ 39
3.3.2 Mt s tnh nng c bn ..................................................................... 40
3.3.3 Ng cnh ng dng............................................................................. 42

3.4

Asterisk vi VoIP.................................................................................. 44
3.4.1 Cc thit b dng trong VoIP .............................................................. 44
3.4.2 Cc giao thc VoIP c Asterisk h tr........................................... 46
3.4.3 Cc chun nn v nh dng file......................................................... 47
3.4.4 File cu hnh ....................................................................................... 50
3.4.5 Dialplan trong Asterisk ....................................................................... 53

3.5

Kt lun chng ................................................................................... 56

CHNG 4

TRIN KHAI H THNG ASTERISK ..................................... 57

4.1

4.2

4.3

4.4

4.5

4.6

Gii thiu chong ................................................................................. 57

Kt ni phn cng ................................................................................ 57

Ci t phn mm ................................................................................ 58

Cu hnh h thng Aterisk................................................................... 59

Thc hin cuc gi ................................................................................ 62

Kt lun chng ................................................................................... 64

KT LUN V HNG PHT TRIN TI

PH LC



Li m u



M U

Nhng nm gn y, s lng ngi s dng Internet trn th gii ngy mt tng.
Mng Internet pht trin thnh mt mng s liu ton cu cho php nhiu loi hnh
thng tin truyn i trn . Ra i sau mng chuyn mch knh, s pht trin ca Internet
lin quan nhiu n cc k thut ca mng PSTN. Rt nhiu ngi truy nhp vo Internet
bng modem thng qua ng dy in thoi v mng in thoi c th tr thnh mi
trng truyn i nhng thng tin s liu. Cc dch v multimedia trn mng Internet
ang ngy cng pht trin, thng tin truyn trn Internet khng ch cn l s liu na m
bao gm c ting ni v hnh nh. Mng Internet v mng PSTN ang c xu hng hi
nhp li vi nhau. Mt biu hin ca s hi nhp gia mng Internet v mng PSTN l
dch v truyn thoi qua mng IP.
Dch v truyn thoi qua mng IP trong vi nm gn y ang pht trin rt mnh. N
ha hn em li nhiu li ch bao gm gim chi ph cc cuc gi ng di v tch hp
thoi v s liu vo mt mng duy nht da trn cng ngh chuyn mch gi. V vy, vic
nghin cu v nm bt cng ngh VoIP ang c nhiu i tng quan tm.
Trong qu trnh tm hiu em chn ti : Tng i ASTERISK v cng ngh
VoIP. Ni dung ti gm 4 chng:
Chng 1 Tng quan v VoIP
Trong chng ny s tm hiu cc khi nim VoIP, ng dng ca VoIP, trnh by
cc u, nhc im cng nh yu cu cht lng i vi VoIP v tm hiu v kin
trc mng v cc thnh phn ca mng VoIP.
Chng 2 Cc giao thc trong mng VoIP
Chng ny s trnh by cc khi nim, chc nng ca giao thc bo hiu trong
mng VoIP
Chng 3 Tng i Asterisk
Gii thiu v tng i Asterisk, trnh by kin trc , tnh nng v ng cnh ng
dng ca tng i Asterisk, gii thiu cc giao thc ca VoIP ca tng i.
Chng 4 Trin khai h thng Asterisk
Thc hin th nghim hnh thc truyn thoi qua mi trng IP thy c cc
tnh nng m h thng Asterisk em li.



Li m u



Trong qu trnh lm n, em c gng rt nhiu song do kin thc hn ch nn
khng th trnh khi nhng thiu st. Em rt mong nhn c s gp , hng dn v s
gip ca Thy C, bn b.
Sut qu trnh hc tp, Thy C truyn t cho em nhiu kin thc qu bu to c
s cho em hon thnh n ny. Em xin chn thnh gi li cm n n cc Thy C
trong khoa in T-Vin Thng. c bit l Thy Nguyn Vn Cng ng gp
nhiu kin qu bu v c v, ng vin em trong thi gian qua.
Em xin chn thnh cm n!
Nng, thng 6 nm 2009
Sinh vin thc hin



Nguyn Th Qunh Trang



Danh mc hnh v



DANH MC HNH V



Hnh 1.1 M hnh PC to PC......................................................................................... 5
Hnh 1.2 M hnh PC to Phone ................................................................................... 5
Hnh 1.3 M hnh Phone to Phone .............................................................................. 6
Hnh 1.4 M hnh kin trc tng quan ca mng VoIP............................................. 10
Hnh 1.5 M hnh phn cp chc nng...................................................................... 11
Hnh 1.6 Cu hnh mng VoIP trong xu hng mng th h mi NGN ................... 13
Hnh 2.1 Cc giao thc s dng trong H.323 ............................................................ 15
Hnh 2.2 Cc thnh phn ca H.323 .......................................................................... 16
Hnh 2.3 Tp giao thc H.323 ................................................................................... 18
Hnh 2.4 Qu trnh thit lp cuc gi H.323 ............................................................. 22
Hnh 2.5 Cc thnh phn ca SIP .............................................................................. 23
Hnh 2.6 Hot ng ca Proxy server........................................................................ 25
Hnh 2.7 Hot ng ca Redirect Server ................................................................... 26
Hnh 2.8 Thit lp v hy cuc gi SIP..................................................................... 27
Hnh 3.1 M hnh IP-PBX hay PBX mm............................................................. 33
Hnh 3.2 M hnh cuc gi ni b............................................................................. 36
Hnh 3.3 M hnh cuc gi t my IP ra mng PSTN .............................................. 36
Hnh 3.4 M hnh cuc gi t PSTN vo my IP-PBX ............................................ 37
Hnh 3.5 M hnh cuc gi s dng dch v SIP cng cng ..................................... 37
Hnh 3.6 S giao tip tng qut. ........................................................................... 38
Hnh 3.7 S khi ca Asterisk .............................................................................. 39
Hnh 3.8 IP BPX ........................................................................................................ 42
Hnh 3.9 Kt ni IP PBX vi PBX ............................................................................. 42
Hnh 3.10 Kt ni gia cc server asterisk ................................................................. 43
Hnh 3.11 Trin khai server IVR, VoiceMail, Conference Call ................................... 43
Hnh 3.12 Phn phi cuc gi vi hng i ................................................................ 44
Hnh 3.13 Cc chun nn........................................................................................... 48
Hnh 3.14 Cc nh dng file..................................................................................... 48
Hnh 4.1 M hnh trin khai h thng Asterisk trong mng LAN ............................ 57
Hnh 4.2 Giao din Fedora Core 8............................................................................. 58
Hnh 4.3 Giao din softphone X-lite 3.0 ................................................................... 59
Hnh 4.4 Cu hnh softphone ..................................................................................... 60
Hnh 4.5 Softphone X-Lite ng k thnh cng ti khon 200 ................................. 61
Hnh 4.6 Cc user c xc nhn ca h thng Asterisk PBX............................. 61
Hnh 4.7 User 200 rung chung 201.......................................................................... 62
Hnh 4.8 Cuc gi c thit lp gia user 200 v 201 ............................................ 62
Hnh 4.9 Li nhn c gi n voicemail box ca user 200................................... 63
Hnh 4.10 Truy nhp vo voicemail ca user 200 bng cch bm gi 500................ 63
Hnh 4.11 Cuc gi gia user 200 vi skype-username............................................. 64



Danh mc bng biu



DANH MC BNG BIU





Bng 3.1 So snh gia PBX truyn thng v IP-PBX................................................ 34
Bng 3.2 H thng qun l file trong Asterisk ........................................................... 50



Cc t vit tt



CC T VIT TT

A

AA

ACD



ATM



ATA



ADSL



API



ARP

Automated Attendant

Automatic Call Distribution
Phn phi cuc gi t ng

Asynchronous Transfer Mode
Ch truyn khng ng b

Advanced Technology Attachment
Chun truyn d liu cho cc thit b lu tr.

Asymmetric Digital Subcriber Line
ng truyn thu bao s bt ng b

Application Program Interface
Giao din ng dng

Address Resolution Protocol
Giao thc phn gii a ch ARP

C

CRC



CPL



COPS

cyclic redundancy check
Kim tra vng d

Call Processing Language
Ngn ng x l cuc gi

Common Open Policy Service
Dch v chnh sch m chung

D

DTMF

Dual Tone Multi Frequency
a tn kp



Cc t vit tt



H

HTTP

Hypertext Transfer Protocol
Giao thc truyn siu vn bn

I

IAX

IP



IPDC



IVR

Inter-Asterisk eXchange

Internet Protocol
Giao thc Internet

Internet Protocol Device Control
Giao thc iu khin thit b

Interactive Voice Response
Tng tc thoi

M

MAC



MCU



MGCP



MGW



MGWC



MIME

Media Access Control
Kh nng kt ni tng vt l

Multipoint Control Unit
Khi iu khin a im

Media Gateway Control Protocol
Giao thc iu khin Media Gateway

Media GateWay
Cng truyn thng

Media GateWay Controller
iu khin cng truyn thng

Multipurpose Internet Mail Extension
M rng th tn Internet a mc ch: Giao thc th in t



Cc t vit tt



N

NIC

Network Information Center
Trung tm thng tin mng

O

OSP

Open Settlement Protocol
Giao thc tha thun m

P

PSTN



PPP



PBX



PCI

Public Switch Telephone Network
Mng in thoi cng cng

Point-to-Point Protocol
Giao thc im ti im

Private branch exchange
Tng i c nhn

Peripheral Component Interconnect
Cc thnh phn cu hnh nn cng giao tip ngoi vi theo chun
ni tip

Q

QoS

Quality of Service
Cht lng dch v

R

RTP



RTCP



RAS



RTSP



RSVP

Real-time Transport Protocol
Giao thc truyn thi gian thc

Real Time Control Protocol
Giao thc iu khin thi gian thc

Register Admission Status
Bo hiu ng k, cp php, thng tin trng thi

Real Time Streaming Protocol
Giao thc to lung thi gian thc

Resource Reservation Protocol
Giao thc ginh trc ti nguyn mng



Cc t vit tt



S



SIP



SGCP



SAP



SDP



SS7



SGW



Session Initiation Protocol
Giao thc khi to phin

Simple Gateway Control Protocol
Giao thc iu khin cng mng n gin

Session Advertisement Protocol
Giao thc thng bo trong phin kt ni

Session Description Protocol
Giao thc m t phin

Signaling System 7
H thng bo hiu s 7

Signalling Gateway
Gateway bo hiu



Cc t vit tt



T

TCP



TDM



TLS



TTL

Transport Control Protocol
Giao thc iu khin truyn TCP

Time Division Multiplex
Ghp knh phn chia thi gian

Transmission layer security
Giao thc bo mt lp truyn ti

Time to live
Thi gian tn ti gi tin

U

UDP

User Datagram Protocol
Giao thc gi ngi s dng

V

VoIP

Voice over IP
Cng ngh truyn thoi trn mng IP



Chng 1: Tng quan v VoIP






CHNG 1

TNG QUAN V VoIP



1.1



Gii thiu chng

VoIP- in thoi internet hay thng gi l dch v in thoi di rng (Broadband
Telephony) ang lm thay i ngnh in thoi th gii. Trong mi trng doanh nghip
ang dn dn thay th kiu in thoi truyn thng tn dng cc li ch v c im m
in thoi internet mang li. Do bit r hn v VoIP, trong chng ny ta ln lt
tm hiu khi qut v VoIP, trnh by cc khi nim VoIP, m hnh truyn thoi qua mng
IP, ng dng ca VoIP, trnh by cc u, nhc im cng nh yu cu cht lng i
vi VoIP.Tm hiu v kin trc mng v cc thnh phn ca mng VoIP.

1.2

1.2.1

Khi qut v mng VoIP 1

Gii thiu
u nm 1995 cng ty VOCALTEC a ra th trng sn phm phn mm thc hin
cuc thoi qua Internet u tin trn th gii. Sau c nhiu cng ty tham gia vo
lnh vc ny. Thng 3 nm 1996, VOLCALTEC kt hp vi DIALOGIC tung ra th
trng sn phm kt ni mng PSTN v Internet. Hip hi cc nh sn xut thoi qua
mng my tnh sm ra i v thc hin chun ho dch v thoi qua mng Internet.
Vic truyn thoi qua internet gy c ch ln trong nhng nm qua v dn
c ng dng rng ri trong thc t.

1.2.2

Khi nim
C th nh ngha: Voice over Internet Protocol (VoIP) l mt cng ngh cho php
truyn thoi s dng giao thc mng IP, trn c s h tng sn c ca mng Internet.
VoIP l mt trong nhng cng ngh vin thng ang c quan tm nht hin nay khng
ch i vi cc nh khai thc, cc nh sn xut m cn c vi ngi s dng dch v.
VoIP c th va thc hin cuc gi thoi nh trn mng in thoi knh truyn thng
(PSTN) ng thi truyn d liu trn c s mng truyn d liu. Nh vy, n tn dng





1



Chng 1: Tng quan v VoIP



c sc mnh v s pht trin vt bc ca mng IP vn ch c s dng truyn d
liu thng thng.

1.2.3

c im ca in thoi IP
in thoi IP ra i nhm khai thc tnh hiu qu ca cc mng truyn s liu, khai
thc tnh linh hot trong pht trin cc ng dng mi ca giao thc IP v n c p dng
trn mt mng ton cu l mng Internet. Cc tin b ca cng ngh mang n cho in
thoi IP nhng u im sau:
+ Gim chi ph cuc gi: u im ni bt nht ca in thoi IP so vi dch v
in thoi hin ti l kh nng cung cp nhng cuc gi ng di gi r vi cht lng
chp nhn c. Nu dch v in thoi IP c trin khai, chi ph cho mt cuc gi
ng di s ch tng ng vi chi ph truy nhp internet. Nguyn nhn dn n chi
ph thp nh vy l do tn hiu thoi c truyn ti trong mng IP c kh nng s dng
knh hiu qu cao. ng thi, k thut nn thoi tin tin gim tc bt t 64 Kbps
xung thp ti 8 Kbps (theo tiu chun nn thoi G.729A ca ITU-T) kt hp vi tc
x l nhanh ca cc b vi x l ngy nay cho php vic truyn ting ni theo thi gian
thc l c th thc hin c vi lng ti nguyn bng thng thp hn nhiu so vi k
thut c.
So snh mt cuc gi trong mng PSTN vi mt cuc gi qua mng IP, ta thy:
Chi ph phi tr cho cuc gi trong mng PSTN l chi ph phi b ra duy tr cho mt
knh 64kbps sut t u cui ny ti u cui kia thng qua mt h thng cc tng i.
Chi ph ny i vi cc cuc gi ng di (lin tnh, quc t) l kh ln.
Trong trng hp cuc gi qua mng IP, ngi s dng t mng PSTN ch phi
duy tr knh 64kbps n Gateway ca nh cung cp dch v ti a phng. Nh cung cp
dch v in thoi IP s m nhn nhim v nn, ng gi tn hiu thoi v gi chng i
qua mng IP mt cch c hiu qu nht ti c Gateway ni ti mt mng in thoi
khc c ngi lin lc u kia. Vic kt ni nh vy lm gim ng k chi ph cuc gi
do phn ln knh truyn 64Kbps c thay th bng vic truyn thng tin qua mng
d liu hiu qu cao.







2



Chng 1: Tng quan v VoIP



+ Tch hp mng thoi, mng s liu v mng bo hiu: Trong in thoi IP, tn
hiu thoi, s liu v ngay c bo hiu u c th cng i trn cng mt mng IP. iu
ny s tit kim c chi ph u t xy dng nhng mng ring r.
+ Kh nng m rng (Scalability): Nu nh cc h tng i thng l nhng h
thng kn, rt kh thm vo nhng tnh nng th cc thit b trong mng internet
thng c kh nng thm vo nhng tnh nng mi. Chnh tnh mm do mang li cho
dch v in thoi IP kh nng m rng d dng hn so vi in thoi truyn thng.
+ Khng cn thng tin iu khin thit lp knh truyn vt l: Gi thng tin
trong mng IP truyn n ch m khng cn mt s thit lp knh no. Gi ch cn mang
a ch ca ni nhn cui cng l thng tin c th n c ch. Do vy, vic iu
khin cuc gi trong mng IP ch cn tp trung vo chc nng cuc gi m khng phi
tp trung vo chc nng thit lp knh.
+ Qun l bng thng: Trong in thoi chuyn mch knh, ti nguyn bng
thng cung cp cho mt cuc lin lc l c nh (mt knh 64Kbps) nhng trong in
thoi IP vic phn chia ti nguyn cho cc cuc thoi linh hot hn nhiu. Khi mt cuc
lin lc din ra, nu lu lng ca mng thp, bng thng dnh cho lin lc s cho cht
lng thoi tt nht c th; nhng khi lu lng ca mng cao, mng s hn ch bng
thng ca tng cuc gi mc duy tr cht lng thoi chp nhn c nhm phc v
cng lc c nhiu ngi nht. im ny cng l mt yu t lm tng hiu qu s dng
ca in thoi IP. Vic qun l bng thng mt cch tit kim nh vy cho php ngi ta
ngh ti nhng dch v cao cp hn nh truyn hnh hi ngh, iu m vi cng ngh
chuyn mch c ngi ta khng thc hin v chi ph qu cao.
+ Nhiu tnh nng dch v: Tnh linh hot ca mng IP cho php to ra nhiu tnh
nng mi trong dch v thoi. V d cho bit thng tin v ngi gi ti hay mt thu bao
in thoi IP c th c nhiu s lin lc m ch cn mt thit b u cui duy nht (V d
nh mt thit b IP Phone c th c mt s in thoi dnh cho cng vic, mt cho cc
cuc gi ring t).
+ Kh nng multimedia: Trong mt cuc gi ngi s dng c th va ni
chuyn va s dng cc dch v khc nh truyn file, chia s d liu, hay xem hnh nh
ca ngi ni chuyn bn kia.



3



Chng 1: Tng quan v VoIP



in thoi IP cng c nhng hn ch:
+ K thut phc tp: Truyn tn hiu theo thi gian thc trn mng chuyn mch
gi l rt kh thc hin do mt gi trong mng l khng th trnh c v tr khng c
nh ca cc gi thng tin khi truyn trn mng. c c mt dch v thoi chp nhn
c, cn thit phi c mt k thut nn tn hiu t c nhng yu cu kht khe: t s
nn ln ( gim c tc bit xung), c kh nng suy on v to li thng tin ca
cc gi b tht lc...Tc x l ca cc b Codec (Coder and Decoder- B m ha v
gii m) phi nhanh khng lm cuc m thoi b gin on. ng thi c s h
tng ca mng cng cn c nng cp ln cc cng ngh mi nh Frame Relay,
ATM,... c tc cao hn v phi c mt c ch thc hin chc nng QoS (Quality of
Service- Cht lng dch v). Tt c cc iu ny lm cho k thut thc hin in thoi IP
tr nn phc tp v khng th thc hin c trong nhng nm trc y.
+ Vn bo mt (security): Mng Internet l mt mng c tnh rng khp v
hn hp (hetorogenous network). Trong c rt nhiu loi my tnh khc nhau cng cc
dch v khc nhau cng s dng chung mt c s h tng. Do vy khng c g m bo
rng thng tin lin quan n c nhn cng nh s lin lc truy nhp s dng dch v ca
ngi dng c gi b mt.
Nh vy, in thoi IP chng t n l mt loi hnh dch v mi rt c tim nng.
Trong tng lai, in thoi IP s cung cp cc dch v hin c ca in thoi trong mng
PSTN v cc dch v mi ca ring n nhm em li li ch cho ng o ngi dng.
Tuy nhin, in thoi IP vi t cch l mt dch v s khng tr nn hp dn hn PSTN
ch v n chy trn mng IP. Khch hng ch chp nhn loi dch v ny nu nh n a
ra c mt chi ph thp v nhng tnh nng vt tri hn so vi dch v in thoi hin
ti.

1.2.4
1.2.4.1

Cc hnh thc truyn thoi qua IP
M hnh PC to PC
Trong m hnh ny, mi my tnh cn c trang b mt sound card, mt microphone,
mt speaker v c kt ni trc tip vi mng Internet thng qua modem hoc card
mng. Mi my tnh c cung cp mt a ch IP v hai my tnh c th trao i cc
tn hiu thoi vi nhau thng qua mng Internet. Tt c cc thao tc nh ly mu tn hiu



4







Chng 1: Tng quan v VoIP



m thanh, m ho v gii m, nn v gii nn tn hiu u c my tnh thc hin. Trong
m hnh ny ch c nhng my tnh ni vi cng mt mng mi c kh nng trao i
thng tin vi nhau.




Internet


PC
`






Hnh 1.1 M hnh PC to PC
`


PC

1.2.4.2

M hnh PC to Phone
M hnh PC to Phone l mt m hnh c ci tin hn so vi m hnh PC to PC. M
hnh ny cho php ngi s dng my tnh c th thc hin cuc gi n mng PSTN
thng thng v ngc li. Trong m hnh ny mng Internet v mng PSTN c th giao
tip vi nhau nh mt thit b c bit l Gateway. y l m hnh c s dn ti
vic kt hp gia mng Internet v mng PSTN cng nh cc mng GSM hay a dch v

khc.










PC






`





Internet






PSTN










Phone

Hnh 1.2 M hnh PC to Phone

1.2.4.3

M hnh Phone to Phone
y l m hnh m rng ca m hnh PC to Phone s dng Internet lm phng tin lin
lac gia cc mng PSTN. Tt c cc mng PSTN u kt ni vi mng Internet thng qua
cc gateway. Khi tin hnh cuc gi mng PSTN s kt ni n gateway gn nht. Ti
gateway a ch s c chuyn i t a ch PSTN sang a ch IP c th nh tuyn
cc gi tin n c mng ch. ng thi gateway ngun c nhim v chuyn i tn
hiu thoi tng t thnh dng s sau m ho, nn, ng gi v gi qua mng. Mng


5







Chng 1: Tng quan v VoIP



ch cng c kt ni vi gateway v ti gateway ch, a ch li c chuyn i tr
li thnh a ch PSTN v tn hiu c gii nn, gii m chuyn i ngc li thnh tn
hiu tng t gi vo mng PSTN n ch.














Hnh 1.3 M hnh Phone to Phone

1.2.5

Mt s ng dng VoIP
Giao tip thoi s vn l dng giao tip c bn ca con ngi.Mng in thoi cng
cng khng th b n gin thay th, thm ch thay i trong thi gian ti. Mc ch tc
thi ca cc nh cung cp dch v in thoi IP l ti to li kh nng ca in thoi vi
mt chi ph vn hnh thp hn nhiu v a ra cc gii php k thut b sung cho mng

PSTN.
in thoi c th c p dng cho gn nh mi yu cu ca giao tip thoi, t mt
cuc m thoi c bn cho n mt cuc gi hi ngh nhiu ngi phc tp. Cht lng
m thanh c truyn cng c th bin i tu theo ng dng. Ngoi ra, vi kh nng ca
Internet, dch v in thoi IP s cung cp thm nhiu tnh nng mi.
Ta c th xem xt mt vi ng dng ca in thoi :
Thoi thng minh
H thng in thoi ngy cng tr nn hu hiu: r, ph bin, d s dng, c
ng. N ch c mt s phm iu khin. Trong nhng nm gn y, ngi ta c
gng to ra thoi thng minh, u tin l cc thoi bn, sau l n cc server. Nhng
mi c gng u tht bi do s tn ti ca cc h thng c sn.
Internet s thay i iu ny. K t khi Internet ph khp ton cu, n c s
dng tng thm tnh thng minh cho mng in thoi ton cu. Gia mng my tnh v
mng in thoi tn ti mt mi lin h. Internet cung cp cch gim st v iu khin cc




6













Chng 1: Tng quan v VoIP



cuc thoi VoIP mt cch tin li hn. Chng ta c th thy c kh nng kim sot v
iu khin cc cuc gi thng qua mng Internet.
Dch v in thoi Web
World Wide Web lm cuc cch mng trong cch giao dch vi khch hng ca
cc doanh nghip. in thoi Web hay bm s (click to dial) cho php cc doanh
nghip c th a thm cc phm bm ln trang web kt ni ti h thng in thoi
ca h.
Truy cp cc trung tm tr li in thoi
Truy cp n cc trung tm phc v khch hng qua mng Internet s thc y
mnh m thng mi in t. Dch v s cho php mt khch hng c cu hi v mt sn
phm c cho hng qua Internet c cc nhn vin ca cng ty tr li trc tip.
Dch v fax qua IP
Vic s dng Internet khng nhng c m rng cho thoi m cn cho c dch v
fax. Nu bn gi nhiu fax t PC, c bit l gi ra nc ngoi th vic s dng dch
v Internet faxing s gip bn tit kim c tin v c knh thoi. Dch v ny s
chuyn trc tip t PC ca bn qua kt ni Internet.

1.2.6
1.2.6.1

c tnh ca mng VoIP
u im
Gim chi ph: y l u im ni bt ca VoIP so vi in thoi ng di thng
thng. Chi ph cuc gi ng di ch bng chi ph cho truy nhp Internet. Mt gi cc
chung s thc hin c vi mng Internet v do tit kim ng k cc dch v thoi
v fax. S chia s chi ph thit b v thao tc gia nhng ngi s dng thoi v d liu
cng tng cng hiu qu s dng mng. ng thi k thut nn thoi tin tin lm gim
tc bit t 64Kbps xung di 8Kbps, tc l mt knh 64Kbps lc ny c th phc v
ng thi 8 knh thoi c lp. Nh vy, l d ln nht gip cho chi ph thc hin cuc
gi VoIP thp chnh l vic s dng ti u bng thng.
Tnh thng nht : H thng VoIP c th tch hp c mng thoi , mng s liu v
mng bo hiu. Cc tn hiu thoi, d liu, bo hiu c th cng i trn mt mng IP. Vic
ny s gim ng k chi ph u t.





7













Chng 1: Tng quan v VoIP



Vn qun l bng thng: Trong PSTN, bng thng cung cp cho mt cuc gi
l c nh. Trong VoIP, bng thng c cung cp mt cch linh hot v mm do hn
nhiu. Cht lng ca VoIP ph thuc vo nhiu yu t, quan trng nht l bng thng.
Do khng c s bt buc no v mt thng lng gia cc thit b u cui m ch c
cc chun tu vo bng thng c th ca mnh, bn thn cc u cui c th t iu chnh
h s nn v do iu chnh c cht lng cuc gi.
Nng cao ng dng v kh nng m rng: Thoi v fax ch l cc ng dng khi
u cho VoIP, cc li ch trong thi gian di hn c mong i t cc ng dng a
phng tin (multimedia) v a dch v. Tnh linh hot ca mng IP cho php to ra nhiu
tinh nng mi trong dch v thoi. ng thi tnh mm do cn to kh nng m rng
mng v cc dch v.
Tnh bo mt cao: VoIP c xy dng trn nn tng Internet vn khng an ton,
do s dn n kh nng cc thng tin c th b nh cp khi cc gi tin b thu lm
hoc nh tuyn sai a ch mt cch c khi chng truyn trn mng. Cc giao thc SIP
(Session ineitiation Protocol giao thc khi u phin) c th thnh mt m v xc nhn
cc thng ip bo hiu u cui. RTP (Real Time Protocol) h tr m thnh mt m ca
phng thc truyn thng trn ton tuyn c m ho thnh mt m m bo truyn

thng an ton.

1.2.6.2

Nhc im
Cht lng dch v cha cao: Cc mng s liu vn d khng phi xy dng vi
mc ch truyn thoi thi gian thc, v vy khi truyn thoi qua mng s liu cho cht
lng cuc gi khng c m bo trong trng hp mng xy ra tc nghn hoc c
tr ln. Tnh thi gian thc ca tn hiu thoi i hi cht lng truyn d liu cao v n
nh. Mt yu t lm gim cht lng thoi na l k thut nn tit kim ng
truyn. Nu nn xung dung lng cng thp th k thut nn cng phc tp, cho cht
lng khng cao v c bit l thi gian x l s lu, gy tr.
Vn ting vng: Nu nh trong mng thoi, tr thp nn ting vng khng
nh hng nhiu th trong mng IP, do tr ln nn ting vng nh hng nhiu n cht
lng thoi.





8













Chng 1: Tng quan v VoIP



K thut phc tp: Truyn tn hiu theo thi gian thc trn mng chuyn mch
gi l rt kh thc hin do mt gi trong mng l khng th trnh c v tr khng c
nh ca cc gi thng tin khi truyn trn mng. c c mt dch v thoi chp nhn
c, cn thit phi c mt k thut nn tn hiu t c nhng yu cu kht khe: t s
nn ln ( gim c tc bit xung), c kh nng suy on v to li thng tin ca
cc gi b tht lc... Tc x l ca cc b Codec (Coder and Decoder) phi nhanh
khng lm cuc m thoi b gin on. ng thi c s h tng ca mng cng cn
c nng cp ln cc cng ngh mi nh Frame Relay, ATM,... c tc cao hn
hoc phi c mt c ch thc hin chc nng QoS (Quality of Service). Tt c cc iu
ny lm cho k thut thc hin in thoi IP tr nn phc tp v khng th thc hin
c trong nhng nm trc y
Ngoi ra c th k n tnh phc tp ca k thut v vn bo mt thng tin (do
Internet ni ring v mng IP ni chung vn c tnh rng khp v hn hp, khng c g
bo m rng thng tin c nhn c gi b mt).

1.2.7

Yu cu cht lng i vi VoIP
T nhng nhc im chnh ca mng chuyn mch gi t ra nhng yu cu
cho VoIP nh sau:
Cht lng thoi phi n nh, tr chp nhn c.
Mng IP c bn phi p ng c nhng tiu ch hot ng kht khe gm gim
thiu vic khng chp nhn cuc gi, mt mt gi v mt lin lc. iu ny i hi ngay
c trong trng hp mng b nghn hoc khi nhiu ngi s dng chung ti nguyn ca
mng cng mt lc.
Vic bo hiu c th tng tc c vi bo hiu ca mng PSTN.
Qun l h thng an ton, a ch ho v thanh ton phi c cung cp, tt nht l
c hp nht vi cc h thng h tr hot ng PSTN.













9







Chng 1: Tng quan v VoIP



1.3

1.3.1



Kin trc v cc thnh phn mng VoIP

Kin trc tng qut mng VoIP

























































Hnh 1.4 M hnh kin trc tng quan ca mng VoIP
Trong m hnh ny l s c mt ca ba thnh phn chnh trong mng VoIP l:




10









Chng 1: Tng quan v VoIP



IP Phone (hay cn gi l SoftPhone): l thit b giao din u cui pha ngi dng
vi mng VoIP. Cu to chnh ca mt IP Phone gm hai thnh phn chnh:Thnh phn
bo hiu mng VoIP: bo hiu c th l H.323 s dng giao thc TCP hay SIP s dng
UDP hoc TCP lm giao thc truyn ti ca mnh. Thnh phn truyn ti media: s dng
RTP truyn lung media vi cht lng thi gian thc v c iu khin theo giao
thc RTCP.
VoIP Server: chc nng chnh ca Server trong mng VoIP ty thuc vo giao thc
bo hiu c s dng. Nhng v m hnh chung th VoIP Server thc hin cc chc
nng sau:
nh tuyn bn tin bo hiu trong mng VoIP
ng k, xc thc ngi s dng
Dch a ch trong mng
Ni chung, VoIP Server trong mng nh l u no ch huy mi hot ng ca mng.
Server c th tch hp tt c cc chc nng (SoftSwitch) hoc nm tch bit trn cc
Server chc nng khc nhau ( Location Server, Registrar Server, Proxy Server,).

1.3.2

M hnh phn lp chc nng
V mt chc nng, cng ngh VoIP c th c chi lm ba lp nh sau:


Lp ng dng dch v


Giao din m v tun theo chun


Lp iu khin cuc gi


Giao din m v tun theo chun


Lp c s h tng mng gi


Hnh 1.5 M hnh phn cp chc nng
Lp c s h tng mng gi thc hin chc nng truyn ti lu lng thoi. Trong
VoIP, c s h tng l cc mng IP. Giao thc truyn ti thi gian thc RTP (Realtime
Transport Protocol) kt hp vi UDP v IP gip truyn ti thng tin thoi qua mng IP.
RTP chy trn UDP, cn UDP hot ng trn IP hnh thnh ln c ch truyn

RTP/UDP/IP trong VoIP.

11



Chng 1: Tng quan v VoIP



Trong cc mng IP, hin tng cc gi IP tht lc hoc n khng theo th t
thng xuyn xy ra. C ch truyn TCP/IP khc phc vic mt gi bng c ch truyn
li khng ph hp vi cc ng dng thi gian thc vn rt nhy cm vi tr. RTP vi
trng tem thi gian (timestamp) c dng bn thu nhn bit v x l cc vn nh
tr, s thay tr(jitter) v s mt gi.



Lp iu khin cuc gi thc hin chc nng bo hiu, nh hng cuc gi trong
VoIP. S phn tch gia mt phng bo hiu v truyn ti c thc hin PSTN vi
bo hiu knh chung SS7, nhng y nhn mnh mt thc t c nhiu chun bo hiu
cho VoIP cng tn ti nh H323, SIP hay SGCP/MGCP (Simple Gateway Control
Protocol/ Media Gateway Control Protocol). Cc giao thc bo hiu ny c th hot ng
cng nhau, c ng dng ph hp vi nhng nhu cu c th ca mng. Ngoi ra lp
ny cn cung cp chc nng truy nhp ti dch v bn trn cng nh cc giao din lp
trnh m pht trin ng dng.



Lp ng dng dch v m nhim chc nng cung cp dch v trong mng vi c
dch v c tong t nh trong PSTN v dch v mi thm vo. Cc giao din m cho
php cc nh cung cp phn mm c lp pht trin ra nhiu ng dng mi. c bit l
cc ng dng da trn Web, cc ng dng kt hp gia thoi v d liu, cc ng dng
lin quan ti thng mi in t. S phn tch lp dch v lm cho cc dch v mi c
trin khai nhanh chng. Ngoi ra, cc chc nng nh qun l, nhn thc cuc gi v
chuyn i a ch cng c thc hin lp ny.
Do cc giao din gia cc lp l m v tun theo chun, to ra nhiu s la chn
khi xy dng thit k mng. V d, ng vi lp c s h tng mng ta c th dng cc
router v switch ca hng Cisco, iu khin cuc gi thc hin bng cc gatekeeper ca
VocalTec v cc dch v c cung cp bi server dch v ca Netspeak. Do m hnh
trn khng ch c gi tr v mt l thuyt.









12





Chng 1: Tng quan v VoIP



1.3.3



Cc thnh phn trong mng VoIP






















Hnh 1.6 Cu hnh mng VoIP trong xu hng mng th h mi NGN
Mng VoIP phi c kh nng thc hin cc chc nng m mng in thoi cng
cng thc hin, ngoi ra phi thc hin chc nng ca mt gateway gia mng IP v
mng in thoi cng cng. Thnh phn ca mng in thoi IP c th gm cc phn t
sau y:
+ Thit b u cui kt ni vi mng IP: L mt nt cui cng trong mng in
thoi IP, mt thit b u cui c th cho php mt thu bao trong mng IP thc hin
cuc gi. Cuc gi s c gatekeeper m u cui hoc thu bao ng k gim st.
+ Mng truy nhp IP: L cc loi mng d liu s dng chng giao thc TCP/IP
trong s dng giao thc IP cho lp mng (lp 3) cn lp truy nhp mng (lp 2) c
th l giao thc ca mng LAN, x25, Frame Relay, PPP....
+ Gateway: L thit b c chc nng kt ni hai mng khng ging nhau, hu ht
cc trng hp l mng IP v mng PSTN. C 3 loi gateway l: Gateway truyn ti
knh thoi, Gateway iu khin truyn ti knh thoi v Gateway bo hiu.
- Gateway bo hiu (SGW- Signalling Gateway): chc nng trung chuyn gia bo
hiu trong mng chuyn mch knh (nh l SS7 hay R2) v bo hiu trong mng IP
(H.323), phi hp hot ng vi Gateway truyn ti v h thng qun l mng. Gateway
bo hiu c th ng c lp hoc c th kt hp vi Gateway truyn ti thoi thnh mt
Gateway duy nht.



13



Chng 1: Tng quan v VoIP



- Gateway truyn ti knh thoi( MGW- Media Gateway): Chc nng chuyn i
khun dng thng tin t thng tin ghp knh theo thi gian (TDM) trong mng chuyn
mch gi thnh cc gi tin IP v ngc li, nn tn hiu thoi (voice compression), nn
khong lng (silent comppression) trit ting vng (echo cancellation). Ngoi ra cn cung
cp cc giao din vt cho cc kt ni ca cc mng (nh E1/T1 vi mng chuyn mch
knh, ethernet/frame relay vi mng IP).
- Gateway iu khin truyn ti knh thoi (MGWC-Media Gateway Controller): Vai
tr nh l phn t kt ni gia Gateway bo hiu v gatekeeper. N nhn thng tin bo
hiu t mng chuyn mch knh thng qua gateway bo hiu, t mng IP thng qua
gatekeeper thc hin vic iu khin gateway truyn ti knh thoi.
+ Gatekeeper: C th xem gatekeeper nh l b no ca h thng mng in thoi
IP. N cung cp chc nng qun l cuc gi mt cch tp trung v mt s cc dch v
quan trng khc nh l: nhn dng cc u cui v gateway, qun l bng thng, chuyn
i a ch (t a ch IP sang a ch E.164 v ngc li), ng k hay tnh cc...Mi
gatekeeper s qun l mt vng bao gm cc u cui ng k, nhng cng c th
nhiu gatekeeper cng qun l mt vng trong trng hp mt vng c nhiu gatekeeper.

1.4

Kt lun chng

S pht trin nhy vt ca mng chuyn mch gi IP hin nay khng ch em li cho
chng ta nhng dch v mi a dng m cn l c hi ci thin cc dch v vin thng
trc kia vi cht lng tt hn v gi thnh r hn. Trn c s , mng VoIP ra i v
ngy cng p ng tt hn cc yu cu t ra nh cht lng dch v, gi thnh, s lng
tch hp cc dch v thoi ln phi thoi.Chng 1 ta tm hiu khi nim kin trc mng
VoIP, nhng u, nhc im ca mng VoIP, nhng yu cu v cht lng ca VoIP
m bo cht lng cuc gi. Chng 2 ta s tm hiu v cc giao thc truyn ti v bo
hiu trao i gia cc thit b u cui trong kt ni VoIP.













14
Tnh nng Giao thc
Call Signalling H.225
Media Control H.245
Audio Codecs G.711, G.722, G.723, G.728, G.729
Video Codecs H261, H263
Data Sharing T.120
Media Transport RTP/RTCP




Chng 2 Cc giao thc bo hiu trong mng VoIP




CHNG 2

CC GIAO THC BO HIU TRONG MNG VoIP



2.1


Gii thiu chng

Cng ngh VoIP l cng ngh truyn tn hiu thoi trn nn IP, chnh v th m h
thng VoIP phi c h tr cc giao thc c s dng trn mng Internet v phi c
kin trc thch ng vi kin trc mng IP. Chng 2 trnh by cc khi nim, chc nng
ca giao thc bo hiu trong mng VoIP.

2.2

2.2.1

Cc giao thc bo hiu trong mng VoIP

H.323
Giao thc H.323 l chun do ITU-T pht trin cho php truyn thng a phng tin qua
cc h thng da trn mng chuyn mch gi, v d nh Internet. Tiu chun H.323 bao
gm bo hiu v iu khin cuc gi, truyn v iu khin a phng tin v iu khin
bng thng cho hi ngh im - im v a im.

2.2.1.1

Tiu chun H.323 bao gm cc giao thc




















Hnh 2.1 Cc giao thc s dng trong H.323




































15





Chng 2 Cc giao thc bo hiu trong mng VoIP



2.2.1.2



Cc thnh phn ca H.323:




















Hnh 2.2 Cc thnh phn ca H.323
H323 Terminal: Thc hin cc chc nng u cui : thc hin gi hoc nhn cuc
gi.
Gm c:

- System Control Unit.

- Media Transmission.

- Audio Codec.

- Network Interface.

- Video Codec.
- Data channel Support Application.
Gateway:
Gateway l phn t khng nht thit phi c trong mt giao tip ca cc phn t
H.323, n ng vai tr lm phn t cu ni v ch tham gia vo mt cuc gi khi c s
chuyn tip t mng H.323 (v d nh mng LAN hoc Internet) sang mng phi H.323
( nh PSTN). Gateway thc hin mt s chc nng nh :
Chuyn i gia cc dng khung truyn dn.
Chuyn i gia cc th tc giao tip.
Chuyn i gia cc dng m ho khc nhau ca cc lung tn hiu hnh nh cng
nh m thanh.





16



Chng 2 Cc giao thc bo hiu trong mng VoIP



Thc hin vic thit lp v xo cuc gi c pha mng LAN cng nh pha mng
chuyn mch knh.
Gatekeeper:
Gatekeeper l phn t khng nht thit phi tn ti trong mt h thng H.323, n
thc hin vic iu khin cc dch v gi ca cc u cui H.323. Cc chc nng ca mt
Gatekeeper c phn bit lm hai loi l cc chc nng bt buc v cc chc nng
khng bt buc.
Cc chc nng ca Gatekeeper :
Dch a ch (Address Translation): Dch a ch Address Translation: Gatekeeper
s thc hin vic chuyn i t mt a ch hnh thc (dng tn gi) ca cc thit b u
cui v Gateway sang a ch truyn dn thc trong mng (a ch IP).
iu khin quyn truy nhp (Admission Control):Vi mi ti nguyn mng c th,
ngi qun tr mng t ra mt ngng ch s hi thoi cng lc cho php trn mng .
Gatekeeper c nhim v t chi kt ni mi mi khi t ti ngng. N iu khin quyn
truy nhp mng ca ngi dng theo mc u tin gn trc.
iu khin gii thng (Bandwidth Control):Gim st v iu khin vic s dng
gii thng mng. ng thi Gatekeeper cng phi bo m lu lng thng tin truyn
khng c vt qu ti ca mng do nh qun tr mng t ra.
iu khin vng (Zone Management): y ch vng c trng cho tp hp tt
c cc phn t H.323 gm thit b u cui, Gateway, MCU c ng k hot ng vi

Gatekeeper.
iu khin bo hiu cuc gi (Call Control Signaling): Ty chn. Gatekeeper cung
cp a ch ch cho ngi gi theo hai ch trc tip v chn ng. Ti ch trc
tip, sau khi cung cp a ch ch th Gatekeeper ngng tham gia hot ng bt tay gia
cc bn. Ti ch chn ng, a ch ch l a ch ca Gatekeeper nn n ng vai
tr trung gian chuyn tip mi thng tin trao i trong qu trnh bt tay gia cc bn.
Gatekeeper x l cc thng tin bo hiu Q.931 trao i gia cc bn.
Qun l gii thng (Bandwidth Management): Ty chn. Gatekeeper gii hn
s cuc gi cng lc trong min ca n trong phin Q.931.





17





Chng 2 Cc giao thc bo hiu trong mng VoIP



Dch v qun l cuc gi (Call Management Service): Ty chn. Gatekeeper lu
tr mt danh sch cc cuc gi hin thi cung cp thng tin cho vic qun l gii
thng v xc nh Terminal no ang bn.
Dch v xc nhn cuc gi (Call Authorization Service): Ty chn. Gatekeeper
loi b cuc gi khi qu trnh xc nhn l sai ngay c khi cha ti ngng.
Ngoi ra Gatekeeper cn thng xuyn c cp nht thm cc dch v ph nh

FORWARD, TRANSFER,...
MCU (Multipoint Control Unit)
Cung cp chc nng hi thoi vi s bn tham gia nhiu hn hai. N phi hp cc
phng thc giao tip ca cc bn tham gia v cung cp cc c trng trn m thanh v
hnh nh (nu cn) cho cc Terminal.
MCU bao gm hai thnh phn :
B iu khin a im (Multipoint Controller- MC) : thit lp v qun l hi thoi
nhiu bn qua H.245. MC c th c t trong Gatekeeper, Gateway, Terminal, MCU.
B x l a im ( Multipoint Processor- MP): ng vai tr trn tn hiu, phn
knh v lu chuyn dng bit qu trnh giao tip gia cc bn tham gia hi thoi.
i vi MCU tp trung th c y MC v MP. i vi MCU phn quyn th
ch cn chc nng ca MC. S khc bit l ch trong hi thoi phn quyn cc bn trao
i trc tip vi nhau m khng cn phi thng qua MCU. Ngoi ra, ngi ta c th kt
hp gia hai loi ny, to thnh MCU lai ghp.

2.2.1.3

Tp giao thc H.323
















Hnh 2.3 Tp giao thc H.323

























18



Chng 2 Cc giao thc bo hiu trong mng VoIP



2.2.1.3.1



Bo hiu RAS

Cung cp cc th tc iu khin tin cuc gi trong mng H.323 c GK. Knh bo
hiu RAS c thit lp gia cc u cui v cc GK trc cc knh khc. N c lp vi
knh bo hiu cuc gi v knh iu khin H.245. Cc bn tin RAS c truyn qua
mng thng qua kt ni UDP, thc hin vic ng k, cho php, thay i bng thng,
trng thi v cc th tc hu b cuc gi. Bo hiu RAS gm nhng qu trnh sau:

-

-

Tm GateKeeper.
ng k : ng k l mt qu trnh cho php GW, cc u cui v MCU
tham gia vo mt vng v bo cho GK bit a ch truyn vn v a ch b danh ca n.





2.2.1.3.2

-

-
nh v u cui
Cho php, thay i bng thng, trng thi v hu quan h

Bo hiu iu khin cuc gi H.225

Trong mng H.323, th tc bo hiu cuc gi c da trn khuyn ngh H.225 ca
ITU. Khuyn ngh ny ch r cch s dng v tr gip ca cc bn tin bo hiu Q.931.
Sau khi khi to thit lp cuc gi. Cc bn tin iu khin cuc gi v cc bn tin gi cho
knh bo hiu cuc gi tn ti (keepalive) c chuyn ti cc cng.
Cc bn tin Q.931 thng c s dng trong mng H.323:
Setup: c gi t thc th ch gi thit lp kt ni ti thc th H.323 b gi
Call Proceeding: ch th rng th tc thit lp cuc gi c khi to.
Alerting: ch th rng chung bn ch bt u rung.
Connect: thng bo rng bn b gi tr li cuc gi.
Release Complete: ch th rng cuc gi ang b gii phng.
Facility: y l mt bn tin Q.932 dng yu cu hoc phc p cc dch v b
sung. N cng c dng cnh bo rng mt cuc gi s c nh tuyn trc tip hay

thng qua GK.

2.2.1.4
2.2.1.4.1

Cc th tc bo hiu
Bo hiu v x l cuc gi

Cc bc bo hiu khi thc hin cuc gi qua Internet c trnh by trong khuyn
co H.323 ca UTU-T. C 3 knh bo hiu tn ti c lp nhau lin quan n bo hiu v
x l cuc gi: knh iu khin H.245, knh bo hiu cuc gi v knh bo hiu RAS.


19



Chng 2 Cc giao thc bo hiu trong mng VoIP



Trong mng khng c Gatekeeper, cc bn tin bo hiu cuc gi c truyn trc tip
gia thu bao ch gi v b gi bng cch truyn bo hiu a ch trc tip, v vy c th
giao tip mt cch trc tip.
Nu trong mng c Gatekeeper, trao i bo hiu thu bao ch gi v Gatekeeper
c thit lp bng cch s dng knh RAS ca Gatekeeper truyn a ch, sau khi trao
i bn tin trc tip gia hai u cui hay nh tuyn chng qua Gatekeeper.

2.2.1.4.2

Thit lp cuc gi H.323

Mt cuc gi tri qua cc bc nh sau:
- Thit lp cuc gi.
- Khi to truyn thng v trao i kh nng.
- Thit lp knh truyn thng nghe nhn.
- Dch v cuc gi.
- Kt thc cuc gi.
Giai on 1 - Thit lp cuc gi
Trong giai on ny cc phn t trao i vi nhau cc bn tin c nh ngha trong
khuyn co H.225.0 theo mt trong cc th tc c trnh by sau y.
- C hai thit b u cui u khng ng k vi Gatekeeper: Hai thit b u cui
trao i trc tip vi nhau.
- C hai thu bao u ng k ti mt Gatekeeper: C 2 tnh hung xy ra l
Gatekeeper chn phng thc truyn bo hiu trc tip gia 2 thu bao hoc bo hiu
cuc gi c nh tuyn qua Gatekeeper.
- Ch c mt trong 2 thu bao c ng k vi Gatekeeper: Bo hiu cuc gi c
truyn trc tip gia hai thu bao.
Khi cuc gi c s chuyn tip t mng PSTN sang mng LAN hoc ngc li th
phi thng qua Gateway. V c bn c th phn bit cuc gi qua Gateway thnh 2 loi:
cuc gi t mt thu bao in thoi vo mng LAN v cuc gi t mt thu bao trong
mng LAN ra mt thu bao trong mng thoi PSTN.
Giai on 2 - Thit lp knh iu khin

Trong giai on 1, sau khi trao i tn hiu thit lp cuc gi, cc u cui s thit lp
knh iu khin H.245. Knh iu khin ny c th do thu bao b gi hoc thu bao gi


20



Chng 2 Cc giao thc bo hiu trong mng VoIP



thit lp. Trong trng hp khng nhn c tn hiu kt ni hoc mt u cui gi tn
hiu kt thc th knh iu khin H.245 s b ng.
Giai on 3 - Thit lp knh truyn thng o
Sau khi trao i kh nng (tc nhn ti a, phng thc m ha) v xc nh
master-slaver trong giao tip trong giai on 2, th tc iu khin knh H.245 s thc
hin vic m knh logic (H.225) truyn thng tin. Sau khi m knh logic th mi u
cui truyn tn hiu xc nh thng s truyn.
Giai on 4 - Dch v
- rng bng tn: rng bng tng ca mt cuc gi c Gatekeeper thit
lp trong thi gian thit lp trao i. Mt u cui phi chc chn rng tng tt c lung
truyn/nhn m thanh v hnh nh u phi nm trong rng bng tn thit lp.
- Trng thi: gim st trng thi hot ng ca u cui, Gatekeeper lin tc
trao i tn hiu vi cc u cui do n kim sot. Khong thi gian u n gia cc ln
trao i ln hn 10 giy v gi tr ny do nh sn xut quyt nh.
Trong khong thi gian din ra cuc gi, mt u cui hoc Gatekeeper c th u
n hi trng thi t u cui bn kia bng cch gi tn hiu yu cu. u cui nhn c
tn hiu s p tr trng thi hin thi.
Giai on 5 - Kt thc cuc gi
Mt thit b u cui c th kt thc cuc gi theo cc bc ca th tc sau:
Dng truyn lung tn hiu video khi kt thc truyn mt nh, sau ng tt
c cc knh logic phc v truyn video.
Dng truyn d liu v ng tt c cc knh logic dng truyn d liu.
Dng truyn audio sau ng tt c cc knh logic dng truyn audio.
Truyn tn hiu trn knh iu khin H.245 bo cho thu bao u kia bit n
mun kt thc cuc gi. Sau n dng truyn cc bn tin H.245 v ng knh iu
khin H.245.
N s ch nhn tn hiu kt thc t thu bao u kia v s ng knh iu khin

H.245.
Nu knh bo hiu cuc gi ang m, th n s truyn i tn hiu ngt sau
ng knh bo hiu.



21





Chng 2 Cc giao thc bo hiu trong mng VoIP



N cng c th kt thc cuc gi theo cc th tc sau: Mt u cui nhn tn
hiu kt thc m trc n khng truyn i tn hiu yu cu, n s ln lt thc hin
cc bc t 1 n 6 trn ch b qua bc 5. Trong mt cuc gi khng c s tham gia
ca Gatekeeper th ch cn thc hin cc bc t 1 n 6. Nhng trong cuc gi c s
tham gia ca Gatekeeper th cn c hot ng gii phng bng tn. V vy sau khi thc
hin cc bc t 1 n 6, mi u cui s truyn tn hiu ti Gatekeeper. Sau
Gatekeeper s c tn hiu p tr. Sau u cui s khng gi tn hiu ti Gatekeeper
na v khi cuc gi kt thc.
Hnh v di y m t qu trnh thc hin kt ni gia 2 im u cui H323:





















Hnh 2.4 Qu trnh thit lp cuc gi H.323
Trc ht c hai phi c ng k ti thit b iu khin cng kt ni
u cui A gi yu cu ti thit b iu khin cng kt ni ngh thit lp
cuc gi.
Thit b iu khin cng ni gi cho u A thng tin cn thit v u cui B
u cui A gi bn tin SETUP ti u cui B.
u cui B tr li bng bn tin Call Proceeding v ng thi lin lc vi thit
b iu khin cng ni xc nhn quyn thit lp cuc gi.
u cui B gi bn tin cnh bo v kt ni.
Hai u cui trao i mt s bn tin H.245 xc nh ch t, kh nng x l
ca u cui v thit lp kt ni RTP.




22





Chng 2 Cc giao thc bo hiu trong mng VoIP



y l trng hp cuc gi im im n gin nht, khi m bo hiu cuc gi khng
c nh tuyn ti thit b iu khin cng ni. H.323 h tr nhiu kch bn thit lp
cuc gi khc
H.323 l h thng ghp lai c xy dng t cc thit b tp trung thng minh nh :
thit b iu khin cng ni, MCU, cng kt ni v im cui. Mc d chun H.323 trong
phin bn gn y nht c phn ton din hn song vn vn ny sinh, nh thi gian
thit lp cuc gi di, qu nhiu chc nng thit b iu khin cng ni phi thc hin v
kh nng m rng khi s dng kiu bo hiu cuc gi
nh tuyn qua thit b iu khin cng ni (GKRCS)
Khi cn s dng cng kt ni dung lng ln kt ni mng PSTN, ngi ta s s
dng giao thc cng n gin (SGCP : Simple Gateway Control Protocol) v giao thc
iu khin cng phng tin (MGCP: Media Gateway Control Protocol) thay th giao
thc cho cng kt ni H.323. Cc h thng iu khin cuc gi ny c v hiu qu hn,
p ng nhu cu ca cc nh cung cp c ln.

2.2.2

SIP
SIP l giao thc iu khin bo hiu thuc lp ng dng, c pht trin nh l mt
chun m RFC 2543 ca IEFT. Khc vi H.323, n da trn ngun gc Web (HTTP) v
c thit k kiu modul, n gin v d dng m rng vi cc ng dng thoi SIP. SIP l
mt giao thc bo hiu thit lp, duy tr v kt thc cc phin a phng tin nh :
thoi IP, hi ngh v cc ng dng tng t khc lin quan n vic truyn thng tin a
phng tin.

2.2.2.1

Cc thnh phn ca SIP















Hnh 2.5 Cc thnh phn ca SIP























23



Chng 2 Cc giao thc bo hiu trong mng VoIP



User Agent: L 1 ng dng khi to, nhn v kt thc cuc gi.
User Agent Clients (UAC) Khi to cuc gi.
User Agent Server (UAS) Nhn cuc gi.
C UAC v UAS u c th kt thc cuc gi.
Proxy Server: L 1 chng trnh tc thi hot ng va l client va l server.
Chng trnh ny c s dng to ra cc yu cu (requests) thay cho cc client. Mt
proxy server m bo chc nng nh tuyn v thc hin cc quy tc (policy) (v d nh
m bo ngi dng c c php gi hay khng). Proxy Server c th bin dch khi cn
thit, sa i 1 phn ca bn tin yu cu trc khi chuyn i.
Location Server: c s dng bi SIP redirect hoc proxy server ly thng
tin v a im ca ngi c gi.
Redirect Server: L server nhn cc yu cu SIP, sp xp cc a ch v tr a ch
v pha client. Khc vi Proxy Server, Redirect server khng t khi to ra cc yu cu
SIP ca ring n. ng thi n cng khng chp nhn hay hu cuc gi ging nh User

Agent Server.
Registrar Server: L server chp nhn cc yu cu REGISTER, server ny c th
h tr them tnh nng xc thc, ng thi hot ng vi proxy hoc redirect server a
ra cc dch v khc.
Trong hnh trn, User Agent l thit b u cui trong mng SIP, c th l mt my
in thoi SIP, c th l my in thoi SIP, c th l my tnh chy phn mm u cui

SIP.

2.2.2.2

Cc bn tin SIP, mo u v nh s
Di y l cc bn tin ca SIP :
INVITE : bt u thit lp cuc gi bng cch gi bn tin mi u cui khc

tham gia
ACK : bn tin ny khng nh my trm nhn c bn tin tr li bn tin

INVITE
BYE : bt u kt thc cuc gi
CANCEL : hy yu cu nm trong hng i





24





Chng 2 Cc giao thc bo hiu trong mng VoIP



REGISTER : u cui SIP s dng bn tin ny ng k vi my ch ng

k
OPTION : s dng xc nh nng lc ca my ch
INFO : s dng ti cc thng tin nh m bo DTMF
Giao thc SIP c nhiu im trng hp vi giao thc HTTP. Cc bn tin tr li cc
bn tin SIP nu trn gm c :

-

-

-

-

-

-
1xx (PROVISIONAL) cc bn tin chung
2xx (SUCCESS) thnh cng
3xx (REDIRECTION) - chuyn a ch
4xx (CLIENT ERORR) yu cu khng c p ng
5xx (SERVER ERORR) - s c ca my ch
6xx (GLOBAL FAILURE)- s c ton mng
Cc bn tin SIP c khun dng text, tng t nh HTTP. Mo u ca bn tin SIP
cng tng t nh HTTP v SIP cng h tr MIME (mt s chun v email)

2.2.2.3

Cc bc thit lp, duy tr v hu cuc gi
Thit lp v hy cuc gi SIP
Trc tin ta tm hiu hot ng ca my ch y quyn v my ch chuyn i
Hot ng ca my ch y quyn (Proxy Server)




















Hnh 2.6 Hot ng ca Proxy server
Hot ng ca Proxy server c trnh by nh trong hnh 2.6
Client SIP userA@yahoo.com gi bn tin INVITE cho userB@hotmail.com
mi tham gia cuc gi.

25





Chng 2 Cc giao thc bo hiu trong mng VoIP



Cc bc nh sau:
+ Bc 1: userA@yahoo.com gi bn tin INVITE cho UserB min hotmail.com,
bn tin ny n proxy server SIP ca min hotmail.com (Bn tin INVITE c th i t
Proxy server SIP ca min yahoo.com v c Proxy ny chuyn n Proxy server ca
min hotmail.com).
+ Bc 2: Proxy server ca min hotmail.com s tham kho server nh v
(Location server) quyt nh v tr hin ti ca UserB.
+ Bc 3: Server nh v tr li v tr hin ti ca UserB (gi s l

UserB@hotmail.com).
+ Bc 4: Proxy server gi bn tin INVITE ti userB@hotmail.com. Proxy server
thm a ch ca n trong mt trng ca bn tin INVITE.
+ Bc 5: UAS ca UserB p ng cho server Proxy vi bn tin 200 OK.
+ Bc 6: Proxy server gi p ng 200 OK tr v userA@yahoo.com.
+ Bc 7: userA@yahoo.com gi bn tin ACK cho UserB thng qua proxy server.
+ Bc 8: Proxy server chuyn bn tin ACK cho userB@hostmail.com
+ Bc 9: Sau khi c hai bn ng tham d cuc gi, mt knh RTP/RTCP c
gia hai im cui truyn tn hiu thoi.
+ Bc 10: Sau khi qu trnh truyn dn hon tt, phin lm vic b xa bng cch
s dng bn tin BYE v ACK gia hai im cui.
Hot ng ca my ch chuyn i a ch (Redirect Server)


















Hnh 2.7 Hot ng ca Redirect Server
Hot ng ca Redirect Server c trnh by nh hnh 2.7.



26





Chng 2 Cc giao thc bo hiu trong mng VoIP



Cc bc nh sau:
+ Bc 1: Redirect server nhn c yu cu INVITE t ngi gi (Yu cu ny c th i
t mt proxy server khc).
+ Bc 2: Redirect server truy vn server nh v a ch ca B.
+ Bc 3: Server nh v tr li a ch ca B cho Redirect server.
+ Bc 4: Redirect server tr li a ch ca B n ngi gi A. N khng pht yu cu
INVITE nh proxy server.
+ Bc 5: User Agent bn A gi li bn tin ACK n Redirect server xc nhn s trao
i thnh cng.
+ Bc 6: Ngi gi A gi yu cu INVITE trc tip n a ch c tr li bi Redirect
server (n B). Ngi b gi B p ng vi ch th thnh cng (200 OK), v ngi gi p
tr bn tin ACK xc nhn. Cuc gi c thit lp.
Ngoi ra SIP cn c cc m hnh hot ng lin mng vi SS7 (n PSTN) hoc l lin
mng vi chng giao thc H.323.
Tng qut li trong mng SIP qu trnh thit lp v hy mt phin kt ni:





























Hnh 2.8 Thit lp v hy cuc gi SIP





27



Chng 2 Cc giao thc bo hiu trong mng VoIP



ng k, khi to v xc nh v tr ngi s dng.
Xc nh bng thong cn thit c s dng.
Xc nh s sn sng ca pha c gi, pha c gi phi gi 1 bn tin phn hi
th hin s sn sng thc hin cuc gi: chp nhn hay t chi.
Cuc gi c thit lp.
Chnh sa cuc gi (v d nh chuyn cuc gi) v duy tr.
Kt thc cuc gi.

2.2.2.4

Tnh nng ca SIP
Giao thc SIP c thit k vi nhng ch tiu sau:
Tch hp vi cc giao thc c ca IETF
n gin v c kh nng m rng
H tr ti a s di ng ca u cui
D dng to tnh nng mi cho dch v

2.2.2.4.1

Tch hp vi cc giao thc c ca IETF

Cc giao thc khc ca IETF c th xy dng xy dng nhng ng dng SIP. SIP
c th hot ng cng vi nhu giao thc nh :
- RSVP(Resource Reservation Protocol): Giao thc ginh trc ti nguyn mng.
- RTP (Real-time transport Protocol): Giao thc truyn ti thi gian thc
- RTSP (Real Time Streaming Protocol): Giao thc to lung thi gian thc
- SAP(Session Advertisement Protocol):Giao thc thng bo trong phin kt ni
- SDP (Session Description Protocol): Giao thc m t phin kt ni a phng tin
- MIME (Multipurpose Internet Mail Extension - M rng th tn Internet a mc
ch) : Giao thc th in t
- HTTP (Hypertext Transfer Protocol): Giao thc truyn siu vn bn
- COPS (Common Open Policy Service): Dch v chnh sch m chung
- OSP (Open Settlement Protocol): Giao thc tha thun m

2.2.2.4.2

n gin v c kh nng m rng

SIP c rt t bn tin, khng c cc chc nng tha nhng SIP c th s dng thit
lp nhng phin kt ni phc tp nh hi ngh n gin, gn nh, da trn khun dng




28



Chng 2 Cc giao thc bo hiu trong mng VoIP



vn bn, SIP l giao thc ra i sau v khc phc c im yu ca nhiu giao thc
trc y.
Cc phn mm ca my ch y quyn, my ch ng k, my ch chuyn i a ch,
my ch nh v c th chy trn cc my ch khc nhau v vic ci t thm my ch
hon ton khng nh hng n cc my ch c. Chnh v th h thng chuyn mch
SIP c th d dng nng cp.

2.2.2.4.3

H tr ti a s di ng ca u cui

Do c my ch y quyn, my ch ng k v my ch chuyn i a ch h thng
lun nm c a im chnh xc ca thu bao. Th d thu bao vi a ch
ptit@vnpt.com.vn c th nhn c cuc gi thoi hay thng ip bt c a im no
qua bt c u cui no nh my tnh bn, my xch tay, in thoi SIP Vi SIP rt
nhiu dch v di ng mi c h tr.

2.2.2.4.4

D dng to tnh nng mi cho dch v v dch v mi.

L giao thc khi to phin trong mng chuyn mch gi SIP cho php to ra nhng
tnh nng mi hay dch v mi mt cch nhanh chng. Ngn ng x l cuc gi (Call
Processing Language) v Giao din cng kt ni chung (Common Gateway Interface) l
mt s cng c thc hin iu ny. SIP h tr cc dch v thoi nh ch cuc gi,
chuyn tip cuc gi, kha cuc gi (call waiting, call forwarding, call blocking), h
tr thng ip thng nht

2.2.2.5

So snh gia giao thc SIP v H.323
Gia H.323 v SIP c nhiu im tng ng. C hai u cho php iu khin, thit
lp v hu cuc gi. C H.323 v SIP u h tr tt c cc dch v cn thit, tuy nhin c
mt s im khc bit gia hai chun ny.
H.323 h tr hi ngh a phng tin rt phc tp. Hi ngh H.323 v nguyn tc
c th cho php cc thnh vin s dng nhng dch v nh bng thng bo, trao
i d liu, hoc hi ngh video.
SIP h tr SIP-CGI (SIP-Common Gateway Interface) v CPL (Call Processing
Language).
SIP h tr iu khin cuc gi t mt u cui th 3. Hin nay H.323 ang c
nng cp h tr chc nng ny.



29

SIP H.323
Ngun gc IETF ITU-T
Quan h mng Ngang cp Ngang cp
Khi im K tha cu trc HTTP. K tha Q.931, Q.SIG
u cui SIP H.323
Server
Proxy Server
Redirect Server
Location Server
Registrar Servers.
H.323 Gatekeeper
Khun dng Text, UTF-8 Nh phn
Tr thit lp
cuc gi
1.5 RTT 6-7 RTT hoc hn
Gim st trng
thi cuc gi
C 2 la chn:
- trong thi gian thit
lp cuc gi
- sut thi gian cuc gi
Phin bn 1 v 2: my ch phi gim st
trong
sut thi gian cuc gi v phi gi trng thi
kt ni TCP. iu ny hn ch
kh nng m rng v gim tin cy Bo hiu
qung b
C h tr Khng
Cht lng
dch v
S dng cc giao thc khc
nh RSVP, OPS, OSP
m bo cht lng dch v
Gatekeeper iu khin bng thng.
H.323 khuyn ngh dng RSVP
lu d ti nguyn mng.
Bo mt
ng k ti Registrar server,
c xc nhn u cui v m
ho
Ch ng k khi trong mng c
Gatekeeper, xc nhn v m ho theo
chun H.235.
nh v u cui
nh tuyn
cuc gi
Dng SIP URL nh a
ch. nh tuyn nh s dng
Redirect v Location server
nh v u cui s dng E.164 hoc tn
o H.323 v phng php nh x a ch
nu trong mng c Gatekeeper. Chc
nng nh tuyn do Gatekeeper m
nhim.
Tnh nng thoi
H tr cc tnh nng ca
cuc gi c bn
c thit k nhm h tr rt nhiu tnh
nng hi ngh, k c thoi, hnh nh v
d liu, qun l tp trung nn c th
gy tc nghn Gatekeeper
Kh nng
m rng
D dng Hn ch




Chng 2 Cc giao thc bo hiu trong mng VoIP









































































30



Chng 2 Cc giao thc bo hiu trong mng VoIP



2.2.3



Giao thc SGCP (Simple Gateway Control Protocol)
Giao thc ny cho php cc thnh phn iu khin cuc gi c th iu khin kt ni
gia trung k, cc thit b u cui vi cc gateway. Cc thnh phn iu khin c gi
l Call Agent. SGCP c s dng thit lp, duy tr v gii phng cc cuc gi qua
mng IP. Call Agent thc hin cc chc nng bo hiu cuc gi v gateway thc hin
chc nng truyn tn hiu m thanh. SGCP cung cp nm lnh iu khin chnh nh sau:
Notification Request: yu cu gateway pht cc tn hiu nhc t my v cc tn
hiu quay s DTMF.
Notify: gateway s dng lnh ny thng bo vi Call Agent v cc tn hiu
c pht hin trn.
Create Connection: Call Agent yu cu khi to kt ni gia cc u lin lc trong

gateway.
Modify Connection: Call Agent dng lnh ny thay i cc thng s v kt ni
thit lp. Lnh ny cng c th dng iu khin lung cho cc gi tin RTP i
t gateway ny sang gateway khc.
Delete Connection: Call Agent s dng lnh ny gii phng cc kt ni thit
lp.
Nm lnh trn y iu khin gateway v thng bo cho call agent v cc s kin xy ra.
Mi lnh hay yu cu bao gm cc thng s c th cn thit thc thi cc phin lm
vic.

2.2.4

Giao thc MGCP (Media Gateway Control Protocol)
Giao thc MGCP cho php iu khin cc gateway thng qua cc thnh phn iu
khin nm bn ngoi mng. MGCP s dng m hnh kt ni tng t nh SGCP da trn
cc kt ni c bn gia thit b u cui v gateway. Cc kt ni c th l kt ni im-
im hoc kt ni a im. Ngoi chc nng iu khin nh SGCP, MGCP cn cung cp
thm cc chc nng sau:
Endpoint Configuration: Call Agent dng lnh ny yu cu gateway xc nh
kiu m ho ph ng dy kt ni n thit b u cui.
AuditEndpoint v AuditConnection: Call Agent dng lnh ny kim tra trng
thi v s kt ni mt thit b u cui.



31



Chng 2 Cc giao thc bo hiu trong mng VoIP



RestartIn-Progress: Gateway dng lnh ny thng bo vi Call Agent khi no
cc thit b u cui ngng s dng dch v v khi no quay li s dng dch v.

2.2.5

Kt lun chng
Qua chng 2 ta tm hiu v cc giao thc bo hiu trong mng VoIP. V mt cc
giao thc bo hiu ta thy 2 giao thc bo hiu chnh l H.323 v SIP, ty vo yu cu c
th ca mng m ta la chn giao thc bo hiu cho thch hp. Chng 3 tip theo s gii
thiu tng qut v tng i Asterisk vi cc giao thc VoIP c Asterisk h tr.






















































32





Chng 3 Tng i ASTERISK





CHNG 3

TNG I ASTERISK



3.1



Gii thiu chng

Asterisk l h thng chuyn mch mm, l phn mm ngun m c vit bng ngn
ng C chy trn h iu hnh linux thc hin tt c cc tnh nng ca tng i PBX v
hn th na.Chng 3 trnh trnh by v khi nim v tng i IP-PBX, so snh IP-PBX
vi PBX truyn thng, gii thiu v tng i Asterisk, trnh by kin trc , tnh nng v
ng cnh ng dng ca tng i Asterisk, gii thiu cc giao thc ca VoIP ca tng i.

3.2

Tng i IP-PBX

Khi qut v tng i IP-PBX
ng dng ph bin nht v sm nht ca VoIP, nn tng to ra IP-PBX, l vic
thit lp gateway VoIP bn pha trung k ca PBX. Gateway ny ng gi lung thoi v
nh tuyn n qua mng VoIP. Gii php ny tn dng cc c tnh hin c ca tng i
PBX, nh thoi hi ngh, chuyn tip cuc gi,
Cui cng, cc nh pht trin phn mm pht trin ln PBX mm, hay IP-PBX. IP-
PBX cung cp kh nng chuyn mch, thc hin cc dch v gia tng qua mng d liu.
Cc cuc gi trong mt tng i v cc cuc gi gia cc tng i c nh tuyn qua
mng IP, i vng qua ton b mng PSTN. IP-PBX c th giao tip vi mng PSTN

thng qua Gateway.















Hnh 3.1 M hnh IP-PBX hay PBX mm





33
PBX truyn thng IP-PBX
PBX khng thc hin c mt
chc nng ca IP-PBX: Web,
Instant message, E-mail
sIP-PBX c y cc chc nng ca
mt PBX truyn thng (CTI,
VoiceMail, ACA v kt ni ISDN ra
PSTN).
PBX i hi phi c mt h
thng mng in thoi ni b.
Cho php thc hin lin lc ni b
qua mng LAN ngay c khi cha c
thng PBX.
PBX truyn tn hiu thoi trn
h thng ng in thoi ni b.
Nu mun truyn d liu, bt buc
phi c thm h thng mng LAN.
IP-PBX truyn d liu v thoi trn
cng mt ng dy.
H tr duy nht mt loi u cui
l in thoi tng t.
IP-PBX c kh nng h tr nhiu u
cui thoi khc nhau: in thoi tng
t, in thoi IP, my tnh c nhn...
Kh nng pht trin cc loi hnh
dch v gi tr gia tng km.
C thm nhiu dch v gi tr gia tng
khc; telephone, e-mail, fax, web
call back, web chat, instant messaging
Mi ng dy thoi ch c th Tn hiu trc khi chuyn n ng




Chng 3 Tng i ASTERISK



Cc u im so vi tng i PBX truyn thng:
Cc u im ca IP-PBX xut pht t nhng u im ca mng chuyn mch gi IP
so vi mng chuyn mch knh, nh:
- Qun l v bo dng d dng hn
- Kh nng kt ni t xa, kh nng di ng
- Kt hp thoi/d liu to ra ng dng mi
- D dng pht trin cc dch v mi do cu trc m v cc giao din chun
- D s dng do c h tr nhiu bi phn mm v giao din ho GUI
- Thng tin hp nht ...
So snh gia IP-PBX v PBX truyn thng:
Bng 3.1 So snh gia PBX truyn thng v IP-PBX














h





























34








thc hin c mt cuc gi ti
mt thi im, do khng tit
kim bng thng.
truyn c thng qua cc b nn
v gii nn, bng thng cho mi cuc
gi c th c nn xung cn
5,3 Kbits/s (chun nn thoiG.723.1),
thay v 64 Kbits/s ca thoi thng.
Do tnh cht tit kim bng thng nh
vy nn vi mt ng dy thoi
(CO line) c th thc hin c nhiu
cuc gi hn.
Kh m rng, nng cp v
bo dng
D dng m rng, nng cp v bo
dng.




Chng 3 Tng i ASTERISK






























Kh nng p dng trong cc doanh nghip va v nh
C th n gin ho qu trnh trin khai tng i IP-PBX cho mt doanh nghip nh

sau:
Xy dng mng LAN
Thit lp h thng my ch v ci t phn mm iu khin IP-PBX
Thit lp cc Gateway ra mng PSTN hoc Internet
Thit lp cc u cui VoIP
Bc th nht l phc tp nht v i hi u t ln nht nhng thc ra li n gin
nht v a s cc doanh nghip c sn mng LAN. Bc th 2 quan trong nht, nhng
thc ra cng ch n gin l ci t phn mm ln mt my ch. My ch ny c th l
ginh ring cho IP-PBX hoc cng c th c chia x vi cc ng dng khc ca doanh
nghip. Bc th 3 i hi phi mua thit b chuyn dng kt ni vi mng PSTN.
Gateway kt ni IP/PSTN thng l card PCI cm trong my ch cng vi phn mm
iu khin chuyn dng.
Cc u cui VoIP trong bc 4 c th l phn mm chy ngay trn my PC (nh
Windows Messenger) hay l mt thit b chy c lp (nh IPPhone ca Cisco).






35







Chng 3 Tng i ASTERISK



3.2.1



Mt s m hnh cuc gi s dng tng i IP-PBX
Cuc gi ni b
Cuc gi gia hai u cui SIP do IP-PBX qun l





















Hnh 3.2 M hnh cuc gi ni b
Cuc gi t my thuc IP-PBX ra mng PSTN
u tin u cui SIP s bm s chim trung k ra PSTN, ri bm s thu bao ca

PSTN























Hnh 3.3 M hnh cuc gi t my IP ra mng PSTN
Cuc gi t PSTN vo my IP- PBX
Thu bao PSTN gi vo mt trung k ca IP-PBX , ri bm s my l tng ng vi
u cui SIP



36







Chng 3 Tng i ASTERISK





















Hnh 3.4 M hnh cuc gi t PSTN vo my IP-PBX
Cuc gi t ngoi mng Internet s dng dch v SIP cng cng
























Hnh 3.5 M hnh cuc gi s dng dch v SIP cng cng

3.3

Tng i Asterisk

Asterisk l phn mm ngun m, c vit bng ngn ng C, ra i nm 1999 bi
Mark Spencer, u tin c thit k v trin khai trn GNU/Linux nn x86 (ca Intel).
Nhng hin nay Asterisk c th chy trn cc h iu hnh khc nh: Mac OS X,

FreeBSD, OpenBSD v Microsoft Windowns.
Asterisk c xem nh l mt tng i PBX (Private Branch eXchange) v c thm
nhiu tnh nng mi. Ngoi nhng tnh nng ca mt tng i PBX thng thng,
Asterisk cn c tch hp c chuyn mch TDM v chuyn mch VoIP, c kh nng m


37





Chng 3 Tng i ASTERISK



rng p ng nhu cu cho tng ng dung nh m rng giao tip vi mng PSTN (Public

Switched Telephone Network).
Vi mt my tnh r tin ci h iu hnh (mt trong cc h iu hnh ni trn,
y ta thin v h iu hnh Microsoft Windowns) v c thm phn mm Asterisk cu
hnh, khi my tnh ny s c y tnh nng ca mt tng i in thoi v c th
hn th.
Asterisk l mt phn mm ngun m, min ph, c tin cy cao nn c xem l
phn mm mang tnh cch mng.
Bi nhng tin ch: h thng v gi cc r, d s dng, y cc tnh nng ca mt
tng i v con hn th nn c nhiu h thng Asterisk c ci t thnh cng trn
th gii. Hin nay h thng Asterisk ang c pht trin mnh, nhiu doanh nghip,
cng ty v ang trin khai h thng to lin lc bn trong v ra c mng ngoi thng
qua mng my tnh, gi in thoi.




























Hnh 3.6 S giao tip tng qut.
T hnh 3.6 ta thy Asterisk khng ch giao tip, kt ni gia cc in thoi vi nhau
m cn c th m rng kt ni n cc tng i khc, vi IP Phone v nhiu dch v nh:
Softswitch, Media Gateway, Voicemail Services, Conference Server, Music on hold




38





Chng 3 Tng i ASTERISK



3.3.1



Kin trc h thng Asterisk























Hnh 3.7 S khi ca Asterisk
V c bn kin trc ca Asterisk l s kt hp gia nn tng cng ngh in thoi v
ng dng in thoi cho VOIP nh SIP, H323, IAX, MGCP... cc cng ngh in thoi
cho h thng chuyn mch mch TDM nh T1, E1, ISDN v cc giao tip ng truyn
thoi Analog.
- Khi khi ng h thng Asterisk th chc nng Dynamic Module Loader thc hin
np driver ca thit b, np cc knh giao tip, cc format, codec v cc ng dng lin
quan, ng thi cc hm API cng c lin kt np vo h thng.
- Sau h thng PBX Switching Core ca Asterisk chuyn sang trng thi sn sng
hot ng chuyn mch cuc gi, cc cuc gi c chuyn mch tu vo k hoch quay
s (Dialplan) c thc hin cu hnh trong file extension.conf.
- Application Launchar rung chung thu bao, quay s, nh hng cuc gi, kt
ni vi hp th thoi
- Scheduler and I/O Manager m nhim cc ng dng nng cao.
- Codec Translator xc nhn cc knh nn d liu ng vi cc chun khc nhau c th
kt hp lin lc c vi nhau.
H thng cng bao gm 4 chc nng API chnh:
Codec translator API: cc hm thc thi, gii nn cc chun nh G711, G729
Asterisk Channel API : Giao tip vi cc knh lin lc khc nhau.



39



Chng 3 Tng i ASTERISK



Asterisk file format API : x l cc loi file c nh dng nh Mp3, wav, gsm
Asterisk Aplication API : Bao gm tt c cc ng dng c thc thi trong h
thng Asterisk nh voicemail, callerID

3.3.2
3.3.2.1

Mt s tnh nng c bn
Voicemail
Hp th thoi vi tnh nng cho php h thng nhn cc thng ip tin nhn thoi, mi
my in thoi c khai bo trong h thng Asterisk cho php khai bo thm chc nng
hp th thoi. Khi s in thoi b gi bn hay ngoi vng ph sng th h thng asterisk
nh hng trc tip cuc gi n hp th thoi tng ng khai bo trc.
Voicemail cung cp cho ngi s dng nhiu tnh nng nh: xc nhn password khi
truy cp vo hp th thoi, gi mail bo khi c thng ip mi.

3.3.2.2

Call Forwarding
Call Forwarding: chuyn hng cuc gi.
y l tnh nng thng c s dng trong h thng Asterisk. Chc nng cho php
chuyn mt cuc gi n mt hay nhiu s my in thoi c nh trc.
Mt s trng hp cn chuyn cuc gi nh : Chuyn cuc gi khi bn, chuyn
cuc gi khi khng tr li, chuyn cuc gi tc thi, chuyn cuc gi vi thi gian nh
trc.

3.3.2.3

Caller ID
Caller ID: cuc gi c hin th s.
Vi chc nng ny th s in thoi ca ngi gi n my in thoi ca bn s c
hin th, nhm gip bn c th bit c ai ang gi ti.
Ngoi ra Caller ID cng cho php chng ta xc nhn s thu bao gi n c ngha l
da vo caller ID chng ta c tip nhn hay khng tip nhn cuc gi t pha h thng
Asterisk. Ngn mt s cuc gi ngoi mun.

3.3.2.4

Interactive Voice Response
Interactive Voice Response (IVR) hay Automated Attendant (AA): u c dng
ch chc nng tng tc thoi (tng i tr li t ng).
Chc nng tng tc thoi c rt nhiu ng dng trong thc t, khi gi in thoi n
mt c quan hay x nghip thu bao thng c nghe thng ip nh:Xin cho
mng bn gi n cng ty chng XXX hy nhn phm 1 gp phng kinh doanh,

40



Chng 3 Tng i ASTERISK



phm 2 gp phng k thut, phm 3 gp phng h tr khch hng sau tu vo s
tng tc ca thu bao gi n, h thng Asteisk s nh hng cuc gi theo mong mun.
Dch v xem im thi, tin cc in thoi ca thu bao, t gi t i n t hin nay nh
th no, hay kt qu s s, bn tin d bo thi tit tt cc nhng mong mun trn u
c th thc hin qua chc nng tng tc thoi.

3.3.2.5

Time and Date
Nhm ch nh cc khong thi gian c th cuc gi s nh hng n mt s in
thoi hay mt chc nng c th khc, v d trong cng ty gim c mun ch cho php
nhn vin s dng my in thoi trong gi hnh chnh cn ngoi gi th s hn ch hay
khng cho php gi ra bn ngoi.

3.3.2.6

Call Parking
Chc nng Call Parking cng thc hin vic chuyn cuc gi nhng c qun l. C mt s
in thoi trung gian v hai thu bao c th gp nhau khi thu bao c gi nhn vo s
in thoi m thu bao ch gi ang ch trn v t y c th gp nhau v m thoi.

3.3.2.7

Remote call pickupe
Vi tnh nng ny s cho php chng ta t my in thoi ny c th nhn cuc gi t
my in thoi khc ang rung chung.

3.3.2.8

Privacy Manager
Khi mt ngi ch doanh nghip trin khai Asterisk cho h thng in thoi ca cng
ty mnh nhng li khng mun nhn vin trong cng ty gi i ra ngoi tr chuyn vi bn
b, khi Asterisk cung cp mt tnh nng tin dng l ch cho php s in thoi c
lp trnh c php gi n nhng s my c nh no thi, cn nhng s khng c
trong danh sch nh sn s khng thc hin cuc gi c.

3.3.2.9

Backlist
Backlist cng ging nh Privacy Manager nhng c mt s khc bit l nhng my in
thoi nm trong danh sch s khng gi c n my ca mnh (s dng trong tnh trng
hay b quy ri in thoi).
V cn rt nhiu tnh nng na m h thng asterisk c th cung cp cho ngi s dng,
trn y ch l mt s tnh nng thng c s dng.






41







Chng 3 Tng i ASTERISK



3.3.3



Ng cnh ng dng
Asterisk thc hin rt nhiu ng cnh ng dng khc nhau tu vo nhu cu s dng,
di dy s g i i t h i u m t s ng cnh ng dng thng c s dng trong thc
t v c trin khai trn h thng asterisk.

3.3.3.1

Tng i VoIP IP PBX


















Hnh 3.8 IP BPX
y l h thng chuyn mch VoIP c xy dng phc v cc cng ty c nhu cu thc
hin trn nn tng mng ni b trin khai. Thay v lp t mt h thng PBX cho nhu
cu lin lc ni b th nn lp t h thng VoIP, v m hnh ny chi ph phi tr s c
gim ng k. H thng lin lc vi mng PSTN qua giao tip TDM.

3.3.3.2

Kt ni IP PBX vi PBX



















Hnh 3.9 Kt ni IP PBX vi PBX
Ng cnh t ra l hin ti Cng ty trang b h thng PBX by gi cn trang b
thm p ng nhu cu lin lc trong cng ty sao cho vi chi ph thp nht, gii php


42







Chng 3 Tng i ASTERISK



thc hin l trang b h thng Asterisk v kt ni vi h thng PBX ang tn ti qua
lung E1. Ngoi ra tng kh nng lin lc vi mng PSTN v VoIP khc, Cng Ty s
ng k kt ni dch v vi nh cung cp dch v VoIP.

3.3.3.3

Kt ni gia cc server Asterisk





















Hnh 3.10 Kt ni gia cc server asterisk
Phng php trn ng dng rt hiu qu cho cc cng ty nm ri rc cc v tr a l
khc nhau nhm gim chi ph ng di. V d Cng ty M c tr s t ti nc M v
c cc Chi nhnh t ti Vit Nam vi hai a im l H Ni v thnh ph H Ch Minh.
Thng qua mng WAN ca Cng Ty cc cuc gi ni b gia cc v tr khc nhau s lm
gim chi ph ng k.

3.3.3.4

Cc ng dng IVR, VoiceMail, Conference Call
















Hnh 3.11 Trin khai server IVR, VoiceMail, Conference Call
ng dng thc hin cc server kt ni vi h thng PSTN hay tng i PBX trin
khai cc ng dng nh tng tc thoi IVR. Mt v d cho ng dng tng tc thoi l


43





Chng 3 Tng i ASTERISK



cho bit kt qu s s, kim tra cc cuc, dch v gii tr tra cu thng tin thng qua
s 19001260. ng dng VoiceMail thu nhn nhng tin nhn thoi t pha thu bao
ging nh chc nng hp th thoi ca Bu in trin khai.
Chc nng cu c g i hi ngh c thit lp cho nhiu my in thoi cng ni
chuyn vi nhau.

3.3.3.5

Chc nng phn phi cuc gi t ng ACD

















Hnh 3.12 Phn phi cuc gi vi hng i
ACD (Automatic Call Distribution): Phn phi cuc gi t ng.
Chc nng c ng dng cho nhu cu chm sc khch hng hay nhn phn hi t

pha khch hng.
Gi s mt Cng ty h thng in thoi c kh nng tip nhn cng mt lc 10 cuc
gi, nh th nu c thm cuc gi th 11 gi n th h thng gii quyt nh th no?
Bnh thng th s nghe tn hiu bn nhng vi chc nng phn phi cuc gi s a
thu bao vo hng i ch tr li, trong khi ch tr li cuc gi thu bao c th
nghe nhng bi ht hay do asterisk cung cp v khi no mt trong mi s in thoi ang
gi tr v trng thi ri th cuc gi ang ch s c tr li. Ging nh chc nng ca
dch v: dch v h tr thng tin 1080, dch v hn gi 116 ca Bu in, dch v h
tr khch hng ca cc tng i in thoi.

3.4

3.4.1
3.4.1.1

Asterisk vi VoIP

Cc thit b dng trong VoIP
VoIP phone
L thit b phn cng kt ni vi VoIP ging nh my in thoi c nh thng
thng. Tuy nhin s dng cho VoIP cn phi cu hnh trc khi s dng.


44







Chng 3 Tng i ASTERISK



Mt s tnh nng khi thc hin mua thit b in thoi VoIP:
+ Low Bandwidth: h tr cho loi Codec no, thng hin nay ngi ta s dng G729.
+ Web Interface: phi c giao tip thit lp cu hnh thn thin d s dng.

+ Audio Interface: c speaker phone hay khng.



















3.4.1.2



















Softphone
L mt phn mm c ci trn my tnh, thc hin tt c cc chc nng ging nh
thit b in thoi VoIP. Khi s dng softphone, giao tip my tnh phi c card m
thanh, headphone v firewall khng b kha.
i vi h thng Asterisk, nn dng softphone vi cng ngh giao thc mi dnh cho

Asterisk l IAX.



















3.4.1.3



















Card giao tip vi PSTN
Mun cho php cc my in thoi ni b trong h thng Asterisk kt ni v thc hin
cuc gi vi mng PSTN, chng ta cn phi c thit b phn cng tng thch. Thit b





45







Chng 3 Tng i ASTERISK



phn cng s dng cho h thng Asterisk do chnh tc gi lp cng ty Digium phn phi,
xut pht t tng phn phi phn mm Asterisk v h thng ngun m min ph.
Thit b phn cng thng k hiu bt u bng cm t TDMxyB trong x l s
lng port FXS, y l s lng port FXO. Gi tr ti a ca c x v y l 4.















Hnh Card TDM22B gm 4 port 2 FXS v 2 FXO

3.4.1.4

ATA (Analog Telephone Adaptors)
ATA l thit b kt ni vi in thoi Analog thng thng n mng VoIP, mt thit
b ATA gm c hai loi port: RJ-11 kt ni vi my analog thng thng v RJ-45
kt ni vi mng VoIP.
ATA l thit b FXS chuyn i tn hiu Analog sang tn hiu s s dng cho mng
VoIP tn dng thit b Analog cho kt ni VoIP.
Thit b ATA s dng vi giao thc IAX c Digium phn phi l thit b ATA c
s dng rng ri vi Asterisk c tn gi l IAXy.
















3.4.2
















Cc giao thc VoIP c Asterisk h tr
Asterisk h tr hai giao thc chun v mt giao thc dnh ring cho Asterisk.






46



Chng 3 Tng i ASTERISK



3.4.2.1



IAX ( Inter-Asterisk eXchange)
IAX l giao thc chun dnh ring cho Asterisk. N cung cp hot ng lin kt trong
sut vi tng la NAT v PAT. N h tr vic thit lp, nhn, chuyn cuc gi v ng
k cuc gi. Vi IAX, cc in thoi hon ton c ng. Ch cn kt ni in thoi vi
Asterisk server bt c u trn mng Internet, chng s ng k vi PBX ch v c
nh tuyn cuc gi ngay tc th.
IAX c on mo u rt nh. Vi bn byte ca mo u, so snh vi 12 byte mo
u ca SIP hay H.323, bn tin IAX c th ni l nh hn rt nhiu.
IAX h tr xc thc i vi cc cuc gi n v i. Asterisk cung cp nm phng thc
iu khin truy nhp. Ta c th gii hn truy cp vo tng phn ca dial plan.

3.4.2.2

SIP (Session Initiation Protocol)
SIP l chun ca IETF dnh cho VoIP. Giao thc ny c m t chi tit phn
trn. Cu trc iu khin ca SIP bao gm c SMTP, HTTP, FTP v cc chun khc ca
IETF. SIP chy trn nn TCP/IP v iu khin cc phin RTP (Real Time Protocol). RTP
truyn d liu vi mi phin ca VoIP. SIP l mt chun thit yu ca VoIP bi v tnh
n gin ca n khi so snh vi cc giao thc khc nh H.323. Giao thc SIP trong
Asterisk h tr tt vic giao tip gia cc thit b ca cc nh cung cp khc nhau, trong
c c SNOM v Cisco.

3.4.2.3

H.323
H.323 l chun ITU dnh cho VoIP. Trong khi H.323 vn c s dng trong Asterisk
th ngy nay n cng ngy cng t c s dng. N ang dn c thay th bng cc
chun hin i hn nh SIP v IAX.

3.4.3

Cc chun nn v nh dng file
Mt b nn v gii nn (codec: compressor/decompressor) c s dng nn tn
hiu thoi tng t thnh lung d liu s hay gii nn d liu thnh tn hiu tng t.
Asterisk c th hot ng vi nhiu nh dng file v chun nn khc nhau. Bi v n l
mt phn mm vi cu trc m nn n d dng hot ng vi cc nh dng file v codec

thm vo.
C hai chun nn PCM 64kbps ph bin, lut A v lut u. C hai iu s dng nn
logarit t c 12 n 13 bit cho vic nn tuyn tnh 8 bit. Nn logarit lm gim cc
tn s cao hay m lng ln. Lut A tt hn trong vic nn tn hiu mc thp v c t s

47
Chun nn Tc
16 bit tuyn tnh 128 kbps
G.711u (lut u) 64 kbps
G.711a (lut A) 64 kbps
IMA-ADPCM 32 kbps
GSM 6.10 12 kbps
MP3 bin i
LPC-10 2.4 kbps

nh dng M t
Raw d liu 16 bit tuyn tnh
Pcm d liu 8 bit lut u
Vox d liu 4 bit IMA-ADPCM
Wav file WAV tuyn tnh 16 bit 8 KHz
WAV file WAV nn GSM 8 KHz
Gsm d liu nn GSM
g723 nh dng g723 n gin vi nhn thi gian




Chng 3 Tng i ASTERISK



nn tn hiu trn nhiu tt hn. Lut u thng c s dng Bc M, cn lut A thng
c s dng chu u.
Asterisk cung cp vic chuyn i hon ho gia cc chun nn vi nhau.
Cc chun nn gm c:



















Hnh 3.13 Cc chun nn
Thm vo , cc chun nn khc nh G.723.1 v G.729 c th i qua mt cch trong
sut. Thng thng, ngi ta s dng b nn v gii nn lut A, lut u hay tuyn tnh cho
bng DTMF. Hu ht cc chun nn c mt mt d liu tng i ln khi truyn fax.
Cc nh dng file
Asterisk s dng nhiu file khc nhau lu tr d liu m thanh bao gm voicemail
v music on hold. Asterisk h tr nhiu nh dng file v file m thanh khc nhau.
Cc nh dng c h tr bao gm:



















Hnh 3.14 Cc nh dng file




48

Th mc M t
/etc/asterisk Tt c cc file cu hnh tr /etc/zaptel.conf
/usr/sbin Cc on m v file thc thi ca Asterisk bao
gm asterisk, astman, astgenkey v safe_asterisk
/usr/lib/asterisk Cc i tng nh phn ring ca cu trc Asterisk
/usr/lib/asterisk Cc module thi gian thc cho cc ng dng,
iu khin knh, b nn v gii nn, nh dng file,...
/usr/include/asterisk Cc file mo u cn thit cho xy dng cc ng
dng ca Asterisk, iu khin knh v cc
module hot ng.
/var/lib/asterisk Cha bin c s dng bi Asterisk trong
sut hot ng bnh thng
/var/lib/asterisk/agi-bin Cc on m AGI dng bi ng dng dial plan AGI
/var/lib/asterisk/astdb C s d liu ca Asterisk, lu tr cc thng tin
cu hnh. File ny khng bao gi thay i bi
ngi s dng c, m ch c th thay i bng
cu lnh c s d liu ca Asterisk: thm vo v
chnh sa file ny
/var/lib/asterisk/images Cc hnh c tham chiu bi cc ng dng hay
bi dial plan
/var/lib/asterisk/keys Cc kho chung hoc ring c s dng
trong Asterisk cho xc thc RSA. IAX s dng
nhng cha kho c lu tr y.
/var/lib/asterisk/mohmp3 Cc file MP3 c s dng cho chc nng music
on hold. Cu hnh cho music on hold c cha
trong th mc ny.
/var/lib/asterisk/sounds Cha cc file m thanh, cnh bo,... c s dng




Chng 3 Tng i ASTERISK



H thng qun l file ca Asterisk




































































49
bi cc ng dng ca Asterisk. Mt vi ng dng
th lu tr cc file ring ca mnh trong cc th
mc con
/var/run Cc file PID v tn chng trnh chy thi gian thc
/var/run/asterisk.pid Primary Process Identifier (PID) ca cc ng
dng Asterisk ang thc thi
/var/run/asterisk/ctl H thng tn c s dng bi Asterisk cho
php iu khin t xa.
/var/spool/asterisk Cc file chy thi gian thc cho voicemail, cc
cuc gi ra ngoi,...
/var/spool/asterisk/outgoing Asterisk iu khin th mc ny cho cc cuc gi
ngoi. Mt cuc gi ra ngoi s lu kt qu vo
mt file trong th mc ny. Asterisk phn tch
file c to ra v thit lp cuc gi.Nu nh cuc
gi c tr li, n s chuyn ti Asterisk PBX.
/usr/spool/asterisk/qcall c s dng phn khng ng dng qcall.
Khng c s dng.
/var/spool/asterisk/vm Hp th thoi, thng bo v cc th mc




Chng 3 Tng i ASTERISK



c





















ra


















Bng 3.2 H thng qun l file trong Asterisk

3.4.4
3.4.4.1

File cu hnh
Gii thiu
S linh ng ca Asterisk c iu khin thng qua cc file cu hnh c cha trong
th mc /etc/asterisk ngai tr file zaptel.conf cu hnh cho phn cng TDM nm ti th
mc /etc. nh dng ca cc file cu hnh trong Asterisk tng t vi dng file .ini (trong
Window). File ny nh dng theo m ASCII c chia ra thnh nhiu phn (sections).
Cc ni dung sau du chm phy l ch thch trong file cu hnh. Cc dng trng,
khong trng khng c ngha trong file cu hnh. Cc php gn c s dng: = dng
gn cc bin, => gn cc i tng





50



Chng 3 Tng i ASTERISK






; The first non-comment line in a config file

; must be a section title

;

[section1]

keyword = value ; Variable assignment

[section2]

keyword = value

object => value ; Object declaration

3.4.4.2

Cc kiu ca file cu hnh
Mc d cc file cu hnh ca Asterisk c nh dng ging nhau, nhng chng c
phn ra lm 3 kiu c bn thng c s dng.

3.4.4.2.1

Simple Group

Simple Group l dng n gin nht c s dng bi cc file cu hnh m mi i
tng ch c ngha trn dng .
V d:

[mysection]

object1 => option1a,option2a,option3a

object2=> option1b,option2b,option3b



Tng ng vi object1 l cc i tng option1a, option2a, option3a. Cn object2
c gn cho cc i tng option1b, option2b, option3a.
Cu hnh ny thng c s dng trong cc file: extensions.conf, meetme.conf,
voicemail.conf

3.4.4.2.2

Inherited option object:

Kiu cu hnh ny thng c s dng bi cc file: zapata.conf, phone.conf,
mgcp.conf . Trong kiu cu hnh ny, cc dng pha di tha k cc thng s ca cc

dng trn n.





51



Chng 3 Tng i ASTERISK



V d:

[mysection]

option1 = foo

option2 = bar

object => 1

option1 = baz

object => 2



Hai dng u tin gn hai gi tr foo, bar cho option1, option2. i tng 1 c to
ra bi hai thng s l option1=foo v option2=bar. Khi option1 c thay i thnh baz
th i tng 2 c to thnh t hai thng s l option1=baz v option2=bar.
Nh vy thay i gi tr option1 sau khi i tng 1 c gn ch nh hng n
i tng 2 m khng nh hng n i tng 1.

3.4.4.2.3

Complex entity object:

Kiu cu hnh ny s dng bi cc file: iax.conf, sip.conf, c t chc thnh nhiu
thc th (entity), ng vi mi entity c nhiu thng s c khai bo, mi entity l cc
section khai bo.
V d:

[myentity1]

option1=value1

option2=value2

[myentity2]

option1=value3

option2=value4



Entity myentity1 c cc gi tr value1, value2 cho cc thng s option1, option2. Trong
khi entity myentity2 cng c cc thng s l option1, option2 nhng vi cc gi tr l

value3, value4.






52



Chng 3 Tng i ASTERISK



3.4.4.3



Channel interfaces:

Phn ny gii thiu cc file cu hnh cho cc Asterisk channel drivers.
Asterick c th c cu hnh vi nhiu mc ch khc nhau, nhng m hnh thng
thng nht l Client/Server. M hnh ny cho php cc client hay cn gi l UAC
user agent client kt ni vo server l Asterisk hay cn gi l UAS User Agent Server.
Cc UAC l ni sinh ra cc session trong khi UAS th x l th ng cc session nhn
c da trn tp hp rule c sn. Phn IV s i r hn v cc dng ng dng ny.
Ta c th cu hnh Asterisk trong console mode, hoc c mt cch tin li hn l edit
trc tip cc file cu hnh trong /etc/asterisk. Mi ng dng ring ca Asterisk nh
voicemail, zaptel, music-on-hold, meetme, conference, iax u c configuration ring
ca mnh, tuy nhin c 2 file cu hnh quan trng nht l sip.conf v extension.conf:
- Sip.conf : file cu hnh v cc thng tin ca cc UAC nh username, password, IP,
type, security, codec, l thnh phn cn bn nht lu gi thng tin trong Asterisk.
- Extension.conf: file cu hnh v cc lut nh tuyn cuc gi, lut quay s, cc
extension trong ngoi v nhng tnh nng c bit khc. Extensions.conf l file quan
trng nht trong bt k cu hnh Asterisk no.
Cc file cu hnh khc
- Voicemail.conf: file cu hnh cho h thng voice-mail ca asterisk. Asterisk c th
dng lnh Sendmail trn CentOS gi mail n cho cc a ch c lu trong file cu

hnh ny.
- Zaptel.conf: File ny nm ngoi /etc, l file cha thng s index, driver dnh cho
Linux khi kch hot cc thit b Telephony cm trc tip vo Asterisk thng qua cng PCI
- Zapata.conf: Cng thuc module zaptel, nhng l file kt ni cc thit b
Telephony c khai bo vo h thng chnh ca Asterisk
- Iax(2).conf: Cc thng s v IAX (inter-asterisk protocol) dng khi kt ni 2
asterisk box vi nhau
- MeetMe.conf: Mt chc nng to room conference cn bn.

3.4.5

Dialplan trong Asterisk
Dialplan l tri tim tht s ca bt k h thng Asterisk no, n nh ngh Asterisk x
l cc cuc gi n v i nh th no. Mt cch ngn gn, n cha danh sch cc lnh


53



Chng 3 Tng i ASTERISK



hoc cc bc m Asterisk s theo. Khng ging nh h thng in thoi truyn thng,
dialplan ca Asterisk c th ty bin hon ton. hiu v ci t h thng Asterisk
thnh cng, iu thit yu nht l phi hiu c dialplan. Trong phn ny, ta s tng
bc xy dng nn mt dialplan n gin v dn dn pht trin n.

3.4.5.1

Dialplan Syntax
Dialplan ca Asterisk ch c c t trong file cu hnh extensions.conf. Dialplan
c to thnh t 4 phn chnh: contex, extensions, priorities v application. Cc thnh
phn ny lm vic vi nhau to nn mt dialplan.

3.4.5.1.1

Contexts

Dialplan c chia thnh cc phn gi l context. Context tch bit cc nhm thu bao.
N gi cho cc thnh phn khc nhau khng tc ng ln nhau, mi extension c nh
ngha trong 1 context hon ton tch bit vi bt k extension no trong context khc, tr
khi vic tng tc gia chng c c bit cho php.
Ly mt v d n gin d hiu, gi s 2 cng ty cng chia s mt Asterisk Server.
Khi t menu voice ca mi cng ty trong context ca chnh cng ty , khi s c s
cch bit r rng gia chng vi nhau, khi c hai cng gi extension 0 th chuyn gi ny
s l c lp gia 2 cng ty, khng c mt s lin h no y.
Context c ch nh bng cch t tn ca context vo trong du ngoc vung.
Tn ca context c th l k t t a z, 0 9, - v _. V d:[outcommingcall]
Tt c cc ch dn t sau l cc phn ca context cho ti khi context tip theo
c nh ngha. Trong phn u ca dialplan , c 2 context c bit l [general] v

[globals].
Mt trong nhng cng dng quan trng ca context l thc thi bo mt. Bng cch s
dng context chnh xc, c th gip cho caller A c th truy cp vo cc dch v, c tnh
m cc caller khc khng c. Nu h thng khng c xy dng mt cch cn thn, n
c th b gian ln, s dng lu bi ngi khc. iu ny l c bit nghim trng.
H thng Asterisk cha file SECURITY rt quan trng, n pht tho cc bc thc
hin gip cho h thng chng ta c an ton. T chi cc cnh bo ny c th gip
cho nhiu ngi c th truy cp v gi cc cuc gi ng di, m chi ph l chng ta
phi chu.


54



Chng 3 Tng i ASTERISK



3.4.5.1.2



Extension

Chng ta cn xc nh, nh ngha mt hoc nhiu extension. Mt extension l mt
lnh m Asterisk phi theo, n c kch bi mt cuc gi n hay l mt phm c
nhn trn knh. Extension c t vic x l cuc gi khi n i xuyn qua dialplan.
C php cho extension nh sau:

exten => name,priority,application( )
V d:

exten => 123,1,Answer()
Theo sau l tn ca extension. Trong h thng in thoi, extension nh l mt s dng
gi. Trong Asterisk, extension c to thnh t s tng hp ca cc s v cc k t.
y l c im gip cho Asterisk hot ng mt cch mnh m v linh hot bi hu ht
cc giao thc VoIP u h tr vic s dng tn, a ch email thay v s dng s.

3.4.5.1.3

Priorities

Mi extension c nhiu bc khc nhau, gi l Priorites ( u tin). Cc u tin ny
c nh s tun t. Mi u tin thc thi mt ng dng c th.
V d:

exten => 123,1,Answer( )

exten => 123,2,Hangup( )



Trong v d trn, u tin user tr li in thoi ( u tin 1), v sau gc my
( u tin 2). Cc u tin ny phi c t mt cch tun t, khng c ngt qung
gia chng v khi th, Asterisk s b qua cc thao tc pha sau.
Unnumbered Priorities: Trong phin bn Asterisk mi, c th dng n thay cho s th
t ch u tin k tip. Cch lm ny rt thun tin, ngi vit khng cn phi nh s
th t.

3.4.5.1.4

Applications

Application (ng dng) gnh vc hu nh ton b cng vic ca dialplan. Mi ng
dng thc hin mt hnh ng c th trn knh ang hot ng, nh: nghe my, gc my,
chi nhc, chp nhn dial tone.



55



Chng 3 Tng i ASTERISK



Trong vi ng dung, nh answer(), hangup(), khng cn cc lnh khc thc hin.
Tuy nhin, trong vi ng dng li cn them cc thng tin b xung. Cc phn thng tin
thm vo c gi l argument. Argument c t trong du ngoc n, cc
argument phn bit vi nhau bng du phy.

3.5

Kt lun chng

Tng i Asterisk vi nhiu u im ang c rt nhiu doanh nghip trin khai ng
dng. Asterisk em n cho ngi s dng tt c cc tnh nng v ng dng ca h thng
tng i PBX v cung cp nhiu tnh nng m tng i PBX thng thng khng c c.
Chng 3 gii thiu tng qut v tng i Asterisk, sang chng 4 s trnh by vic trin
khai h thng Asterisk.















































56





Chng 4 Trin khai h thng ASTERISK





CHNG 4


TRIN KHAI H THNG ASTERISK

4.1

Gii thiu chng

Mc ch:
Thc hin th nghim cc hnh thc truyn thoi qua mi trng IP
Nghin cu cc tnh nng ti u m h thng Asterisk em li.
Quy m h thng:
Do hn ch v c s h tng, thit b nn th nghim y c xy dng vi quy
m nh, ch yu nhm mc ch nghin cu cc tnh nng mt h thng VoIP.

4.2

Kt ni phn cng

Cc thit b cn trin khai h thng Asterisk c kt ni theo nh m hnh sau




























Hnh 4.1 M hnh trin khai h thng Asterisk trong mng LAN
Trong :
Asterisk PBX: s dng ci t Asterisk vi cu hnh ti thiu:

-

-

CPU: 1.3 GHz

RAM: 400MB






57





Chng 4 Trin khai h thng ASTERISK



-



cng 5GB
2 my tnh c ci t softphone tng ng vi cc extention l 201v 202, 203.
Modem :kt ni vi nh cung cp dch v Internet
Switch: c s cng kt ni cc my tnh khc.
Trong th nghim trn, kt qu mong mun t c l:
Thit lp c cuc gi gia cc softphone trong mng LAN
Thit lp c cuc gi t softphone t mng LAN n ti khon trn SKYPE.
Thc hin c mt s tnh nng nh hp th thoi (Voicemail) ,

4.3

Ci t phn mm

Cc phn mm bao gm:
H iu hnh Fedora Core 8: ci t trn Computer 1, dng lm server Asterisk
Asterisk phin bn 1.4.5
Softphone: X-lite phin bn 3.0
Tin hnh ci t phn mm:
Ci t h iu hnh Fedora Core 8
Giao din Fedora Core 8 nh sau:



















Hnh 4.2 Giao din Fedora Core 8



Ci t Asterisk
c mt Asterisk Server, thc hin ci t cc gi phn mm sau:
Libpri



58





Chng 4 Trin khai h thng ASTERISK



Asterisk
Asterisk-addons
Qu trnh ci t c th tham kho thm phn ph lc
Sau khi ci t xong Fedora Core 8 v Asterisk, ta c mt Asterisk Server.
Ci t softphone X-lite
X-lite l mt phn mm softphone thng dng, vi y tnh nng ca mt in
thoi IP. X-lite s dng giao thc Sip.
Ti gi phn mm X-lite v v thc hin ci t nh mt phn mm bnh thng.
Giao din ca softphone X-lite:

























Hnh 4.3 Giao din softphone X-lite 3.0

4.4

Cu hnh h thng Aterisk

Cu hnh Asterisk PBX
Mt s tp tin quan trng nht cha cc thng s cu hnh ca h thng Asterisk l
extensions.conf , sip.conf, iax.conf
Tp tin sip.conf hay iax.conf cha thng tin v cc extension s dng giao
thc sip hay iax. Trong ti ny s dng giao thc SIP.
Tp tin extensions.conf cha cc thng tin v cc Dialplan m ta xy dng
cho h thng.





59





Chng 4 Trin khai h thng ASTERISK



cu hnh cho mt h thng Asterisk hot ng, trc tin ta s phi nh ngha cc
extension, sau xy dng cc Dialplan thch hp cho cc extension kt ni c vi
nhau v kt ni vi thu bao trn mng Internet .
Trong th nghim ny ta s nh ngha cc extension sau:




[203] dng cho softphone th nht
[200] dng cho softphone th hai
[201] dng cho softphone th ba.
[gjzmo5] dng gi ti ti khon trn SKYPE
Cu hnh Softphone





























Hnh 4.4 Cu hnh softphone
Ln lt cu hnh cho cc softphone 1, softphone 2, softphone 3. Mi softphone s
thit lp vi mt user v password tng ng nh chng ta cu hnh trong Asterisk
PBX. Domain chng ta s nhp a ch IP ca my ci t Asterisk PBX. X-Lite s
t ng ng k vi Asterisk PBX . Nu ng k thnh cng th X-Lite s nhn kt
ni, xut hin ch ready v user name tng ng vi s ng k.







60







Chng 4 Trin khai h thng ASTERISK




























Hnh 4.5 Softphone X-Lite ng k thnh cng ti khon 200
Sau khi ng k vo h thng kim tra bng lnh SIP SHOW PEERS























Hnh 4.6 Cc user c xc nhn ca h thng Asterisk PBX
Nh vy chng ta hon tt h thng tng i Asterisk PBX ni b. Sau ta c th
tin hnh cc cuc gi mong mun gia cc PC vi nhau.











61







Chng 4 Trin khai h thng ASTERISK



4.5



Thc hin cuc gi
Cc user kt ni vi nhau















Hnh 4.7 User 200 rung chung 201




































Hnh 4.8 Cuc gi c thit lp gia user 200 v 201









































































62









Chng 4 Trin khai h thng ASTERISK



Hp th thoi (voicemail) c thc thi khi my b gi bn hoc khng tr
li trong vng 20s





























Hnh 4.9 Li nhn c gi n voicemail box ca user 200
Truy nhp vo voicemail


























Hnh 4.10 Truy nhp vo voicemail ca user 200 bng cch bm gi 500




63





Chng 4 Trin khai h thng ASTERISK





Gi t softphone trong h thng n cc ti khon trn skype




























Hnh 4.11 Cuc gi gia user 200 vi skype-username
Trn y thc hin c mt s tnh nng c bn ca tng i Asterisk, cc kt ni u
thnh cng, cc thu bao m thoi bnh thng.

4.6

Kt lun chng

Cng ngh Asterisk ang phc v cho nhiu doanh nghip, y l xu th tt yu ca
ngi s dng in thoi v cc cng ty u c mng my tnh v cn lin lc vi nhau
trong cng vic gia cc phng ban hoc chi nhnh. c bit cn mt chi ph thp thm
ch khng phi tn chi ph khi thc hin cuc gi trn mng ni b ca cng ty.



















64



Kt lun v hng pht trin ti



KT LUN V HNG PHT TRIN TI
Qua vic nghin cu v mng VoIP, em nhn thy c c hi v hng pht trin
ca n trong tng lai. Vic pht trin da trn cng ngh VoIP khng ch mang mt tnh
cht kinh t, x hi to ln m cn l mt c hi rt ln Vit Nam c th c mt sn
phm mang tnh chin lc v hon ton kh thi nu c u t ng hng.

Asterisk l mt h thng chuyn mch mm ni ln c u im ca n so vi cc
tng i chuyn mch knh phc tp v gi thnh cao. Asterisk c ng dng nhiu
vo thc tin vi y tnh nng ca mt tng i PBX thng mi: phn lung cuc
gi , th thoi, hi m c bit kt ni in thoi IP vi mng PSTN. Tng lai ca
Asterisk l rt ln n l gii php vin thng cho i chng chi ph r, d dng thit lp ,
kt ni in thoi analog thng thng v in thoi IP. Cc cng ty hay t chc no cng
iu cn h thng in thoi ni b (PBX) v hu ht iu trang b h thng mng my
tnh, Asterisk l gii php hp nht hai h thng ny v ha nhp thng sut vi th gii
bn ngoi bng c Internet v PSTN.

Trong phm vi n tt nghip, khi kin thc v kinh nghim nghin cu cha c nn
n ca em ch i vo tng quan ch cha i su vo nghin cu tt c cc cng ngh
VoIP cng nh tng i Asterisk. V s hn ch v c s h tng nn n ca em ch
dng li vic xy dng mt m hnh VoIP quy m nh l thc hin c kt ni cc
thu bao ni b v thc hin c mt s tnh nng c bn ca tng i.
Hy vng thi gian ti y vi y thi gian v c s vt cht, em c th xy dng
c mt m hnh VoIP quy m ln hn c th hiu su sc v cng ngh VoIP.
C th nh: Xy dng h thng Asterisk kt ni hai server giao tip c in thoi IP
v in thoi analog ca PSTN, ngoi ra pht trin cc tnh nng ca tng i Asterisk
hn na.



Ph lc



Extensions :

/etc/asterisk/sip.conf

[genrenal]

Bindport=5060

Bindaddr=0.0.0.0

Context=incoming

Disallow=all

Allow=ulaw

Maxexpirey=120

Defaultexpirey=80



[200]

Type=friend

Username=ha

Secret=ha

Qualify=yes

Nat=no

Host=dynamic

Canreinvite=no

Context=incoming

Bindport=5060

Dtmfmode=rfc2833

Mailbox=200@mb_default



[201]

Type=friend

Username=201

Secret=201

Qualify=yes

Nat=no



Ph lc



Host=dynamic

Canreinvite=no

Context=incoming

Bindport=5060

Dtmfmode=rfc2833

Mailbox=201@mb_default



[203]

Type=friend

Username=thang

Secret=thang

Qualify=yes

Nat=no

Host=dynamic

Canreinvite=no

Context=incoming

Bindport=5060

Dtmfmode=rfc2833

Mailbox=203@mb_default



[gizmo5] ;gi user trn skype thng qua gizmo5.com

Type=peer

Host=198.65.166.131

Fromdomain=proxy01.sipphone.com

Canreinvite=no

Nat=yes

Dtmfmode=rfc2833

Isecure=very

Qualify=yes

Fromuser=quynhtrangnguyen



Ph lc



Authuser=quynhtrangnguyen

Username=quynhtrangnguyen

Secret=thangbom

Disallow=all

Allow=ulaw

Allow=alaw

Allow=ilbc

Dialplan:

/etc/asterisk/extensions.conf

[incoming]

include=>outbound-local

include=>voicemail

include=>dialbyname

exten=>s,1,Answer( )

exten=>s,2,Background(enter-ext-of-person)

exten=>200,1,Dial(SIP/200,20)

exten=>200,2,VoiceMailu(u200@mb_default)

exten=>200,3,Playback(vm-goodbye)

exten=>200,4,Hangup( )

exten=>200,102,VoiceMail(b200@mb_default)

exten=>Hangup( )



exten=>201,1,Dial(SIP/201,20)

exten=>201,2,VoiceMailu(u201@mb_default)

exten=>201,3,Playback(vm-goodbye)

exten=>201,4,Hangup( )

exten=>201,102,VoiceMail(b201@mb_default)

exten=>Hangup( )



exten=>203,1,Dial(SIP/203,20)



Ph lc



exten=>203,2,VoiceMail(u203@mb_default)

exten=>203,3,Playback(vm-goodbye)

exten=>203,4,Hangup( )

exten=>203,102,VoiceMail(b203@mb_default)

exten=>Hangup( )
;caller nhn s khng c trong danh sch v khng nhn bt k s no trong thi

gian qu lu

exten=>i,1,Playback(pbx-invalid)

exten=>i,2,Goto(incoming,s,1)

exten=>t,1,Playback(vm-goodbye)

exten=>t,2,hangup( )



;Truy nhp vo Voicemail

[voicemail]

exten=>500,1,VoiceMailMain(200@mb_default)

exten=>500,Hangup( )

exten=>501,1,VoiceMailMain(200@mb_default)

exten=>501,Hangup( )

exten=>502,1,VoiceMailMain(200@mb_default)

exten=>502,Hangup( )

;Dial by name

[dialbyname]

exten=>8,1,Directory(mb_default,incoming,f)

exten=>9,1,Directory(mb_default,incoming)

[outbound-local]

exten=>_7.,1,Dial(SIP/skype_${EXTEN:1}@gizmo5)

exten=>_7.,1,n,Hangup( )
; nhn 7skypeusername gi ti khon trn skype

Voicemail

/etc/asterisk/voicemail.conf



Ph lc



[mb_default]

200=>123,ha,ha@dtvt.com

201=>1234,201,pha@dtvt.com

203=>12345,thang,thang@dtvt.com
PH LC : CI T ASTERISK

Cc bc ci t sau y c thc hin vi mt my tnh c kt ni Internet.
Trc khi ci t Asterisk, ta phi kim tra nhn Kernel ca h iu hnh ta nh ci
Asterisk ln bng lnh:

uname - a
Kt qu c th trng nh sau:

Linux luser 2.6.23.1-42.fc8 #1SMP Tue Oct 30 13:55:12 EDT 2007 i686 i686

i386 GNU/Linux
Ch phin bn nhn Kernel tip theo sau y ta ci t Kernel source. Thc hin
ci t Kernel source bng lnh:

yum install kernel-source-2.6.23.1-42.fc8
Qu trnh ci t din ra trong mt vi pht.
Tip theo ta kim tra cc th vin cn thit cho vic ci t Asterisk, bao gm:

bison

bison-devel

ncurses

ncurses-devel

zlib

zlib-devel

openssl

openssl-devel

gnutls-devel

libtermcap-devel

gcc

gcc-c++
Thc hin kim tra bng cc lnh sau:



Ph lc



rpm -q bison

rpm -q bison-devel

rpm -q ncurses

rpm -q ncurses-devel

rpm -q zlib

rpm -q zlib-devel

rpm -q openssl

rpm -q openssl-devel

rpm -q gnutls-devel

rpm -q libtermcap-devel

rpm -q gcc

rpm -q gcc-c++
Nu th vic no cha c ci t, ta thc hin ci t bng lnh:

yum install bison

yum install bison-devel

yum install ncurses

yum install ncurses-devel

yum install zlib

yum install zlib-devel

yum install openssl

yum install openssl-devel

yum install gnutls-devel

yum install libtermcap-devel

yum install gcc

yum install gcc-c++
Sau khi chc chn rng cc th vin c ci t, ta tin hnh vic ci t

Asterisk.
Ci t gi Libpri: chuyn n th mc cha gi Libpri sau khi gii nn

make

make install



Ph lc



Ci t Asterisk: chuyn n th mc cha gi Asterisk sau khi gii nn

./configure

make

make install

make samples
Ci t Asterisk-addons

./configure

make

make install



Sau khi ci t cc gi xong, kim tra, ta vo ca s terminal ca Fedora Core 8,
thc hin lnh:

/usr/sbin/asterisk -r

reload
Qu trnh ci t Asterisk kt thc.



Ti liu tham kho





TI LIU THAM KHO



[1] o Ngc Anh, lun vn tt nghip Nghin cu giao thc trong mng VoIP, i
hc cng ngh, i hc Quc gia H Ni.
[2] David J.Wright, Voice over Packet Network, 2001

[3] Paul Maler, VolP Telephony With Asterisk.
[4] Alan B.Johnston, Understanding the Session Initiation Protocol, Artech House,

2004.

[5] Voice over IP: Fundamentals - Jonathan Davidson, James Peters
[6] Voice over IP: protocols and standards Rakest Arora

[7] McGraw-Hill - SIP Demystified, Gonzalo Camarillo.
[8] Leif Madsen, Jared Smith, Jim Van Meggelen - Asterisk The Future of Telephony -
O Reilly- 2005
[9] Voice over IP technologies: Building the Converged Network Mark A. Miller

[10] Comprehensive IP telephony services- Cheah Chin Siang, Chan Paey-Lun, Tan Chia

Wei

[11] Hudson, Andrew, Hudson, Paul , Fedora(TM) 7 Unleashed

[12] http://www.04hcb.net

[13] http://www.asterisk.org

[14] http://www.voip-info.org