首先看下sip原文中相关描述,详见RFC3261:
Alice's softphone sending an INVITE request addressed to Bob's SIP URI.atlanta.com  . . . biloxi.com.      proxy              proxy     ..                                       .Alice's  . . . . . . . . . . . . . . . . . . . .  Bob'ssoftphone                                        SIP Phone|                |                |                ||    INVITE F1   |                |                ||--------------->|    INVITE F2   |                ||  100 Trying F3 |--------------->|    INVITE F4   ||<---------------|  100 Trying F5 |--------------->||                |<-------------- | 180 Ringing F6 ||                | 180 Ringing F7 |<---------------|| 180 Ringing F8 |<---------------|     200 OK F9  ||<---------------|    200 OK F10  |<---------------||    200 OK F11  |<---------------|                ||<---------------|                |                ||                       ACK F12                    ||------------------------------------------------->||                   Media Session                  ||<================================================>||                       BYE F13                    ||<-------------------------------------------------||                     200 OK F14                   ||------------------------------------------------->||                                                  |Figure 1: SIP session setup example with SIP trapezoid  Alice sends INVITE :INVITE sip:bob@biloxi.com SIP/2.0Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhdsMax-Forwards: 70To: Bob <sip:bob@biloxi.com>From: Alice <sip:alice@atlanta.com>;tag=1928301774Call-ID: a84b4c76e66710@pc33.atlanta.comCSeq: 314159 INVITEContact: <sip:alice@pc33.atlanta.com>Content-Type: application/sdpContent-Length: 142(Alice's SDP not shown)   Bob sends 200 OK:SIP/2.0 200 OKVia: SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bKnashds8;received=192.0.2.3Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds ;received=192.0.2.1To: Bob <sip:bob@biloxi.com>;tag=a6c85cfFrom: Alice <sip:alice@atlanta.com>;tag=1928301774Call-ID: a84b4c76e66710@pc33.atlanta.comCSeq: 314159 INVITEContact: <sip:bob@192.0.2.4>Content-Type: application/sdpContent-Length: 131(Bob's SDP not shown)
The header fields are briefly described below:
Via contains the address (pc33.atlanta.com) at which Alice isexpecting to receive responses to this request.  It also contains abranch parameter that identifies this transaction.
To contains a display name (Bob) and a SIP or SIPS URI(sip:bob@biloxi.com) towards which the request was originallydirected.  Display names are described in RFC 2822.
From also contains a display name (Alice) and a SIP or SIPS URI(sip:alice@atlanta.com) that indicate the originator of the request.This header field also has a tag parameter containing a random string(1928301774) that was added to the URI by the softphone.  It is usedfor identification purposes.
Call-ID contains a globally unique identifier for this call,generated by the combination of a random string and the softphone'shost name or IP address.  The combination of the To tag, From tag,and Call-ID completely defines a peer-to-peer SIP relationshipbetween Alice and Bob and is referred to as a dialog.
CSeq or Command Sequence contains an integer and a method name.  TheCSeq number is incremented for each new request within a dialog andis a traditional sequence number.
Contact contains a SIP or SIPS URI that represents a direct route tocontact Alice, usually composed of a username at a fully qualifieddomain name (FQDN).  While an FQDN is preferred, many end systems donot have registered domain names, so IP addresses are permitted.While the Via header field tells other elements where to send theresponse, the Contact header field tells other elements where to sendfuture requests.
Max-Forwards serves to limit the number of hops a request can make onthe way to its destination.  It consists of an integer that isdecremented by one at each hop.
Content-Type contains a description of the message body (not shown).
Content-Length contains an octet (byte) count of the message body.The details of the session, such as the type of media, codec, orsampling rate, are not described using SIP.  Rather, the body of aSIP message contains a description of the session, encoded in someother protocol format.  One such format is the Session DescriptionProtocol (SDP) (RFC 2327).  This SDP message (not shown in theexample) is carried by the SIP message in a way that is analogous toa document attachment being carried by an email message, or a webpage being carried in an HTTP message.

事务(transaction):
SIP 事务由一个单个请求和这个请求的所有应答组成,这些应答包括了零个或者多个临时应答以及一个或者多个终结应答。在事务中,当请求是一个INVITE(叫做INVITE事务),当终结应答不是一个2xx应答的时候,事务还包括一个ACK。如果应答是一个2xx应答,那么ACK并不认为是事务的一部分。事务由5个必要部分组成:from、to、Via头中的branch参数、call-id和cseq

对话(Dialogs):
对话是表现为两个用户代理(UA)之间的持续一段时间的点对点的SIP关系。对话使得用户代理之间的消息顺序传递和两个用户代理之间的请求正确路由更加容易。对话可以认为是对SIP消息解释的上下文关系。一个对话在参与对话的UA中都有一个dialog ID作为标记,这个ID由Call-ID,和一个本地tag和远程tag组成,即Call-ID、from-tag以及to-tag三个值的组合能够唯一标识一次对话。
1)对于UAC来说,dialog ID中的Call-ID的值会填写到消息中的Call-ID域中,远程tag放在消息中的To的tag参数中,本地tag放在From的tag参数中。
2)对于UAS来说,dialog ID的Call-ID值放在消息的Call-ID头域中,远程tag放在From头域的tag中,本地tag放在To头域的tag参数中

会话(Session):
会话是一次通信过程中所有参与者之间的关联关系以及他们之间的媒体流的集合。只有当媒体协商成功后,会话才能被建立起来

INVITE请求抓包:

200 OK响应抓包:

sip事务、对话、会话相关推荐

  1. 安卓休眠唤醒ajax休线程,休眠无法获得远程服务器上当前线程的事务同步会话...

    我在类似问题上阅读了其他答案,但我没有找到解决我的问题的方法.我有一个Tomcat7服务器和一个使用Hibernate连接到我的PostgreSQL远程数据库的Spring应用程序. 我的框架版本: ...

  2. 据库中事务、会话、线程这几个概念是什么关系

    1.会话可以创建多个事务 比如:使用客端连接数据库,这样你就可以执行很多个事务了 2.一个事务只能由一个会话产生 在数据库里的事务,如果在执行的SQL都是由会话发起的,哪怕是自动执行的JOB也是由系统 ...

  3. SIP对话、事务详解

    1,SIP对话的建立(图片来自于网络) SIP对话的建立包括invite request,response,ACK.其中response包含临时响应(1XX response)和最终响应(非1XX r ...

  4. 会话初始协议SIP与SDP简介

    SIP(Session Initiation Protocol,会话初始协议)是一个控制发起.修改和终结交互式多媒体(音视频.聊天.游戏等)会话的信令协议(RFC 3261).SIP是一个基于文本的协 ...

  5. RFC3261 SIP 会话初始化 规范 中文版

    1.SIP协议介绍 Internet的许多应用都需要建立和管理一个会话,会话在这里的含义是在参与者之 间的数据的交换.由于考虑到参与者的实际情况,这些应用的实现往往是很复杂的:参与者可能是在代理间移动 ...

  6. sybase 事务 超时返回_事务背景介绍(2):MongoDB中的逻辑会话

    MongoDB中文社区(mongoing-mongoing) 摘要 通过创建逻辑会话,现在可以跟踪单操作事务或者包含多个操作的事务在整个系统中资源消耗情况.这样就可以简单地,精确地取消事务中的操作以及 ...

  7. SIP(会话发起协议)

    1.简介 SIP(Session Initiation Protocol,会话初始协议)是由IETF(Internet Engineering Task Force,因特网工程任务组)制定的多媒体通信 ...

  8. 会话初始协议---SIP协议【详解】

    目录 ​ 一.SIP协议简介 二.SIP消息的两种会话模式 1.Session Model 2.Pager Model 三.SIP消息体格式 1.请求行(request-line) 2.状态行(sta ...

  9. SIP协议之事务(transaction)及INVITE事务

    一.SIP事务   SIP事务(SIP Transaction):SIP 事务发生在客户端和服务器之间并且由从第一个从客户端发送到服务器的请求直到最后一个.   SIP协议是一个事务协议,组件间的交互 ...

最新文章

  1. DeepStream: 新一代智能城市视频分析
  2. tomcat安装apr优化
  3. 计算机查找文件的速度,如何快速搜索文件_怎么加快电脑里的文件搜索速度
  4. 理工科学生如何建立对于财务三大表的基本分析呢?
  5. 操作系统设计与实现第3版笔记与minix3心得(3)-操作系统发展历史(1)
  6. [openstack]依赖提交
  7. json字符串、json对象、数组 三者之间的转换
  8. 大学毕业10年,同学之间的差距是怎样拉开的?答案很现实!
  9. 程序员放弃月薪2W的工作,改行做销售,结果垫底,网友:瞎折腾
  10. 顺序表常见操作实现之一
  11. 语音信号处理基础(一)
  12. ElasticSearch集群迁移和升级总结
  13. 我没有时间 I Don't Have Time?
  14. 七宗罪----人性本恶
  15. DIY_实现光敏电阻传感器简单控制LED
  16. 评测 AlibabaCloud 阿里云国际版 香港轻量云服务器的性能和网络怎么样
  17. Java项目:人才管理系统(java+SpringBoot+FreeMarker+jpa+Mysql)
  18. 3D学到什么程度能月入过万?
  19. 桌面html文件图标异常,.htm .html文件图标显示异常的解决办法
  20. 健康比什么都重要-网易CEO孙德棣先生辞世

热门文章

  1. photoshop如何转PDF以及PDF的预检
  2. SQL slammer蠕虫王汇编代码详解
  3. 桥梁三维防碰撞系统——喜讯科技
  4. 芯片手册中常见的Die id
  5. 牛逼!用Python为她设计专属签名软件!
  6. 使用java代码增加一点博客访问量
  7. 保利威视polyv的Api调用
  8. 电脑里删除的文件怎么恢复?
  9. 推荐大家6本Python入门书籍
  10. 农夫安全学习——文件上传漏洞