A SIP_SIMPLE Based P2P VoIp and IM System
p2p方式的IM系统开发,采用SIP/SIMPLE协议
amultimediaortextsessionwithanotheruserorusers,andmanagesthatconnectionthroughtocallcompletion.PresenceisatermusedinIMtorefertotheabilityofuserstodetermineifotherusersareconnected,andtobenoti edwhentheyarriveorleave.Forexample,ausermayhavealistofindividualswithwhomtheywishtocommunicate.Theseusersarecalled“friends”or“buddies.”Presenceallowstheusertoseewhenafriendhasentered,perhapsbyhighlightingthatuseronalistdisplayedontheuser’sGUI.
Themajorityoftoday’sVoIPandIMsystemsarehighlycentralized.UsersconnecttothesystemusingaUserAgent(UA).UAscantaketheformofasoftwareapplicationorahardwaredevicesuchasanIPtelephoneormobilephonesupportingIM.Typically,thesedevicesareconnectedtoacentralsever,referredtoasaproxy,softswitch,orgatekeeper.Thiscentralproxyisamoresophisticatednetworkelementthanawebproxy.TheseproxiesaretypicallyresponsibleforregistrationofUAs,locationofuserswithinthesystem,androutingsignalingtraf cbetweenUAs.
ThereareanumberofVoIPprotocolsinwideuse.OlderprotocolssuchastheITU’sH.323placevirtuallyalltheintelligenceinthecentralserver,whileSIP[9],anewerprotocoldevelopedbytheIETF,isdesignedtopushsome,butnotall,oftheintelligencetotheUAs.Usersanddevelopershavealargeinvestmentofcapitalanddevelopmenttimeinthemanyphysicalor“hard”UAsinusetoday,andalargenumberofthesesupporteitherH.323orSIP.
MostcommercialIMprotocols,suchasAOL’sAIM,Microsoft’sMSNMessenger,andYahoo’sY!Messen-gerrequireuserstoconnecttoaserverhostedattheprovider’ssite.Afewcommercialproducts,aswellastheemergingIETFstandardsXMPPandSIMPLE[1,2,8,10]allowacorporationorgrouptomaintaintheirowninternalserver,butstillrequireacentralizedserver.XMPPisanXMLbasedprotocolthatemergedfromtheJabberproject.SIMPLEisasetofextensionstotheSIPprotocolintendedtosupportinstantmessaging.Manyorganizationshavebannedtheuseofcom-mercialIMproductsbecauseprivateconversations owthroughathirdpartylocation.TheoverheadofanorganizationmaintainingtheirownIMserversin-houseoftenexceedsthebene tsgainedfromIM.IndividualuserswhowishtocommunicatewithotherVoIPusers,butdon’tneedtomakecallstothepublicphonesystemareoftenfrustratedto ndtheymusteitheruseapublicserverormaintaintheirowncentralserver.WefeelthatfreeingVoIPandIMfromtheneedforacentralservermakesthetechnologymoreattractive.
2
B.SIPandSIMPLE
WechoosetoworkwiththeSIPandSIMPLEpro-tocolsbecausetheyareopen,widelyimplemented,andofferopen-sourceimplementationsrangingfromsimpleprotocolstackstofull edgedtelephonesystems[7,16].MSNMessenger,althoughdesignedtouseMicrosoft’scentralserver,isaSIPandSIMPLEclientthatcanbecon guredtousesystemsotherthanMicrosoft’s.Additionally,alargefractionoftheexistinghardclientsimplementSIP.Beforewecontinue,weexplorebrie yhowSIPandSIMPLEfunction.
SIPandSIMPLEaretext-basedprotocolsderivedfromHTTP[3],thereforemessagetypesandtraf caresimilartowebtraf c.SIPisageneralprotocolforestablishingandcontrollingmultimediasessions,andiswidelyusedforVoIP.SIPisaprotocolfornegotiatingthesession,andembedsSessionDescriptionProtocol(SDP)[4]informationtospecifythemediaparameters.TwoSIPdevicescanbecon guredtocommunicatedirectlytoeachother,butinallsystemsofgreaterthantwoUAsacentralproxyisused.MessagesaresentfromthecallingUAtotheproxy,whichisresponsibleforlocatingtheotherUA.SIPmessagesarepassedfromtheproxytothedestinationUA,possiblythroughaddi-tionalintermediaryproxies.ProxiesarealsoresponsibleforauthenticatingUAsandadministeringusernames.Proxiesarelocatedeitheronsiteoratacentralserviceprovider.
SIPmessages owingthroughthecentralproxiesmakeupthesignalingportionofaVoIPcall.Foref cency,theactualmediapacketsthat owbetweentheUAsdonotpassthroughproxiesorintermediaries.Thismediastreamtravelsdirectlybetweentheendpoints,usuallyintheformofRealTimeProtocol(RTP)[11]packets.Thisseparationofsignalingandcontent,andtheP2PnatureofmediaexchangeisanalogoustoexistingP2P le-sharingsystemsthatsearchwithanoverlayandexchangedatadirectly.
SIMPLEisasetofextensionstoSIPdesignedtocarryIMtraf c.Theunderlyingtechnologytolocateresources,establishsessions,androutemessagesisiden-ticalinSIPandSIMPLE.Wewillnotedifferenceswhereappropriate.Perhapsthemostfundamentaldifferenceisthatthereisnoseparatemediastream.ThetextofthemessagesiscarriedinaSIPpacket,andsopassesthroughtheintermediariesthatmakeupthesignalingpath.
Usersareidenti edbyanaddressofrecord,whichuniquelyde nesanindividualwithinaSIPsys-temandisreferredtoasaSIPURI,forexamplesip:bryan@cs.wm.edu.Usersmakethemselvesavailable


