osip user manual文档格式.docx

上传人:b****4 文档编号:8201041 上传时间:2023-05-10 格式:DOCX 页数:43 大小:33.02KB
下载 相关 举报
osip user manual文档格式.docx_第1页
第1页 / 共43页
osip user manual文档格式.docx_第2页
第2页 / 共43页
osip user manual文档格式.docx_第3页
第3页 / 共43页
osip user manual文档格式.docx_第4页
第4页 / 共43页
osip user manual文档格式.docx_第5页
第5页 / 共43页
osip user manual文档格式.docx_第6页
第6页 / 共43页
osip user manual文档格式.docx_第7页
第7页 / 共43页
osip user manual文档格式.docx_第8页
第8页 / 共43页
osip user manual文档格式.docx_第9页
第9页 / 共43页
osip user manual文档格式.docx_第10页
第10页 / 共43页
osip user manual文档格式.docx_第11页
第11页 / 共43页
osip user manual文档格式.docx_第12页
第12页 / 共43页
osip user manual文档格式.docx_第13页
第13页 / 共43页
osip user manual文档格式.docx_第14页
第14页 / 共43页
osip user manual文档格式.docx_第15页
第15页 / 共43页
osip user manual文档格式.docx_第16页
第16页 / 共43页
osip user manual文档格式.docx_第17页
第17页 / 共43页
osip user manual文档格式.docx_第18页
第18页 / 共43页
osip user manual文档格式.docx_第19页
第19页 / 共43页
osip user manual文档格式.docx_第20页
第20页 / 共43页
亲,该文档总共43页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

osip user manual文档格式.docx

《osip user manual文档格式.docx》由会员分享,可在线阅读,更多相关《osip user manual文档格式.docx(43页珍藏版)》请在冰点文库上搜索。

osip user manual文档格式.docx

SIPtransactions

SIPsessions

Serverbehavior

3.TheoSIPLibrary

Thegoals

Thedevelopmentlevel

Theparser

Thestatemachines

Thetransactionmanager

WhowillbenefitfromoSIP

Availableports

4.TheoSIPparser

files

SIP-URL

Definitionandpurpose

APIforSIP-URL

APIforurl_param_tandurl_header_t

SIPheaders

CommonAPIforallimplementedheader.

SpecificAPIfor"

To"

header

APIforgenericparam

SIPmessages

definitionandpurpose

APIforSIPmessage

MACROs

TheparserHOW-TO.

Initialisetheparser

Allocateastructure

createaURLandaRequest-URI.

Addheadersinamessage

makeastringfromastructure

freeresourceinastructure

Howtoimprovetheparserperformance

5.TheoSIPstatemachines

Transactionandevents

Definitionandpurposeoftransaction

Definitionandpurposeofsipevent

API

Thecallbacks.

UsefulMACROs.

ThefinitestatemachinesHOW-TO

Initialisetheosipstack

Allocateandinitializeanosip_telement

Sendeventstocontroltransaction

Notesforproxyimplementation

Buildyourownarchitecture

Bibliography

Chapter1.TheSIPprotocol

SIPisasignalingprotocolusedtoinitiateandcontrolmultimediasessions.ItisalreadypublishedbyIETF(www.ietf.org)astherfc2543.

SIPispartoftheIETFefforttobringtelephonyontheIPnetwork.ItisabouttobecomethestandardusedbytheemergingIPtelephonyindustry.Assimpleasthemailprotocol,itmaybecomeaspopular...

SIPisindependentofmedia

Thetraditionaltelephonywasbasedononemedia.Now,it'

sover.YourphonewillbeabletoconnecttoaTV,toacamera,toothersphoneswithdifferentqualitiesanddifferentcodecs.Hopefully,SIPisindependentofanymediausedbytheapplications.SIPisabletonegotiatemediausedwithinsessions.Anymultimediaapplication(games,distancelearningapplication)canuseSIPtosetupsessions.

SIPisindependentofthetransportlayer

SIPisnottighttoanytransportprotocol.Thisaspectwillminimizeeffortstointeroperatewithnewthirdgenerationnetworks.Wirelessphonesarealsoconcerned.ASIPstackperfectlyfitsthesignalingneedsofthenewcellulars'

generation.

SIPisextensible

Therfc2543defines6typesoftransaction(INVITE,BYE,CANCEL...).Thosetransactionsareusedtonegotiatemedia,setup,modifyandterminatecalls.ManyservicesarealreadyprovidedthiswaybutSIPisdesignedforextensibilityandthetransactionalmodelcanbereused(transparentlyforservers)bynewtypeoftransactiontocreatesomesupplementaryservices.Hereisalistofpossibleservices:

MESSAGEforinstantmessaging

SUBSCRIBE/NOTIFYforpresencemanagement

REFERforcall-transfermanagement

SIPtransparentlysupportsnamemappingandredirectionservices,allowingtheimplementationofISDNandIntelligentNetworktelephonysubscriberservices.Thesefacilitiesalsoenablepersonalmobility."

rfc2543.txt(Section1.1)

SIPserversareusedtolocateusersanddistributelocation(throughurls)ondemand.Thisway,enduseragentshaveveryminimalrequirementsandstillhaveaccesstoawidevarietyofservices.

Manyextensionsarealreadyavailableasdraft.Yourcanalsoaddyourpersonalphonecapabilitiesandremaininteroperablewithexistingservers.

Chapter2.SIPoverview

ThissectiondoesnotintendtofullydescribetheRFC.Itisafastandincompleteoverviewoftheprotocolsyntaxandbehavior.

SIPsyntax

SIPisatextprotocolbasedonutf8encoding.(makingitmorereadableandeasiertodebug)SIPdescribesasyntaxforSIPrequests,URL,responsesandtheirheaders.ThefullsyntaxisavailableatColumbiainanaugmentedBNFform.

ThesyntaxisborrowedfromtheMAILandHTTPsyntax.6typesofrequestsaredefinedbySIP.Thebasicavailablemethodsare:

INVITE

ACK

CANCEL

BYE

INFO

OPTIONS

AsyoucanseeintheBNFdefinitionofrequest(seerfc2543.txtsection3),SIPisnotlimitedtothisshortlistofmethodsandincludesinitsdefinitiontheextension-methodtoken.AnyotherrequestcanbehandledbyoSIP.NOTIFYandSUBSCRIBEaregoodexamplesofnewpossiblemethods.TheseonesareusedspecificallytoprovidepresencecapabilitiestoyourSIPphonewithoutmucheffort.

Example2-1.INVITErequest

INVITErequestsareusedtoinitiateandmodifysessions.Here,chafromiscallingjackatdomainatosc.org.Thisrequestshouldbesenttotheproxyservermanagingatosc.org,itwillforwardthecalltojackathisrealIPaddress.

INVITEsip:

jacK@atosc.orgSIP/2.0

Via:

SIP/2.0/UDPhome.sipworld.org

To:

sip:

From:

cha@sipworld.org

Call-ID:

35778645354@home.sipworld.org

CSeq:

1INVITE

Contact:

cha@home.sipworld.org

Content-type:

application/sdp

Content-length:

267

v=0

o=user1536557652353687637INIP4128.3.4.5

s=MboneAudio

i=DiscussionofMboneEngineeringIssues

e=mbone@

c=INIP4128.3.4.5

t=00

m=audio3456RTP/AVP0

a=rtpmap:

0PCMU/8000

SIPtransactions

Inordertocontrolsessions,SIPusestransactions.Transactions(INVITE,CANCEL,BYE...)usuallyresultinamodificationofacurrentsession.Someothertransactions(SUBSCRIBE,NOTIFY...)arenotboundtoasession.Atransactioniscomposedofonerequestanditsresponses(manyinformationalresponsesandonefinalresponse).Thefollowingheaders:

To,From,Call-IDandCSeqareusedtoidentifymessageswithinatransaction.

AsSIPcanuseunreliabletransportprotocol(UDPisrecommendedontheIPnetwork),SIPalsodefinesretransmissionrulesformessageswithinatransaction.

Example2-2.INVITEtransaction

Thisisthemostbasiccallflowshowingtheinitiationofasession.OnlytwoSIPUserAgents(UAC/UAS)areinvolved.(retransmissionsarehidden)

UAC1UAS2

jacks|INVITE|

initiatea|----------------->

|Bob'

s

call||Phonestarts

|180Ringing|ringing

|<

-----------------|

|180Ringing|

|<

|200OK|

|ACK|

|----------------->

|

SIPsessions

Transactionsareusedbyuseragentasmeanstocontrolsessions.AsessionisalwaysinitiatedbyanINVITE.SIPdefinesalargesetofanswercodes.Aproxymayansweryouthewellknown"

404UserNotfound"

asforanHTTPerror.Errorshavedifferentlevels.Atransactioncanfailbutstillproposesnewlocationstotry.Responsesfromclass3xxserveasredirectionmechanism.4xx,5xxand6xxresponsesarerespectivelyreservedforclienterror,servererrorandglobalfailure.

Example2-3.Acompletesession

First,bothuseragentsmustsendaREGISTERtoaregistrar.Inthefollowingexample,theproxyalsosupportregistration.

ThissessionisinitiatedwithanINVITEtransactiontojoinjackat.Aredirectiontojack'

sofficeismadebytheredirectserverof.UA1understandstheredirectionandsendsanewINVITEtowardstherealUserAgent(UA2)currentlyusedbyjackatoffice.atosc.org.UA2firstringsandjackacceptsthecallwitha200OKresponse.Afterseveralminutes,jackandbobwanttousetheirnewcameras.ThesessionismodifiedwithanINVITEsentbyjacktonegotiatenewparametersforvideo.Thesessionisfinallyendedbybob.

BOBJack(atosc.org)

UA1PROXYUA2

|REGISTER|.

|-------------->

|.

|200OK|.

--------------|.

...

later......

.|REGISTER|

.|<

--------------|

.|200OK|

.|-------------->

|INVITEjack@.

|302Movedtemporarily.

|ACK|.

|INVITEjack@office.atosc.org|

|audio|

|------------------------------>

|180Ringing|

------------------------------|

|ACKjack@office.atosc.org|

..

later..

|INVITEbob@|

|audio+video|

|ACKbob@bob.home.org|

|BYEjack@office.atosc.org|

||

SIPdefinesbehaviorsforproxy,redirectandregistrarserver.Forcompleteinformation,pleasereadtheRFC...

Usually,auseragentsendsitsrequeststoanoutboundproxy.Asusersdonotknowthecurrentlocationoftheircorrespondent,theyuseforthesipurlausernameandadomain.Theoutboundproxy(wherefirewallcapabilitiescanbeinserted)usesDNSSRVRECORDStofindserversbelongingtotherequesteddomain.Oncetheserverisfound,therequestisforwarded.Thisserveristheinboundproxyofthecorrespondent.Iftheuserisavailable,itsapplicationmusthaveregistereditslocationbefore,sotheproxyisnowabletoforwardtherequestto

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2