资源预览内容
第1页 / 共51页
第2页 / 共51页
第3页 / 共51页
第4页 / 共51页
第5页 / 共51页
第6页 / 共51页
第7页 / 共51页
第8页 / 共51页
第9页 / 共51页
第10页 / 共51页
亲,该文档总共51页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
SIPSIP协议原理及实例分析协议原理及实例分析HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.学习目标学习目标学习完此课程,您将会:学习完此课程,您将会:了解SIP协议原理掌握SIP命令和消息掌握SIP协议的消息交互过程了解SIP业务基本故障分析处理方法Page 2HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.第第第第1 1章章章章 SIPSIP协议原理协议原理协议原理协议原理第第2章章 SIP命令和消息命令和消息第第3章章 业务流程分析业务流程分析Page 3HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议概念协议概念SIP的前世的前世SIP的前世的前世p 有关SIP的完整定义最早出现在 1999 年公布的RFC 2543中,当前SIP详细定义于RFC 3261 (June 2002)。pMulti-Party Multimedia Working Group于1996年提出两项关于在Internet 中实现多媒体通信的建议: Session Initiation Protocol (SIP) Simple Conference Invitation Protocol (SCIP)p最终两项建议统一于Session Initiation Protocol SIP。Page 4HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议概念协议概念pSIP是Session Initialization Protocol (会话初始协议)的缩写,用来建立、更改和终止一个或者多个参与者的会话。这些会话包括多媒体会议、网络呼叫等。pIETF制订的多媒体通信系统框架协议之一, 但是SIP 单独不能完成多媒体呼叫,必须要与其他协议一起才能组建完整的多媒体通信系统,与RTP/RTCP、SDP等协议配合共同完成多媒体会话过程。Page 5HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议功能描述协议功能描述p用户定位:确定参加通信的终端用户的位置。p用户通信能力协商:确定通信的媒体类型和参数 。p用户交互意愿:确定被叫加入通信的意愿。 p呼叫建立:建立主叫和被叫的会话参数。p呼叫处理和控制:包括呼叫重定向、呼叫转移、终止呼叫等。Page 6HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议特点协议特点l借鉴了其他internet标准和协议的设计思想,在风格上遵循因特网一贯坚持的简练、开放、兼容和可扩展等原则 ,并充分注意到因特网开放而复杂的网络环境下的安全问题;l充分考虑了对传统公共电话网的各种业务,包括IN业务(Internet)和ISDN业务的支持;l通过代理和重定向请求用户当前位置,以支持用户的移动性;l独立于传输层协议,可以承载在不同的传输协议上(UDP、TCP、SCTP、TLS),因此可以灵活方便地扩展其他附加功能;lSIP协议独立于业务,协议不限制具体业务范畴,只描述建立/更改/终止一个会话,并不描述会话的内容,所以可以承载任何的会话内容,如语音/视频/游戏等。Page 7HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP与与H.248对比对比SIPH248StandardsIETF/TISPANITU_T /TISPANArchitectureDistributed/Intelligent clientsCentralized/ Dumb end_pointCall controlProxy/Redirect ServerCall agent/MGCEndpointsUser agentMedia gatewaySignaling transportUDP/TCP/SCTPUDP/TCP/SCTPMultimedia capableYesYesSupplemental serviceProvided by endpoints or by call control Provided by call controlISDN serviceNot defined in TISPAN R1Use IUA supportV5.X serviceNot defined in TISPAN R1use V5UA supportPage 8HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议的应用协议的应用 SIP协议的典型应用lIP电话(VoIP)l移动游戏l即时通信l视频与协调SIP扩展应用l3G WCDMA IMSPage 9HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议栈协议栈物理层物理层链路层链路层网络层网络层传输层传输层会话层会话层表示层表示层应用层应用层物理层物理层链路层链路层网络层网络层传输层传输层应用层应用层p在TCP/IP五层模型中属于应用层协议p在OSI七层模型中属于会话层协议Page 10HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议在网络中的位置协议在网络中的位置Page 11HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议在协议在NGN中的实现中的实现SoftX3000SoftPhoneSoftX3000SoftPhoneSIPSIPSIPIPIPIPIPIP CorePage 12HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP在网络中的主要实体在网络中的主要实体pSIP 在网络中存在多种逻辑实体,不同实体作用互不相同:UA(User Agent)Proxy serverRegistrar serverRedirect serverLocation serverp不同的逻辑实体可以存在于同一个物理实体之上。Page 13HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP在网络中的主要实体在网络中的主要实体p用户助理( User Agent ):用来发起或者接收请求的逻辑实体称为User Agent。l 用户助理客户(User Agent Client):发起请求的一方称为UAC,SIP Phone就是UAC的一种实际形态;l 用户助理服务器(User Agent Server):接收请求,产生响应的一方称为UAS,SoftX3000就是UAS的一种实际形态。l UAC和UAS的划分是针对一个事务而言的。p代理服务器:作为一个逻辑网络实体代表客户端转发请求或者响应,可以同时作为客户端和服务器端。主要功能有:路由、认证鉴权、计费控制、呼叫控制、业务提供等。它可以采取分支,循环,递归查询等方式向多个地址尝试转发请求。 SoftX3000兼任代理服务器的角色。它有三种形态:lStateless:其作用为一般的路由器lTransaction Stateful:关联一次事务过程lCall Dialog:关联一次会话过程Page 14HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP在网络中的主要实体在网络中的主要实体p注册服务器:接收注册请求的服务器,需要将注册请求中的地址映射关系保存到数据库中,供后续的相关呼叫过程使用,同时可以提供定位服务。 SoftX3000兼任注册服务器的角色。p重定向服务器:为所收到的请求返回一个或多个新的地址,客户端直接向这些新的地址发起请求。重定向服务器并不接收或者拒绝呼叫,主要完成路由功能,与注册过程配合可以支持SIP终端的移动性。 SoftX3000兼任重定向服务器的角色。p定位服务器:提供被叫位置的服务器, SoftX3000兼任定位服务器的角色。Page 15HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.相关术语相关术语p呼叫:一个呼叫是由一个公共源端所邀请的在一个会议中的所有参加者组成,由一个全球唯一的Call-ID进行标识。例如:由同一个源邀请的一个会议的所有参加者构成一个呼叫;点到点IP电话会话是一种最简单的会话,它映射为单一的SIP呼叫。通常情况下,呼叫由主叫方创建,但是更一般说来,呼叫可由并不参与媒体通信的第三方创建,此时会话的主叫方和会话的邀请方并不相同。p事务:SIP是一个客户/服务器协议。客户和服务器之间的操作从第1个请求至最终响应为止的所有消息构成一个SIP事务。一个正常的呼叫一般包含三个事务。其中,呼叫启动包含两个操作请求:邀请(Invite)和证实(ACK),前者需要回送响应,后者只是证实已收到最终响应,不需要回送响应。呼叫终结包含一个操作请求:再见(Bye)。Page 16HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.相关术语相关术语pSIP URL:为了能正确传送协议消息,SIP还需解决两个重要的问题。一是寻址,即采用什么样的地址形式标识终端用户;二是用户定位。SIP 沿用WWW技术解决这两个问题。p寻址采用SIP URL(Uniform Resource Locators),按照RFC2396规定的URI导则定义其语法,特别是用户名字段可以是电话号码,以支持IP电话网关寻址,实现IP电话和PSTN的互通。Page 17HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.相关术语相关术语 SIP URL的一般结构为: SIP:用户名:口令主机:端口;传送参数;用户参数;方法参数;生存期参数;服务器地址参数 “SIP”表示需采用SIP 协议和所指示的端系统通信。“用户名”可以由任意字符组成,一般可取类似与E-mail 用户名形式,也可以是电话号码(SoftX3000 目前用户名是电话号码)。“口令”可以置于SIP URL 中,但一般不建议这样做,因为其安全性是有问题的。“主机”可为主机域名或IPv4 地址。“端口”指示请求消息送往的端口号,其缺省值为5060,即公开的SIP 端口号。“传送参数”指示采用TCP 还是UDP 传送,缺省值为UDP。“用户参数”,SIP URL 的一个特定功能是允许主机类型为IP 电话网关,此时,用户名可以为一般的电话号码。由于BNF 语法表示无法区分电话号码和一般的用户名,因此,在域名后增加了“用户参数”字段。该字段有两个可选值:IP 和电话,当其设定为“电话”时,表示用户名为电话号码,对应的端系统为IP 电话网关。“方法参数”指示所用的方法“生存期参数”指示UDP 多播数据包的寿命,仅当传送参数为UDP、服务器地址参数为多播地址时才能使用。“服务器地址参数”指示和该用户通信的服务器的地址,它覆盖“主机”字段中的地址,通常为多播地址。 “传送参数”、 “方法参数”、“生存期参数”和“服务器地址参数”均属于URL参数,只能在重定向地址,即后面所说的Contact字段中才能使用。Page 18HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.相关术语相关术语 下面给出若干个SIP URL的示例: Sip:55500200191.169.1.112; 55500200为用户名,191.169.1.112 为IP电话网关的IP地址。 Sip:55500200 191.169.1.112 :5061; User=phone; 55500200为用户名, 191.169.1.112为主机的IP 地址,5061为主机端口号。用户参数为“电话”,表示用户名为电话号码。 Sip:aliceregistrar.com; method=REGISTER; Alice为用户名,registrar.com为主机域名。方法参数为“登记”。需要注意的是SoftX3000目前只支持用户名是电话号码,不支持这种形式的用户名。 Sips:123410.110.25.239 SIPS 表示安全的SIP URI,传输层使用的是基于安全的TLS协议。Page 19HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.问题问题SIP有哪些网络实体?它们的功能是什么?SIP协议的协议栈模型是怎样的?Page 20HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.第第1章章 SIP协议原理协议原理第第第第2 2章章章章 SIPSIP命令和消息命令和消息命令和消息命令和消息第第3章章 业务流程分析业务流程分析Page 21HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.SIP协议消息的分类协议消息的分类pSIP消息采用文本方式编码,分为两类:请求消息和响应消息。p请求消息和响应消息都包括SIP头字段和SIP消息字段。 请求消息和响应消息在形式上的区别仅在消息的第一行,请求的第一行为请求行,响应的第一行为状态行。Page 22HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.请求消息请求消息p请求消息:客户端为了激活按特定操作而发给服务器的SIP消息。 RFC3261定义了六个基本方法,包括INVITE,ACK, OPTIONS, BYE, CANCEL, REGISTER。后续RFC扩展了其他的请求方法,包括UPDATE,INFO,SUBSCRIBER,NOTIFY,MESSAGE,PRACK,REFER。请求消息消息含义INVITE发起会话请求,邀请用户加入一个会话,会话描述含于消息体中。常用ACK证实已收到对于INVITE请求的最终响应。该消息仅和INVITE消息配套使用。常用BYE结束会话。常用CANCEL取消尚未完成的请求,对于已完成的请求(即已收到最终响应的请求)则没有影响REGISTER用于UAC在UAS上的注册,完成地址绑定OPTIONS查询对端能力或状态 做心跳Page 23HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.请求消息格式请求消息格式p请求消息由起始行、消息头和消息体组成。通过换行符区分消息头中的每一条参数行。对于不同的请求消息,有些参数可选。Page 24HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.响应消息响应消息p 响应消息:用于对请求消息进行响应,指示呼叫的成功或失败状态。不同类的响应消息由状态码来区分。状态码包含三位整数,状态码的第一位用于定义响应类型,另外两位用于进一步对响应进行更加详细的说明。序号状态码消息功能1xx临时响应表示已经接收到请求消息,正在进行处理2xx成功响应表示请求已经被成功接受、处理3xx重定向响应指引呼叫者重新定向另外一个地址4xx客户端出错表示请求消息中包含语法错误或者SIP服务器不能完成对该请求消息的处理5xx服务器端出错表示服务器故障不能完成对消息的处理6xx全局错误表示请求不能在任何SIP服务器上实现p除1XX外其余都是最终响应。Page 25HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.响应消息格式响应消息格式p对于不同的响应消息,有些参数可选。Page 26HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.消息的头域消息的头域p5个必须包含在每个SIP消息中的头域:lCall-IDlFromlTolCSeqlViapCall-ID :用于唯一标识一次会话,一般格式为: Call-ID: 本地标识主机 主机应为全局域名或者全局IP地址,此时本地标识可由在主机范围内唯一的URI字符组成。否则,本地标识必须是全局唯一的,以保证Call-ID的全局唯一性。 举例:Call-Id: call-973636852-4191.169.150.101Page 27HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.消息的头域消息的头域pFrom :用于标识请求的发起者,服务器将此字段从请求消息中复制到响应消息,一般格式为: From:显示名;tagXXXX 显示名为用户界面上显示的字符,如果系统不予显示,应置显示名为“匿名”。 Tag称为标记,为16进制数字串,中间可带连字符“”。当两个共享同一SIP地址的用户实例用相同的Call-ID发起呼叫时,就需用此标记予以区分。标记值必须全局唯一,用户在整个呼叫期间应保持相同的Call-ID和标记值。 举例: From: 123456 ;tag=a48sPage 28HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.消息的头域消息的头域pTo :用于表示请求的接收者,其格式和From相同,仅第一个关键字不同; To:显示名;tagXXXX Tag可用于区分由同一SIP URL标识的不同的用户实例。由于代理服务器可以并行分发请求,同一请求可能到达用户的不同实例,每个实例都可能响应,因此需用标记来区分来自不同实例的响应。To字段中的标记是由每个实例置于响应消息中的。 举例: To: ;tag=62beb3ca 在SIP 中,Call-ID、From 和To 三个字段标识一个呼叫分支。在代理服务器并行分发请求时,一个呼叫可能会有多个呼叫分支。Page 29HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.消息的头域消息的头域pCSeq :用于表示请求的顺序号, UAC在每个请求中加入此字段,一般格式为: CSeq:序号 消息名称 序号由UAC选定,在Call-ID范围内唯一确定,序号初值可为任意值,其后具有相同Call-ID值但不同命令名称、消息体的请求,其CSeq序号应加1。重发请求的序号保持不变。服务器将请求中的CSeq值复制到响应消息中,用于将请求和其触发的响应关联起来。 ACK和CANCEL请求的CSeq值和对应的INVITE请求相同,BYE请求的CSeq序号应大于INVITE请求。 由代理服务器并行分发的请求,其CSeq值相同。 严格来说, CSeq对于任何可由BYE或CANCEL请求取消的请求以及客户可连续发送多个具有相同Call-ID请求的情况都是需要的,其作用是判断响应和请求的对应关系。 举例: CSeq : 4711 INVITEPage 30HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.消息的头域消息的头域pVia :用以指示请求历经的路径,它可以防止请求消息传送产生环路,并确保响应和请求消息选择同样的路径,以保证通过防火墙或满足其他特定的选路要求。对于请求:每个SIP实体前传请求时,都将自己的地址放到当前的Via集的最上面,与此类推,当请求到达UAS端时,在SIP 消息中将会形成一个类似于堆栈的Via头域集。对于响应:UAS 将请求中的Via地址原样拷贝到响应里面,当Proxy接收到响应时,检查顶端的Via是否是自己,如果是,将顶端的Via删除,并检查下一个Via地址将响应发送到下一个Via地址,如果没有下一个Via地址,则表示这个响应应该到Proxy这儿终结。Address: BAddress: CAddress: DVia: AVia: BVia: AVia: CVia: BVia: AVia: CVia: BVia: AVia: BVia: AVia: ARequestResponseAddress: APage 31HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.消息的头域消息的头域pVia字段的一般格式: Via:发送协议 发送方;隐藏参数;生存期参数;多播地址参数;接收 方标记,分支参数 发送协议的格式为:协议名/协议版本/传输层协议。协议名和传输层协议的缺省值为SIP和UDP。 发送方为发送方的域名或主机IP和端口号,如果采用默认端口号5060,端口号可以缺省。 隐藏参数表示该字段已由上有代理予以加密,以提供隐私服务。 分支参数用于代理服务器并行分发请求时标记各个分支,当响应达到时,代理可判定是哪一分支的响应。 举例: Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKkjshdyff Via:SIP/2.0/UDP 10.0.0.1:5060;Page 32HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.其他重要消息头域其他重要消息头域pMax-Forwards:用于定义一个请求达到其目的地所允许经过的中转站的最大值。请求每经过一个中转站,该值减1。如果该值为0时该请求还没有达到其目的地,服务器将返回483响应并终止这个请求。 该字段的目的主要是为了出现环路时不会一直消耗代理服务器的资源,它的初始值为70。它的一般格式为: Max-Forwards:十进制整数 请求消息中必须包括Max-Forwards头域。Page 33HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.其他重要消息头域其他重要消息头域pContact:用于INVITA、ACK和REGISTER请求以及成功响应、呼叫进展响应和重定向响应消息,其作用是给出其后和用户直接通信的地址。 INVITE和ACK请求中的Contact字段指示该请求发出的位置。它使被叫可以直接将请求(如BYE请求)发往该地址,而不必借助Via字段经由一系列代理服务器返回。 对INVITE请求的成功响应消息可包含Contact字段,它使其后的请求(如ACK请求)可直接发往该字段给定的地址。该地址一般是被叫主机的地址。 REGISTER请求中的Contact字段指明用户当前位置,REGISTER请求的成功响应消息中的Contact字段返回该用户当前可达的所有位置。 重定向响应消息中的Contact字段给出供重试的其它地址,可用于对BYE、INVITE和OPTIONS请求的响应消息。Page 34HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.其他重要消息头域其他重要消息头域pContact字段的一般格式为: Contact:地址;q参数;动作参数;失效参数;扩展属性 地址的表示形式和To,From字段相同。 q参数的取值范围为【0,1】,指示给定位置的相对优先级,数值越大,优先级越高。 动作参数仅用于REGISTER请求,它表明希望服务器对其后至该客户的请求进行代理服务还是重定向服务,如果未含此参数,则取决于服务器的配置。 失效参数表示该注册的失效时间。 举例: Contact: ;q=0.7;Page 35HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.其他消息头域其他消息头域pAuthorization:包含某个终端的鉴权证书。它的一般格式为: Authorization:认证方式USERNAME,REALM,NONCE,RESPONSE,URI,CNONCE,ALGORITHM 认证方式有DIGEST、BASIC、CHAP-PASSWORD、CARDDIGEST等认证方式。DIGEST为HTTP-DIGEST认证方式。目前SoftX3000只支持HTTP-DIGEST方式。 USERNAME表示被认证的用户的用户名。 REALM用于标识发起认证过程的域。 NONCE由发起认证过程的实体产生的加密因子。 RESPONSE终端在收到服务器的认证请求后根据服务器端产生的NONCE、用户名、密码、URI等信息经过一定的算法生成的一个字符串。该字符串中包含了经过加密后的用户密码。(在认证过程中除用户密码之外其他信息都会通过SIP消息以明文的方式在终端和服务器端进行传递。)Page 36HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.其他消息头域其他消息头域 URI为发起呼叫请求消息中的Request-URI。由于终端在收到认证请求后需要重新向服务器端发起请求(其中带有认证响应信息)。该请求消息在经过网络服务器时某些字段包括RequestURI都有可能被修改。认证头域的URI参数用于传递终端发起请求时原始消息的Request-URI用于对认证信息进行认证,这样才能保证认证过程的正确性。 CNONCE:如果在服务器端超时后终端才向服务器返回了带有认证响应的新的请求消息,则服务器端需要重新产生NONCE重新对用户进行认证。其中NONCE中带有新的NONCE,老的NONCE会通过CNONCE参数返回给终端。 举例: Authorization: DIGEST USERNAME=“6540012”, REALM=“huawei.com”, NONCE=200361722310491179922, RESPONSE=b7c848831dc489f8dc663112b21ad3b6, URI=sip:191.169.150.30Page 37HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.其他消息头域其他消息头域pAllow:给出代理服务器支持的所有请求消息类型列表。 举例: Allow: INVITE, ACK, OPTIONS, CANCEL, BYEpContent-Length:表示消息体的大小,为十进制值。如果消息中没有消息体,则Content-Length 头字段值必须设为0。 举例: Content-Length: 349,表示消息体的长度为349 个字节pContent-Type:表示发送的消息体的媒体类型。如果消息体不为空,则必须存在Content-Type 头字段。 举例: Content-Type: application/sdppSupported:SIP 协议中定义的100 类临时响应消息的传输是不可靠的,即UAS 发送临时响应后并不能保证UAC 端能够接受到该消息。100rel 扩展为100 类响应消息的可靠传输提供了相应的机制。如果UAC支持该扩展,则在发送的消息中增加Supported:100rel 头域和字段。 举例: Supported: 100relPage 38HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.请求消息实例请求消息实例INVITE sip:66500002191.169.1.110 SIP/2.0From: ;tag=1ccb6df3To: CSeq: 1 INVITECall-ID: 20973e49f7c52937fc6be224f9e52543sx3000Via: SIP/2.0/UDP 191.169.1.116:5061;branch=z9hG4bkbc427dad6Contact: Supported: 100rel,100relMax-Forwards:70Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, PRACK, INFO, UPDATE, SUBSCRIBE, NOTIFY, MESSAGE, REFERContent-Length:230Content-Type: application/sdpv: 0o: HuaweiSoftX3000 1073741831 1073741831 IN IP4 191.169.1.116s: Sip Callc: IN IP4 191.169.1.95t: 0 0m: audio 30000 RTP/AVP 8 0 4 18a: rtpmap:8 PCMA/8000a: rtpmap 0 PCMU/8000a: rtpmap 4 G723/8000a: rtpmap 18 G729/8000请求起始行。INVITE 请求消息。请求URI,即被邀用户的当前地址为“sip:66500002191.169.1.110”。SIP 版本号为2.0 From 字段。指明请求发起方的地址为“”。标记为“1ccb6df3”,用于共享同一SIP 地址的不同用户用相同的Call-ID 发起呼叫邀请时,对用户进行区分。To 字段。指明请求接收方的地址为“”。从From 和To 字段,我们可以看出:IP 地址为191.169.1.116 的PROXY 控制下的终端44510000 拨打IP 地址为191.169.1.110 的PROXY 控制下的66500002 终端。终端类型可以为SIP、H.323、IAD/AG 下挂的ESL 等。Cseq 字段。用于将INVITE 请求和其触发的响应、对应的ACK、CANCEL 请求相关联。Call-ID 字段。该字段唯一标识一个特定的邀请,全局唯一。Call-ID为“20973e49f7c52937fc6be224f9e52543sx3000”,sx3000 为发起呼叫的SoftX3000 的域名, 20973e49f7c52937fc6be224f9e52543 为本地标识。:Via 字段。该字段用于指示该请求历经的路径。“SIP/2.0/UDP”表示发送的协议,协议名为“SIP”,协议版本为2.0,传输层为UDP;“191.169.1.116:5061”表示发送方SoftX3000 IP 地址为191.169.1.116,端口号为5061;“branch=z9hG4bkbc427dad6”为分支参数, SoftX3000 并行分发请求时标记各个分支。Contact 字段。指示其后的请求(如BYE 请求)可以直接发往,而不必借助Via 字段。100rel 扩展,该字段为100 类响应消息的可靠传输提供了相应的机制Max-Forwards 字段。表示该请求到达其目的地址所允许经过的中转站的最大值为70。Allow 字段。给出IP 地址为191.169.1.116 的SoftX3000 支持的请求消息类型 列表。Content-length字段,给出消息体的长度为230个字节Content-Type 字段,表示消息中携带的消息体是单消息体且为SDP。SDP 协议版本号,目前为0 版本。会话拥有者/创建者和会话标识,用于给出会话的发起者(其用户名和用户主机地址)以及会话标识和会话版本号。“HuaweiSoftX3000”为用户名,用户名是用户在发起主机上的登录名。第一个“1073741831”为会话标识。第二个“1073741831”为版本号。“IN”指网络类型,目前规定的“IN”为Inernet。“IP4”指地址类型,目前已定义的有“IP4”和“IP6”两种。“191.169.1.116”为创建会话的主机的IP 地址。会话名。每个会话描述必需有一个且只有一个会话名。连接数据。网络类型和地址类型目前的定义值仅限于IN 和IP4。“191.169.1.95”为SoftX3000(IP 地址:191.169.1.116)控制下的MG 的IP 地址(终端类型为IAD/AG 下挂的ESL 电话)或SIP、H.323 终端的IP 地址(终端类型为SIP、H.323 电话)。时间描述,给出会话激活的时间区段,允许会话周期性发生。媒体级描述, “audio”表示媒体类型为音频。目前定义的媒体类型有5 种:音频、视频、应用、数据和控制。“30000”指明媒体流发往的传送层端口,即MG 的UDP 端口号(终端类型为IAD/AG 下挂的ESL 电话)或SIP、H.323 终端的UDP 端口号(终端类型为SIP、H.323 电话)。“RTP/AVP”为传送层协议,其值和“c”行中的地址类型有关,对于IP4 来说,大多数媒体业务流都在RTP/UDP 上传送,已定义如下两类协议:RTP/AVP,音频/视频应用文档,在UDP 上传送;Udp,UDP 协议。“8 0 4 18”对于音频和视频来说,就是RTP 音频/视频应用文档中定义的媒体静荷类型。表示会话中所有这些格式都可能被用到,但第一个格式是会话的缺省格式。rtpmap 属性行,指明从RTP 静荷类型至编码的映射关系。该行的格式为:a: rtpmap:/。其中,指的就是音频信道数,对于视频信号尚无编码参数。Page 39HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.问题问题SIP协议定义了哪些基本请求消息,请求消息的格式是怎样的?SIP请求消息中必须包含哪些头域,它们的作用是什么?Page 40HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.第第1章章 SIP协议原理协议原理第第2章章 SIP命令和消息命令和消息第第第第3 3章章章章 业务流程分析业务流程分析业务流程分析业务流程分析Page 41HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.第第第第3 3章章章章 业务流程分析业务流程分析业务流程分析业务流程分析 第第第第1 1节节节节 注册流程注册流程注册流程注册流程 第第第第2 2节节节节 两个两个两个两个UACUAC之间的呼叫流程之间的呼叫流程之间的呼叫流程之间的呼叫流程Page 42HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.注册流程注册流程 用户每次开机时都需要向服务器注册,当SIP Client的地址发生改变时也需要重新注册,注册信息必须定期刷新,通常注册服务器将注册信息保存到定位服务器中。Page 43HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.注册过程(实例)注册过程(实例)REGISTER sip:164.135.20.51;transport=udp SIP/2.0Via: SIP/2.0/UDP 164.135.20.55:5060;branch=z9hG4bK24d79975663f90c893883f21dRoute: Call-ID: 2aff391ab79bf4cd9c762716949cd68eFrom: ;tag=0589c28eTo: CSeq: 1 REGISTERContact: Expires: 600Accept: application/sdp,application/mwi,application/reginfo+xml,application/simservs+xmlSupported: 100rel,replaces,timer,privacyAccept-Encoding: identityAccept-Language: enAllow: INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,UPDATE,MESSAGE,REFERMax-Forwards: 70Content-Length: 0SIP/2.0 200 OKVia:SIP/2.0/UDP 164.135.20.55:5060;branch=z9hG4bK24d79975663f90c893883f21dFrom:;tag=0589c28eTo:Call-ID:2aff391ab79bf4cd9c762716949cd68eCSeq:1 REGISTERContact:;q=0.5;expires=599Content-Length:0Page 44HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.带认证请求的注册流程带认证请求的注册流程SoftX3000SIP Phone401 UnauthorizedREGISTER200 OKREGISTER终端发起请求时如果服务器端需要对用户进行认证,那么会在本地产生本次认证的NONCE,并且通过认证请求头域(Authorization)将所有必要的参数返回给终端从而发起对用户认证过程。终端收到认证请求消息后根据服务器端返回的信息和用户配置等信息采用特定的算法生成加密的RESPONSE,并且通过新的请求消息发送给服务器端。服务器端在收到带有认证响应的新的请求消息后首先检查NONCE的正确性。如果NONCE不是本地产生,则直接返回失败。否则如果NONCE是本地产生,但是认证过程已经超时,则服务器端会重新产生NONCE并重新发起对用户的认证过程。其中老的NONCE 会通过CNONCE参数返回。 NONCE 验证通过后服务器端会根据NONCE、用户名、密码(服务器端可以根据本地用户信息获取用户的密码)、URI等采用和终端相同的算法生成RESPONSE,并且对此RESPONSE 和请求消息中的RESPONSE进行比较,如果二者一致则用户认证成功,否则认证失败。Page 45HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.带认证请求的注册流程(实例)带认证请求的注册流程(实例)SIP-Call: AliceSIP-Call: Domain.comREGISTER sip:191.169.150.30 SIP/2.0From: sip:6540012191.169.150.30;tag=16838c16838To: sip:6540012191.169.150.30;tag=946e6f96Call-Id: 1-reg191.169.150.251Cseq: 2762 REGISTERContact: sip:6540012191.169.150.251Expires: 100Content-Length: 0Accept-Language: enSupported: sip-cc, sip-cc-01, timerUser-Agent: Pingtel/1.2.7 (VxWorks)Via: SIP/2.0/UDP 191.169.150.251SIP/2.0 401 UnauthorizedFrom: ;tag=16838c16838To: ;tag=946e6f96CSeq: 2762 REGISTERCall-ID: 1-reg191.169.150.251Via: SIP/2.0/UDP 191.169.150.251WWW-Authenticate: Digest realm=huawei.com,nonce=200361722310491179922Content-Length: 0REGISTER sip:191.169.150.30 SIP/2.0From: sip:6540012191.169.150.30;tag=16838c16838To: sip:6540012191.169.150.30;tag=946e6f96Call-Id: 1-reg191.169.150.251Cseq: 2763 REGISTERContact: sip:6540012191.169.150.251Expires: 100Content-Length: 0Accept-Language: enSupported: sip-cc, sip-cc-01, timerUser-Agent: Pingtel/1.2.7 (VxWorks)Authorization: DIGEST USERNAME=6540012, REALM=huawei.com, NONCE=200361722310491179922, RESPONSE=b7c848831dc489f8dc663112b21ad3b6, URI=sip:191.169.150.30Via: SIP/2.0/UDP 191.169.150.251SIP/2.0 200 OKFrom: ;tag=16838c16838To: ;tag=946e6f96CSeq: 2763 REGISTER Call-ID: 1-reg191.169.150.251Via: SIP/2.0/UDP 191.169.150.251Page 46HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.第第第第3 3章章章章 业务流程分析业务流程分析业务流程分析业务流程分析 第第第第1 1节节节节 注册流程注册流程注册流程注册流程 第第第第2 2节节节节 两个两个两个两个UACUAC之间的呼叫流程之间的呼叫流程之间的呼叫流程之间的呼叫流程Page 47HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.同一个同一个SoftX3000控制下的两个控制下的两个UAC之间的呼叫之间的呼叫SoftX3000SIP Phone ASIP Phone BINVITE100 Trying407INVITEACKINVITE100 Trying100 Trying180 Trying180 Trying200 OK200 OKACKACKCONVERSATIONBYE487BYE200 OKPage 48HUAWEI TECHNOLOGIES CO., LTD.Huawei Confidential Slide title :32-35pt Color: R153 G0 B0Corporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialSlide text :20-22ptBullets level 2-5: 18pt Color:BlackCorporate Font :FrutigerNext LT MediumFont to be used by customers and partners : ArialTop right corner for field-mark, customer or partner logotypes. - The following nine groups of colors are an example of how our design colors can be used, please take note that you should only use one design color group per slide. For specific usage details, refer to the “Typesetting Standard”.总结总结SIP协议用于建立、修改并终止多媒体会议,如互联网电话会议。SIP请求消息:这是客户端为了激活按特定操作而发给服务器的SIP消息,包括INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER消息。SIP响应消息:这是服务器为了显示客户发给服务器的请求的状态,包括1xx、2xx、3xx、4xx、5xx、6xx响应。SIP呼叫流程中各命令的作用应重点掌握。UAC注册流程及两个UAC之间正常通话的完整流程应该重点掌握。Page 49Thank youwww.huawei.com结束结束
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号