05 sip字段说明.docx
- 文档编号:6990946
- 上传时间:2023-01-15
- 格式:DOCX
- 页数:21
- 大小:323.73KB
05 sip字段说明.docx
《05 sip字段说明.docx》由会员分享,可在线阅读,更多相关《05 sip字段说明.docx(21页珍藏版)》请在冰豆网上搜索。
05sip字段说明
SIP协议的各字段分析和各种功能的应用
一、SIP字段说明
1.Request-Line
Request-Line=MethodSPRequest-URISPSIP-Version
包含method名字、一个Request-URI和一个用空格隔开的协议版本号。
Method包含SIP协议的6种命令:
Register、Invite、ACK、Cancel、BYE和Options;Request-URI:
标注被叫的号码或者是名字以及服务器的地址或者是URI地址;SIP-Version:
在请求消息和应答消息中都包含有SIP的协议版本号,一般是“SIP/2.0”。
2.Responses
Status-Line=SIP-VersionSPStatus-CodeSPReason-Phrase
应答命令是用来回应请求命令的,状态行包含协议版本、状态码和原因描述(用文本方式描述状态);状态码有1XX、2XX、3XX、4XX、5XX和6XX等六种,分别描述不同的内容。
3.HeaderFields
Via:
用来标识应答消息的返回路径,包含SIP版本、通过的路径、branch;在应答包中会看到此包经过别的路径后加进去的路径参数,如果是经过了NAT,那么里面会加上received=ip,rport=port这类的参数
Max-Forwards:
用来表示这个包最多可以被传送多少跳,当此值为0还没有到达目的地时,系统会回483(TooManyHops);一般在含有request的源包里面带有这个字段,默认值正常的都是设置为70
User-Agent:
终端设备自己填写的关于设备方面的信息,没有具体用处
From:
源的displayname和源的URI;&前面带的是设备号或者是主叫号码,&后面带的是proxy的地址
To:
目的地的绝对地址,包含被叫displayname和被叫URI;&前面带的是设备号或者是被叫号码,&后面带的是proxy的地址
Call-ID:
是一个唯一的标识符,在一通呼叫中请求和应答消息中的Call-ID是唯一的
Contact:
包含源的URI信息,用来给响应消息直接和源建立连接用
CSeq:
用来标识命令和命令顺序,用32位无符号整数来表示,要小于2**31
Expires:
在注册包和注册应答包中携带,用来协商URI的有效时间,当为0的时候表示注销设备,没有Expires的时候会被系统拒绝(现在做了修改,如果没有这个字段,系统会把此值当作是3600)
Allow:
允许的命令
Supported:
支持的操作,例如:
replace等
Content-Type:
指明消息体的类型
Content-Length:
指明消息体的字节大小
4.Messagebody
SDP协议版本
会话名,例如:
SIPCALL
ConnectionInformation:
ConnectNetworkType现在只有IN(Internet);ConnectionAddressType现在只有IP4和IP6两种;ConnectionAddress可以为单播地址或多播组地址,如果是多播组地址还必须有一个生存时间(TTL)值,如:
c=INIP4224.2.1.1/127,表示TTL=127秒
TimeDescription:
标明会话的开始时间和终止时间
MediaDescription:
包含媒体类型、端口、传送层和格式列表4部分,传送层描述的是MediaProtocol,例如:
RTP/AVP表示IETFRTP协议,udp表示UDP协议;格式列表列举出支持的codec类型
MediaAttribute:
有两种描述方式:
a=<属性>或a=<属性>:
<值>,第一种形式称为特殊属性,无须规定数值,如:
a=recvonly表示该媒体信道是“只收”信道;第二种形式称为数值属性,例如:
MediaAttributeValue:
18G729/8000这种形式
二、一些功能信令流程
1.Refer(Transfer业务)命令的使用
对于SIP信令的Transfer应用,主要用到的命令就是Refer,在B挂机后会向系统发出Refer命令,系统回应一个Accepted(202)命令,然后系统再会一个Notify命令,B回应200OK后,过程结束,具体的信令流程和信令内容请查看SIPTransfer文档,下面列举如下:
AttendedCallTransfer
Message1
REFERsip:
b@SIP/2.0
Via:
SIP/2.0/UDP;branch=z9hG4bK2293940223
To:
b@> From: a@>;tag=193402342 Call-ID: 898234234@ CSeq: 93809823REFER Max-Forwards: 70 Refer-To: (whateverURI) Contact: sip: a@ Content-Length: 0 Message2 SIP/2.0202Accepted Via: SIP/2.0/UDP;branch=z9hG4bK2293940223 To: b@>;tag=4992881234 From: a@>;tag=193402342 Call-ID: 898234234@ CSeq: 93809823REFER Contact: sip: b@ Content-Length: 0 Message3 NOTIFYsip: a@SIP/2.0 Via: SIP/2.0/UDP;branch=z9hG4bK9922ef992-25 To: a@>;tag=193402342 From: b@>;tag=4992881234 Call-ID: 898234234@ CSeq: 1993402NOTIFY Max-Forwards: 70 Event: refer Subscription-State: active;expires=(dependsonRefer-ToURI) Contact: sip: b@ Content-Type: message/sipfrag;version=2.0普通呼叫的type为: application/sdp Content-Length: 20 2.Replace的使用 过程如下图所示: 3.EarlyMediaApplications 在SIP的EarlyMedia中使用的是183信令来实现,如下图: 4.SIP自动callback的应用 5.用InstantMessagetoTransferaCall 6.SIPMessageWaiting 7.SIPCallControlinConferencing 三、新功能 1.SigComp theSignalingCompression(SigComp)add-onmoduleisasolutionforcompressingSIP signaling.SinceSIPmessagesaretextbased,theyarenotoptimizedintermsofsize.Forexample, typicalSIPmessagesrangefromafewhundredbytestotwothousandbytesormore(RFC3261). Withtheplannedusageoftheseprotocolsinwirelessandcellularhandsets,andaspartofthe3GPP (ThirdGenerationPartnershipProject)requirementsforIMS(IPMultimediaSubsystem),thelarge messagesizeisproblematicandmessagecompressionismandatory. 2.DLA(DynamicLocalAddress) enablesthedynamicopeningandclosingofthelocalIP addresses,whichareusedforrequestsendingandreception,atanymomentoftheSIPStacklife cycle.Thisfeatureistypicallyusedwithmultihomedhost.DLAisusedforbroadband(DSL,cable), aswellaswirelessandcellularnetworks,tosupporthandoffsandIPaddresschangesbyservice providers. 3.IP_TOS determinesthevalueoftheTypeofServicefieldintheIPheaderofallpacketsthatare sentovertheoutgoingconnections.(SupportedforIPv4addressesonly.) 4.TransmitterObject theSIPStackusestransmitterobjectsformessagesending.Eachtransaction objectholdsasingletransmitterobjectandusesittosendSIPmessagesandmessage retransmissions.Theapplicationcanusethisnewobjectforsendinganout-of-scoperequestor responsewithoutusingtheTransactionlayer. 5.REFERRFC3515 REFERisaSIPmethoddefinedbyRFC3515(SessionInitiationProtocol ReferMethod).TheREFERmethodindicatesthattherecipientoftheREFERrequestshouldcontact athirdpartyusingthecontactinformationprovidedintheREFERrequest.RFC3515providesa mechanismallowingthepartythatissendingtheREFERtobenotifiedoftheoutcomeofthe referencedrequestwithaNOTIFYrequest.Thisimplementationusessubscriptionobjectsfor REFERimplementation.ItreplacesthepreviousREFERimplementationandisintroduceddueto standardmodifications. 6.Client-sideforking inpreviousSIPToolkitversions,ifarequestwasforked,theSIPStackonthe clientsideautomaticallyconnectedthefirstestablisheddialog,anddidnotallowtheapplicationto chooseadifferentdialogorconnectmultipledialogs.Inthecurrentversion,theCall-legand Subscriptionmoduleswereenhancedtoallowthisflexibility. 7.Mergingdisabling ifaproxyforksarequestandeventuallythetworequestsareterminatedatthesameUserAgentServer(UAS),theUASneedstomergethemintoonerequest.TherearecaseswheretheUASisagatewayandthereforewillwanttoavoidthemessagemerging.Thisflexibilityiscurrentlyavailable. 8.TransportLayerenhancements twofunctionalitieswereadded.Anapplicationcannowblockincomingconnectionsevenbeforedatawasreceivedonthem.Thisletstheapplicationimplementawhite/blackIPaddresslistandhandlethedenialofserviceattacksinabetterway.Accesstotheincomingrawbuffersothattheapplicationcandumpbuffertofileordiscardthebuffer,forexample. 9.A-synchronousDNS DNSfunctionalitywasenhancedandisnowa-synchronous,improvingperformanceespeciallyformulti-sessionapplicationssuchasgatewaysandservers. 10.DNSserverruntimeconfiguration insomecases,itisrequiredtochangetheDNSserverthatisbeingusedatruntime.ThisisnowpossibleviatheSIPToolkitAPIs. 11.ManualPRACK theapplicationcannowcontrolthesendingofPRACK/200.Thisisanadditiontotheautomaticfunctionalityavailableinpreviousversions. 12.Primitivescompilationflag thisnewcompilationflagreplacestheEXTRA_LEANcompilationflag.Itremovesthedialoglayer,allowingapplicationtoworkdirectlyabovetheTransactionlayer.Additionally,itremovesspecificsupportofcertainheaders.Theapplicationcanstillusetheseheadersbyaddingspecificsupportintheapplicationitself. 13.MiddleLayerforlow-levelservices theRADVISIONoperatingsystemabstractionlayerwaswrappedandsomeofitsAPIsarenowexposedsotheapplicationcanuseservicessuchastimersandselect. 14.Viaheadercontrol someimplementations,suchaswhenusingaSTUN/TURNserver,requiremanualmodificationoftheViaheaderafterDNSwascompleted.Thiscontrolandflexibilityisnowpossible. 15.Subscriptionhighavailability theRADVISIONSIPStackprovidesastoreandrestoremechanismthatenablestheapplicationtobackupsubscriptionsintheACTIVEstate.Backingupsubscriptionsletsapplicationdevelopersimplementredundancycapabilitiesintheirsystems,allowingback-upsystemsto“takeover”whentheprimarysystemgoesdown.Whenstoringanactivesubscription,allofthesubscriptionparametersarecopiedintoaconsecutivebuffer.Theapplicationcanthensavethisbufferanduseitwhenrestoringthebackupobject. 16.Authenticationenhancement theauthenticationmechanismenablesaUserAgentClient(UAC)toproveauthenticitytoserversorproxieswhichrequireauthentication.TheSIPStacksupportsSIPauthenticationusingtheHTTPDigestSchemeasdescribedinRFC3261andRFC2617.Inthecurrentversion,supportofthe“auth-int”qualityofprotection(qop)wasadded.Forserver-sideauthentication,only“auth”qopissupported. 17.RequirementsforEnd-to-MiddleSecurityfortheSessionInitiationProtocol(SIP)【rfc4189】 ASessionInitiationProtocol(SIP)UserAgent(UA)doesnotalways trustallintermediariesinitsrequestpathtoinspectitsmessage bodiesand/orheaderscontainedinitsmessage.TheUAmightwantto protectthemessagebodiesand/orheadersfromintermediaries,except thosethatprovideservicesbasedonitscontent.Thissituation requiresamechanismcalled"end-to-middlesecurity"tosecurethe informationpassedbetweentheUAandintermediaries,whichdoesnot interferewithend-to-endsecurity.Thisdocumentdefinesasetof requirementsforamechanismtoachieveend-to-middlesecurity 18.TheStreamControlTransmissionProtocol(SCTP)asaTransportfortheSessionInitiationProtocol(SIP)【rfc4168】 ThisdocumentspecifiesamechanismforusageofSCTP(theStream ControlTransmissionProtocol)asthetransportmechanismbetweenSIP (SessionInitiationProtocol)entities.SCTPisanewprotocolthat providesseveralfeaturesthatmayprovebeneficialfortransport betweenSIPentitiesthatexchangealargeamountofmessages, includinggatewaysandproxies.AsSIPistransport-independent, supportofSCTPisarelativelystraightforwardprocess,nearly identicaltosupportforTCP 19.SessionInitiationProtocol(SIP)-H.323
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 05 sip字段说明 sip 字段 说明