You are on page 1of 5

TP CH KHOA HC V CNG NGH, I HC NNG - S 2(31).

2009

THIT K V THI CNG M HNH TRUYN THOI PC TO PC V PHONE TO PHONE TRONG MNG LAN THEO CNG NGH VOIP
DESIGNING AND EXECUTING MODELS OF PC TO PC AND PHONE TO PHONE IN LAN BASED ON VOIP Nguyn Vn Tun Nguyn Vn Phng
Trng i hc Bch khoa, i hc Nng

V Minh Thnh
Cng ty Truyn dn Viettel

u Vn An
Cng ty Vin thng EVN
TM TT Truyn thoi qua IP (VoIP) l mt trong nhng cng ngh ang c trin khai, p dng v pht trin rng ri vi mc tiu l c th thay th chc nng cung cp dch v thoi ca mng PSTN, thng nht h thng truyn s liu v truyn thoi. gp phn ng dng cng ngh VoIP vo thc tin, trong bi bo ny chng ti gii thiu hai m hnh PC to PC v Phone to Phone trong mng LAN. Sau , xy dng lu thut ton, vit chng trnh truyn thoi bng ngn ng Delphi, thit k v thi cng Card giao tip theo hai m hnh ny. ABSTRACT Voice over Internet Protocol (VoIP), one of the most popular technologies has been applied, deployed and developed widely thanks to its ability to replace services providing the function of PSTN and unite data and voice transmission into one common system. In order to apply VoIP technology to real conditions, in this paper, we introduce two models: PC to PC and Phone to Phone in LAN. Then, we build algorithm charts; write a voice transmission program by Delphi and design and execute interface Cards by means of these models.

1. t vn Nn tng ca cng ngh truyn thoi qua IP l s kt hp cc qu trnh m ha, ng gi cc tn hiu thoi truyn i trn mng IP tng t nh cc gi d liu. Mt trong nhng im mnh ca cc h thng VoIP hin nay l kh nng kt ni vi mng PSTN truyn thng cung cp cc dch v thoi vi gi thnh thp hn bng vic s dng cc u cui hin c trn mng PSTN v ng truyn qua mng IP. M hnh ny ang c trin khai ngy cng rng ri trong cc mng in thoi ti Vit Nam. Trong bi bo ny, chng ti xy dng hai m hnh truyn thoi VoIP trong mng LAN nhm mc ch thit lp mt h thng truyn thoi ni b ti cc cng ty hay c quan, tn dng cc kt ni sn c gia cc u cui PC, thay th cho chc nng ca cc tng i PABX. Thay v phi xy dng h thng chuyn mch knh nh i vi cc tng i in t hay tng i s thc thi cc tin trnh kt ni thc hin cuc gi,
1

TP CH KHOA HC V CNG NGH, I HC NNG - S 2(31).2009

thoi c th c truyn ti qua cc ng kt ni Ethernet vi tc 100Mbit/s hoc cao hn cng vi cc thng tin d liu trn mng LAN. 2. Gii thiu m hnh PC to PC Cuc gi c thc hin trc tip trn cc u cui PC c trang b speaker, micro v phn mm iu khin nh c m t trn hnh 1. M hnh ny tuy n gin nhng khng thn thin nhiu vi ngi s dng.

Hnh 1. M hnh PC to PC

3. Gii thiu m hnh Phone to Phone Vi phng thc thc hin cuc gi Phone to Phone, vic thit k yu cu cc qu trnh x l phc tp hn v cc u cui in thoi khng th kt ni trc tip vo mng LAN. Thm vo cn phi thit lp cc thng tin bo hiu cuc gi tng t nh tnh nng ca cc tng i. Trn thc t trong m hnh truyn thoi Phone to Phone, cc u cui PC trn mng LAN ng vai tr ca mt tng i chuyn mch knh, tuy vy h thng tng i ny c cu trc phn tn. Thnh phn thc thi hai chc nng trn l card giao tip gia cc u cui PC v in thoi. S kt ni thc hin cuc gi c m t theo hnh 2 di y:

Hnh 2. M hnh Phone to Phone

Nh vy tn hiu thoi s c truyn t in thoi vo u cui PC kt ni trc


2

TP CH KHOA HC V CNG NGH, I HC NNG - S 2(31).2009

tip n n pht i trn mng LAN n mt u cui PC khc, sau PC ny s thc thi cc tin trnh x l tn hiu thoi chuyn thng tin m thoi n pha thu bao cn lin lc. 4. Xy dng theo lu thut ton

Hnh 3. Lu thut ton PC to PC

Hnh 4. Lu thut ton Phone to Phone

5. Chng trnh truyn thoi Trn c s cc lu thut ton trong hnh 3 v hnh 4, chng trnh truyn thoi (CTTT) trn my tnh theo hai m hnh PC to PC v Phone to Phone c vit bng ngn ng Delphi vi giao din c biu din nh hnh 5 v hnh 6.

Hnh 5. Giao din chng trnh truyn thoi PC to PC

Hnh 6. Giao din chng trnh truyn thoi Phone to Phone

y l mt trong nhng loi trnh bin dch c tnh n nh cao, c s mm do c bit tt i vi vic x l cc tin trnh i hi tc cao. Cc thnh phn (Components) c bn c s dng trong chng trnh nh sau:
3

TP CH KHOA HC V CNG NGH, I HC NNG - S 2(31).2009

TServerSocket, TClientSocket: Dng truyn v nhn cc thng bo trn cc u cui PC TWSocket: Dng truyn v nhn cc gi thoi c s ha trong mng IP TaudioIn: Ly mu v s ha tn hiu thoi cho my tnh x ly TaudioOut: Chuyn i tn hiu thoi di dng s sang dng thoi tng t TPhoneToneDecoder v TWaveExCtrl: Nhn Tone in thoi. 6. Cc s mch S mch ca khi giao tip ng dy v khi iu khin c biu din nh hnh 7 v hnh 8 di y:

Hinh 7. S mch khi giao tip ng dy thu bao

Hinh 8. S iu khin

7. Thit k v thi cng Card giao tip Cc tnh nng ca khi card giao tip bao gm: Nhn bit trng thi thu bao. Chuyn i kt ni hai dy n thu bao sang kt ni 4 dy vi ng thu pht ring kt ni n soundcard. Thu pht thng tin iu khin vi PC. Cung cp m hiu cuc gi. Cp bo hiu chung. Cho php in thoi vn c s dng
4 Hnh 9. Card giao tip

TP CH KHOA HC V CNG NGH, I HC NNG - S 2(31).2009

trong mng PSTN 8. Kt lun Trn c s nghin cu hai m hnh PC to PC v Phone to Phone trong mng LAN bi bo xy dng cc lu thut ton, vit chng trnh truyn thoi bng ngn ng Delphi, thit k v thi cng Card giao tip nhm mc ch thit lp mt h thng truyn thoi ni b ti cc cng ty hay c quan, tn dng cc kt ni sn c gia cc u cui PC, thay th cho chc nng ca cc tng i PABX. Kt qu thit k v thi cng c th hin nh sau: + Vi chng trnh truyn thoi PC to PC v Phone to Phone, qu trnh truyn thng c thc hin vi cht lng thoi tt, ting ni khng b lp, cc m thoi r rng. + i vi cc qu trnh m thoi s dng phng tin l in thoi, thu bao c th tin hnh quay s thc hin cuc gi thng thng. + H thng truyn thoi VoIP trong mng LAN cn cho php thit lp mt danh b in thoi lu tr s in thoi, a ch IP v tn ngi s dng tng ng. Trn c s , ngi s dng c th thc hin cc qu trnh cp nht hay tm kim trn danh b. TI LIU THAM KHO [1] inh Vn Dng, Trn Ho Bu, Nguyn Trung Thnh, Thi Quang Tng, Cng ngh thoi IP v ng dng trn mng vin thng Vit Nam, Tng Cc Bu in H Ni 11/2001. [2] Ng Din Tp, Lp trnh ghp ni my tnh trong Windows, Nh xut bn khoa hc k thut. [3] Jonathan Davidson James Peters, Voice Over IP Fundamentals, Cisco System ISBN 1 57870 168 6. [4] Sencer Yeralan, Programming and interfacing the 8051 Microcontroller, 1995.