Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1




|Views: 2,177|Likes:
Published by api-3700036

More info:

Published by: api-3700036 on Oct 18, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





T\u1ed5ng quan v\u1ec1 Asterisk
I. Gi\u1edbi thi\u1ec7u:

Asterisk l\u00e0 ph\u1ea7n m\u1ec1m ngu\u1ed3n m\u1edf, \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef C, ra \u0111\u1eddi n\u0103m 1999 b\u1edfi Mark
Spencer, \u0111\u1ea7u ti\u00ean \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf v\u00e0 tri\u1ec3n khai tr\u00ean GNU/Linux n\u1ec1n x86 (c\u1ee7a Intel). Nh\u01b0ng
hi\u1ec7n nay Asterisk c\u00f3 th\u1ec3 ch\u1ea1y tr\u00ean c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh kh\u00e1c nh\u01b0: Mac OS X, FreeBSD,
OpenBSD v\u00e0 Microsoft Windowns.

Asterisk \u0111\u01b0\u1ee3c xem nh\u01b0 l\u00e0 m\u1ed9t t\u1ed5ng \u0111\u00e0i PBX (Private Branch eXchange) v\u00e0 \u0111\u01b0\u1ee3c th\u00eam nhi\u1ec1u t\u00ednh n\u0103ng m\u1edbi. Ngo\u00e0i nh\u1eefng t\u00ednh n\u0103ng c\u1ee7a m\u1ed9t t\u1ed5ng \u0111\u00e0i PBX th\u00f4ng th\u01b0\u1eddng, Asterisk c\u00f2n \u0111\u01b0\u1ee3c t\u00edch h\u1ee3p c\u1ea3 chuy\u1ec3n m\u1ea1ch TDM v\u00e0 chuy\u1ec3n m\u1ea1ch VoIP, c\u00f3 kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng \u0111\u00e1p \u1ee9ng nhu c\u1ea7u cho t\u1eebng \u1ee9ng dung nh\u01b0 m\u1edf r\u1ed9ng giao ti\u1ebfp v\u1edbi m\u1ea1ng PSTN (Public Switched Telephone Network).

V\u1edbi m\u1ed9t m\u00e1y t\u00ednh r\u1ebb ti\u1ec1n \u0111\u00e3 c\u00e0i h\u1ec7 \u0111i\u1ec1u h\u00e0nh (m\u1ed9t trong c\u00e1c h\u1ec7 \u0111i\u1ec1u h\u00e0nh n\u00f3i tr\u00ean, \u1edf \u0111\u00e2y ta thi\u00ean v\u1ec1 h\u1ec7 \u0111i\u1ec1u h\u00e0nh Microsoft Windowns) v\u00e0 c\u00f3 th\u00eam ph\u1ea7n m\u1ec1m Asterisk \u0111\u00e3 c\u1ea5u h\u00ecnh, khi \u0111\u00f3 m\u00e1y t\u00ednh n\u00e0y s\u1ebd c\u00f3 \u0111\u1ea7y \u0111\u1ee7 t\u00ednh n\u0103ng c\u1ee7a m\u1ed9t t\u1ed5ng \u0111\u00e0i \u0111i\u1ec7n tho\u1ea1i v\u00e0 c\u00f3 th\u1ec3 h\u01a1n th\u1ebf.

Asterisk l\u00e0 m\u1ed9t ph\u1ea7n m\u1ec1m ngu\u1ed3n m\u1edf, mi\u1ec5n ph\u00ed, c\u00f3 \u0111\u1ed9 tin c\u1eady cao n\u00ean \u0111\u01b0\u1ee3c xem l\u00e0 ph\u1ea7n
m\u1ec1m mang t\u00ednh c\u00e1ch m\u1ea1ng.

B\u1edfi nh\u1eefng ti\u1ec7n \u00edch: h\u1ec7 th\u1ed1ng v\u00e0 gi\u00e1 c\u01b0\u1edbc r\u1ebb, d\u1ec5 s\u1eed d\u1ee5ng, \u0111\u1ea7y \u0111\u1ee7 c\u00e1c t\u00ednh n\u0103ng c\u1ee7a m\u1ed9t
t\u1ed5ng \u0111\u00e0i v\u00e0 con h\u01a1n th\u1ebf n\u00ean \u0111\u00e3 c\u00f3 nhi\u1ec1u h\u1ec7 th\u1ed1ng Asterisk \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng tr\u00ean th\u1ebf
gi\u1edbi. Hi\u1ec7n nay h\u1ec7 th\u1ed1ng Asterisk \u0111ang \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n m\u1ea1nh, nhi\u1ec1u doanh nghi\u1ec7p, c\u00f4ng ty \u0111\u00e3
v\u00e0 \u0111ang tri\u1ec3n khai h\u1ec7 th\u1ed1ng t\u1ea1o li\u00ean l\u1ea1c b\u00ean trong v\u00e0 ra c\u1ea3 m\u1ea1ng ngo\u00e0i th\u00f4ng qua m\u1ea1ng m\u00e1y
t\u00ednh, g\u1ecdi \u0111i\u1ec7n tho\u1ea1i.

H\u00ecnh 1: S\u01a1 \u0111\u1ed3 giao ti\u1ebfp t\u1ed5ng qu\u00e1t.
T\u1ed5ng quan v\u1ec1 Asterisk

T\u1eeb h\u00ecnh 1 ta th\u1ea5y Asterisk kh\u00f4ng ch\u1ec9 giao ti\u1ebfp, k\u1ebft n\u1ed1i gi\u1eefa c\u00e1c \u0111i\u1ec7n tho\u1ea1i v\u1edbi nhau m\u00e0 c\u00f2n c\u00f3 th\u1ec3 m\u1edf r\u1ed9ng k\u1ebft n\u1ed1i \u0111\u1ebfn c\u00e1c t\u1ed5ng \u0111\u00e0i kh\u00e1c, v\u1edbi IP Phone v\u00e0 nhi\u1ec1u d\u1ecbch v\u1ee5 nh\u01b0: Softswitch, Media Gateway, Voicemail Services, Conference Server, Music on hold\u2026

II. Ki\u1ebfn tr\u00fac h\u1ec7 th\u1ed1ng Asterisk:

Asterisk l\u00e0 thi\u1ebft b\u1ecb trung gian d\u00f9ng \u0111\u1ec3 li\u00ean k\u1ebft c\u00f4ng ngh\u1ec7 \u0111i\u1ec7n tho\u1ea1i v\u00e0 Internet. Asterisk \u0111\u01b0\u1ee3c \u1ee9ng d\u1ee5ng \u0111\u1ec3 k\u1ebft n\u1ed1i \u0111i\u1ec7n tho\u1ea1i, \u0111\u01b0\u1eddng d\u00e2y \u0111i\u1ec7n tho\u1ea1i ho\u1eb7c g\u00f3i tho\u1ea1i \u0111\u1ebfn m\u1ed9t k\u1ebft n\u1ed1i d\u1ecbch v\u1ee5 kh\u00e1c. Asterisk c\u00f3 \u0111\u1ed9 tin c\u1eady cao v\u00e0 d\u1ec5 d\u00e0ng tri\u1ec3n khai cho c\u00e1c h\u1ec7 th\u1ed1ng ( t\u1eeb h\u1ec7 th\u1ed1ng nh\u1ecf \u0111\u1ebfn c\u00e1c h\u1ec7 th\u1ed1ng l\u1edbn), Asterisk h\u1ed7 tr\u1ee3 \u1edf m\u1eadt \u0111\u1ed9 cao v\u00e0 y\u00eau c\u1ea7u s\u1ef1 ph\u1ee9c t\u1ea1p.

Asterisk h\u1ed7 tr\u1ee3 cho nhi\u1ec1u lo\u1ea1i \u0111i\u1ec7n tho\u1ea1i c\u00f3 c\u00f4ng ngh\u1ec7 kh\u00e1c nhau. C\u00e1c c\u00f4ng ngh\u1ec7 \u0111i\u1ec7n tho\u1ea1i: VoIP, SIP, H.323, IAX v\u00e0 BGCP (d\u00f9ng cho \u0111i\u1ec7n tho\u1ea1i \u0111i qu\u1ed1c t\u1ebf). Asterisk c\u00f3 th\u1ec3 k\u1ebft n\u1ed1i v\u1edbi h\u1ea7u h\u1ebft lo\u1ea1i \u0111i\u1ec7n tho\u1ea1i truy\u1ec1n th\u1ed1ng m\u1ea1ng ISDN qua lu\u1ed3ng T1 v\u00e0 E1. C\u00e1c \u1ee9ng d\u1ee5ng cho \u0111i\u1ec7n tho\u1ea1i: chuy\u1ec3n m\u1ea1ch cu\u1ed9c g\u1ecdi, cu\u1ed9c g\u1ecdi h\u1ed9i ngh\u1ecb, voicemail, chuy\u1ec3n h\u01b0\u1edbng cu\u1ed9c g\u1ecdi, \u2026

M\u1ed9t Asterisk server \u0111\u01b0\u1ee3c k\u1ebft n\u1ed1i t\u1edbi m\u1ed9t m\u1ea1ng v\u00f9ng n\u1ed9i h\u1ea1t s\u1ebd \u0111i\u1ec1u khi\u1ec3n c\u00e1c \u0111i\u1ec7n tho\u1ea1i trong m\u1ea1ng k\u1ebft n\u1ed1i \u0111\u1ebfn m\u1ea1ng kh\u00e1c, c\u00e1c \u0111i\u1ec7n tho\u1ea1i trong m\u1ea1ng c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n cu\u1ed9c g\u1ecdi v\u00e0 k\u1ebft n\u1ed1i Internet th\u00f4ng qua Asterisk server.

C\u1ed5ng FXS d\u00f9ng \u0111\u1ec3 Asterisk server \u0111i\u1ec1u khi\u1ec3n c\u00e1c \u0111i\u1ec7n tho\u1ea1i t\u01b0\u01a1ng t\u1ef1 trong n\u1ed9i hat. C\u1ed5ng FXO v\u00e0 k\u00eanh T \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 k\u1ebft n\u1ed1i gi\u1eefa Asterisk server v\u1edbi m\u1ea1ng PSTN. Thu\u00ea bao trong m\u1ea1ng PSTN th\u1ef1c hi\u1ec7n cu\u1ed9c g\u1ecdi \u0111\u1ebfn c\u00e1c thu\u00ea bao \u0111\u01b0\u1ee3c qu\u1ea3n l\u00fd b\u1edfi Asterisk server, c\u00e1c thu\u00ea bao c\u1ee7a Asterisk c\u0169ng c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n cu\u1ed9c g\u1ecdi \u0111\u1ebfn thu\u00ea bao trong m\u1ea1ng PSTN.

H\u00ecnh 2: Ki\u1ebfn tr\u00fac c\u1ee7a Asterisk
T\u1ed5ng quan v\u1ec1 Asterisk
M\u1ed9t s\u1ed1 ch\u1ee9c n\u0103ng c\u1ee7a Asterisk trong h\u1ec7 th\u1ed1ng chuy\u1ec3n m\u1ea1ch cu\u1ed9c g\u1ecdi:

Khi kh\u1edfi \u0111\u1ed9ng h\u1ec7 th\u1ed1ng Asterisk th\u00ec Dynamic Module Loader th\u1ef1c hi\u1ec7n n\u1ea1p driver c\u1ee7a thi\u1ebft b\u1ecb, n\u1ea1p c\u00e1c k\u00eanh giao ti\u1ebfp, \u0111\u1ecbnh d\u1ea1ng file, thu th\u1eadp th\u00f4ng tin \u0111\u1ea7u cu\u1ed1i, codec v\u00e0 c\u00e1c \u1ee9ng d\u1ee5ng li\u00ean quan, \u0111\u1ed3ng th\u1eddi c\u00e1c h\u00e0m API c\u0169ng \u0111\u01b0\u1ee3c li\u00ean k\u1ebft n\u1ea1p v\u00e0o h\u1ec7 th\u1ed1ng.

H\u1ec7 th\u1ed1ng Asterisk PBX Switching Core chuy\u1ec3n sang tr\u1ea1ng th\u00e1i s\u1eb5n s\u00e0ng th\u1ef1c hi\u1ec7n chuy\u1ec3n
m\u1ea1ch cu\u1ed9c g\u1ecdi, c\u00e1c cu\u1ed9c g\u1ecdi \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n tu\u1ef3 v\u00e0o k\u1ebf ho\u1ea1ch quay s\u1ed1 (Dialplan).
Ch\u1ee9c n\u0103ng Application Launchar \u0111\u1ec3 rung chu\u00f4ng thu\u00ea bao, k\u1ebft n\u1ed1i v\u1edbi h\u1ed9p th\u01b0 tho\u1ea1i
ho\u1eb7c g\u1ecdi ra \u0111\u01b0\u1eddng trung k\u1ebf\u2026

Scheduler and I/O Manager \u0111\u1ea3m nhi\u1ec7m c\u00e1c \u1ee9ng d\u1ee5ng n\u00e2ng cao nh\u01b0: l\u1eadp th\u1eddi bi\u1ec3u v\u00e0 qu\u1ea3n l\u00fd c\u00e1c cu\u1ed9c g\u1ecdi \u0111\u1ebfn \u2013 \u0111i ra ngo\u00e0i. \u0110\u00e2y l\u00e0 c\u00e1c ch\u1ee9c n\u0103ng \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n b\u1edfi c\u1ed9ng \u0111\u1ed3ng ph\u00e1t tri\u1ec3n asterisk.

Codec Translator x\u00e1c nh\u1eadn c\u00e1c k\u00eanh n\u00e9n d\u1eef li\u1ec7u \u1ee9ng v\u1edbi c\u00e1c chu\u1ea9n kh\u00e1c nhau c\u00f3 th\u1ec3 k\u1ebft
h\u1ee3p li\u00ean l\u1ea1c \u0111\u01b0\u1ee3c v\u1edbi nhau.

T\u1ea5t c\u1ea3 c\u00e1c cu\u1ed9c g\u1ecdi \u0111\u1ecbnh h\u01b0\u1edbng qua h\u1ec7 th\u1ed1ng Asterisk \u0111\u1ec1u th\u00f4ng qua c\u00e1c giao ti\u1ebfp nh\u01b0: SIP, Zaptel or IAX. M\u1ecdi cu\u1ed9c g\u1ecdi v\u00e0o v\u00e0 ra ngo\u00e0i \u0111\u1ec1u \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n th\u00f4ng qua c\u00e1c giao ti\u1ebfp tr\u00ean. V\u00ec th\u1ebf h\u1ec7 th\u1ed1ng Asterisk ph\u1ea3i \u0111\u1ea3m tr\u00e1ch nhi\u1ec7m v\u1ee5 li\u00ean k\u1ebft c\u00e1c giao ti\u1ebfp kh\u00e1c nhau \u0111\u00f3 \u0111\u1ec3 x\u1eed l\u00fd cu\u1ed9c g\u1ecdi.

Ch\u1ee9c n\u0103ng c\u1ee7a c\u00e1c giao ti\u1ebfp ch\u01b0\u01a1ng tr\u00ecnh \u1ee9ng d\u1ee5ng (API: Application Program
Codec translator API: c\u00e1c h\u00e0m \u0111\u1ea3m nhi\u1ec7m th\u1ef1c thi v\u00e0 gi\u1ea3i n\u00e9n c\u00e1c chu\u1ea9n kh\u00e1c nhau nh\u01b0:
GMS, G723, Mu-Law\u2026

Asterisk Channel API : Giao ti\u1ebfp v\u1edbi c\u00e1c k\u00eanh li\u00ean l\u1ea1c kh\u00e1c nhau, \u0111\u00e2y l\u00e0 \u0111\u1ea7u m\u1ed1i cho vi\u1ec7c k\u1ebft n\u1ed1i c\u00e1c cu\u1ed9c g\u1ecdi t\u01b0\u01a1ng th\u00edch v\u1edbi nhi\u1ec1u chu\u1ea7n kh\u00e1c nhau nh\u01b0 SIP, ISDN, H323, Zaptel\u2026

Asterisk file format API : Asterisk t\u01b0\u01a1ng th\u00edch v\u1edbi vi\u1ec7c x\u1eed l\u00fd c\u00e1c lo\u1ea1i file c\u00f3 \u0111\u1ecbnh d\u1ea1ng
kh\u00e1c nhau nh\u01b0: Mp3, WAV, GSM, AU\u2026
Asterisk Aplication API : Bao g\u1ed3m t\u1ea5t c\u1ea3 c\u00e1c \u1ee9ng d\u1ee5ng \u0111\u01b0\u1ee3c th\u1ef1c thi trong h\u1ec7 th\u1ed1ng
Asterisk nh\u01b0: cu\u1ed9c g\u1ecdi h\u1ed9i ngh\u1ecb, VoiceMail, CallerID\u2026

Ngo\u00e0i ra, Asterisk c\u00f2n c\u00f3 th\u01b0 vi\u1ec7n Asterisk Gateway Interface (AGI, t\u01b0\u01a1ng t\u1ef1 nh\u01b0 CGI) - c\u01a1 ch\u1ebf k\u00edch ho\u1ea1t \u1ee9ng d\u1ee5ng b\u00ean ngo\u00e0i, cho ph\u00e9p vi\u1ebft k\u1ecbch b\u1ea3n ph\u1ee9c t\u1ea1p v\u1edbi m\u1ed9t s\u1ed1 ng\u00f4n ng\u1eef nh\u01b0 PHP hay Perl.

III. M\u1ed9t s\u1ed1 t\u00ednh n\u0103ng c\u01a1 b\u1ea3n:
III.1. Voicemail

Voicemail: h\u1ed9p th\u01b0 tho\u1ea1i v\u1edbi t\u00ednh n\u0103ng cho ph\u00e9p h\u1ec7 th\u1ed1ng nh\u1eadn c\u00e1c th\u00f4ng \u0111i\u1ec7p tin nh\u1eafn
tho\u1ea1i, m\u1ed7i m\u00e1y \u0111i\u1ec7n tho\u1ea1i \u0111\u01b0\u1ee3c khai b\u00e1o trong h\u1ec7 th\u1ed1ng Asterisk cho ph\u00e9p khai b\u00e1o th\u00eam
ch\u1ee9c n\u0103ng h\u1ed9p th\u01b0 tho\u1ea1i. Khi s\u1ed1 \u0111i\u1ec7n tho\u1ea1i b\u1ecb g\u1ecdi b\u1eadn hay ngo\u00e0i v\u00f9ng ph\u1ee7 s\u00f3ng th\u00ec h\u1ec7 th\u1ed1ng
asterisk \u0111\u1ecbnh h\u01b0\u1edbng tr\u1ef1c ti\u1ebfp cu\u1ed9c g\u1ecdi \u0111\u1ebfn h\u1ed9p th\u01b0 tho\u1ea1i t\u01b0\u01a1ng \u1ee9ng \u0111\u00e3 khai b\u00e1o tr\u01b0\u1edbc.

Voicemail cung c\u1ea5p cho ng\u01b0\u1eddi s\u1eed d\u1ee5ng nhi\u1ec1u t\u00ednh n\u0103ng nh\u01b0: x\u00e1c nh\u1eadn password khi
truy c\u1eadp v\u00e0o h\u1ed9p th\u01b0 tho\u1ea1i, g\u1eedi mail b\u00e1o khi c\u00f3 th\u00f4ng \u0111i\u1ec7p m\u1edbi.
III.2. Call Forwarding
Call Forwarding: chuy\u1ec3n h\u01b0\u1edbng cu\u1ed9c g\u1ecdi.

Activity (59)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Minh Tiến liked this
duyluan liked this
Thanh Kien liked this
Quang Trường liked this
mydream_0204 liked this
Thùy Đào liked this
Thùy Đào liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->