文档详情

解码转发协议.doc

发布:2017-06-09约1.19万字共21页下载文档
文本预览下载声明
解码转发协议 篇一:SIP协议讲解 SIP 协议讲解SIP 工作架构原理简介RTP/RTCPSIP/SDPUDP/TCP IP图 1 协议结构图 SIP 协议是一种会话建立和控制的信令协议,SIP 协议本身不能实现多媒体的业务,SIP 协议和 SDP 协议,媒体流 RTP/RTCP 协议配合完成完整的多媒体会话业务。SIP Session 建立流程1. INVITE bob@ 2. INVITE bob@ 3. bob 4. 6. ACK 7. INVITE bob@ 8. INVITE bob@SIP Redirect amp; Location Servers (I) 3 SIP Proxy 2 5 6 7 () 11 10 12 9 8 () 4 SIP Proxy9. Ringing ok 10. Ringing ok 11. ACK 12. ACK5. Bob moved. Temporarily contact bob@1RTP Media SIP Client SIP Client (User Agent Server)图 2 会话建立流程图 SIP 协议介绍 SIP 基本概念Session: : 会话是媒体流数据和他们发送者和接收者的集合的概念由 SDP 中的 SESSION ID 定义 Dialog: 对等 SIP 实体间的 SIP 信令连接关系,由 from tag, to tag,call id 唯一标 识 User Agent Client (UAC)::创建新的 SIP 请求的逻辑实体 User Agent Server (UAS):接收 SIP 请求并回应响应的逻辑实体 PROXY :在 UAC 和 UAS 之间路由 SIP 消息的网络实体SIP 消息SIP 消息分为从客户机到服务器的请求消息以及从服务器到客户机的响应消息。 两种类型的 消息结构相似,虽然语义不尽相同。两种消息都有一个起始行(start line); 一个或多个头 字段( head fields);一个空行(empty line)表示头部的结束;还包括一个可选择的消息体 (message-body)。 generic-message = start-line * message-header CRLF [ message-body ] start-line = Request-Line / Status-Line 请求消息Request 中请求行: Request-Line = Method SP Request-URI SP SIP-Version CRLF 请求方法(Method)有六种: REGISTER 用来登记;INVITE,ACK,CANCEL 用来建立对话;BYE 用来结束对话; OPTIONS 用来咨询服务器的能力。 Request-URI: 是SIP 或SIPS URI,也支持“tel”URI,代表request 所请求的用户 或服务器。它的初始值可以被设成与to field 中URI 一致;一个比较特殊的情况是 register,它是被设成所要登记地址的location service 的域。在呼叫寻址的过程中可以 改写,在寻址过程中有详细介绍。 SIP-Version:表示request 和response 所使用的SIP 版本。 响应消息Response 中状态行: Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF 状态码(Status-Code)有: 1xx: Provisional -- request received, continuing to process the request; 2xx: Success -- the action was successfully received, understood, and accepted; 3xx: Redirection -- further action needs to be taken in order to complete the request; 4xx: Client Error -- the request contains bad syntax or cannot be fulfilled at this server; 5xx: Server Error -- the server failed to fulfill an apparently valid request; 6xx: Global Failure -- the request cannot be fulfilled at any server. 消息头字段(head field
显示全部
相似文档