[go: up one dir, main page]

CN101789910B - Method and device for implementing session history record in converged message service - Google Patents

Method and device for implementing session history record in converged message service Download PDF

Info

Publication number
CN101789910B
CN101789910B CN200910243666A CN200910243666A CN101789910B CN 101789910 B CN101789910 B CN 101789910B CN 200910243666 A CN200910243666 A CN 200910243666A CN 200910243666 A CN200910243666 A CN 200910243666A CN 101789910 B CN101789910 B CN 101789910B
Authority
CN
China
Prior art keywords
message
cpm
session
sip
history
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN200910243666A
Other languages
Chinese (zh)
Other versions
CN101789910A (en
Inventor
卢美莲
李凤军
周星
张永旺
曾玉冰
杨栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Beijing University of Posts and Telecommunications
Original Assignee
ZTE Corp
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp, Beijing University of Posts and Telecommunications filed Critical ZTE Corp
Priority to CN200910243666A priority Critical patent/CN101789910B/en
Publication of CN101789910A publication Critical patent/CN101789910A/en
Application granted granted Critical
Publication of CN101789910B publication Critical patent/CN101789910B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

本发明提供了一种融合消息业务中实现会谈历史记录的方法及装置,包括CPM参与功能接收到一条消息,并检测出用户已开启会谈历史记录功能,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能。通过本发明CPM参与功能的会谈历史记录功能的处理逻辑,实现了融合消息业务环境中消息、文件传输和会话交互历史的记录功能。

Figure 200910243666

The present invention provides a method and device for realizing conversation history recording in the integrated message service, including that the CPM participation function receives a message, and detects that the user has enabled the conversation history recording function, and parses and receives the message according to the protocol type of the received message. Received messages and perform the conversation history recording function according to the analysis results. Through the processing logic of the meeting history recording function of the CPM participation function of the present invention, the recording function of message, file transmission and session interaction history in the integrated message service environment is realized.

Figure 200910243666

Description

融合消息业务中实现会谈历史记录的方法及装置Method and device for realizing conversation history record in converged message service

技术领域 technical field

本发明涉及融合的IP消息(CPM,Converged IP Messaging)业务技术,尤指一种融合消息业务中实现会谈历史记录的方法及装置。The invention relates to a converged IP message (CPM, Converged IP Messaging) service technology, in particular to a method and device for realizing conversation history records in a converged message service.

背景技术 Background technique

目前已有的消息业务中,只有即时消息(IM)业务具有会谈历史记录功能,基于SIMPLE的即时消息通信(OMA SIMPLE IM)业务规范中对IM业务的会谈历史记录功能(Conversation History Function)进行了定义。Among the existing message services, only the instant message (IM) service has the function of conversation history recording. In the SIMPLE-based instant message communication (OMA SIMPLE IM) service specification, the conversation history function of the IM service (Conversation History Function) has been carried out. definition.

IM业务的媒体通信类型比较单一,主要是进行离散媒体的消息通信。IM的消息通信模式包括寻呼模式、大消息模式和会话模式三种类型。其中,The media communication type of the IM service is relatively simple, mainly for message communication of discrete media. The message communication modes of IM include three types: paging mode, large message mode and conversation mode. in,

寻呼模式是指IM客户端通过会话初始协议消息(SIP MESSAGE)请求直接发送和接收即时消息,适用于像短信或者带确认信息的公告这样单独的简短消息通信;Paging mode means that the IM client directly sends and receives instant messages through the SIP MESSAGE request, which is suitable for separate short message communication such as short messages or announcements with confirmation information;

大消息模式是指使用消息会话中继协议(MSRP,Messaging Session RelayProtocol)发送单条包含大数据量信息的IM,比如携带多媒体内容时。为了使用MSRP协议来传送数据,所以需要建立SIP会话;The large message mode refers to using the Message Session Relay Protocol (MSRP, Messaging Session Relay Protocol) to send a single IM containing a large amount of data information, such as when carrying multimedia content. In order to use the MSRP protocol to transmit data, a SIP session needs to be established;

会话模式是指通过会话初始协议邀请(SIP INVITE)请求发起MSRP信道协商,所有IM通过MSRP信道传送,会话模式不仅限于适合于文本内容的交互式会话,比如一对一会话、聊天组或者由某个网络主持的会议,单个用户也可以随时加入和离开会话。Conversational mode refers to the initiation of MSRP channel negotiation through the SIP INVITE request. All IMs are transmitted through the MSRP channel. Conversational mode is not limited to interactive sessions suitable for text content, such as one-to-one conversations, chat groups or Meetings hosted by a single network, individual users can also join and leave sessions at any time.

为了实现IM业务中的会谈历史记录功能,IM服务器中的会谈历史记录功能需要同时位于信令平面和媒体平面上,并执行如下处理逻辑:In order to realize the conversation history recording function in the IM service, the conversation history recording function in the IM server needs to be located on the signaling plane and the media plane at the same time, and execute the following processing logic:

(1)每收到一个需要存储的SIP MESSAGE或者MSRP会话,IM服务器中的会谈历史记录功能检查是否有足够的资源以存储SIP消息;如果没有,则不记录SIP MESSAGE或者MSRP会话,并发送系统消息给用户以指示没有足够的空间存储历史记录,结束;如果有足够资源,则转入(4);(1) Every time a SIP MESSAGE or MSRP session that needs to be stored is received, the conversation history record function in the IM server checks whether there are enough resources to store the SIP message; if not, the SIP MESSAGE or MSRP session is not recorded and sent to the system Message to the user to indicate that there is not enough space to store history records, end; if there are enough resources, then go to (4);

(2)每收到一个存储到其所服务的IM用户的MSRP SEND(作为大消息模式消息的一部分),会谈历史记录功能检查是否有足够的资源以存储大消息(Large消息),如果没有,则停止记录Large消息并丢弃原来已经收到的Large消息,然后发送系统消息给用户以指示没有足够的空间来存储历史记录,结束;如果有足够资源,则转入(4);(2) Every time a MSRP SEND (as a part of the large message mode message) is received and stored to the IM user served by it, the conversation history record function checks whether there are enough resources to store the large message (Large message), if not, Then stop recording the Large message and discard the previously received Large message, then send a system message to the user to indicate that there is not enough space to store the historical record, end; if there are enough resources, then go to (4);

(3)每收到一个存储到其所服务的IM用户的MSRP SEND(作为IM会话的一部分),会谈历史记录功能检查是否有足够的资源以存储MSRP SEND消息;如果没有,则:(3) Every time a MSRP SEND (as part of an IM session) is received and stored to an IM user served by it, the conversation history record function checks whether there are enough resources to store the MSRP SEND message; if not, then:

停止记录该消息;如果该MSRP SEND消息是大消息交互中的一个分片,则会谈历史记录功能应当使用MSRP 413应答拒绝此消息及该大消息的其它分片,并发送系统消息给用户以指示没有足够的空间来存储历史记录,结束;如果SEND是会话交互的一部分,则保持已被存储的会话部分,会谈历史记录功能发送BYE请求到主持会议的IM服务器,以退出会议,并发送系统消息给用户以指示没有足够的空间来存储历史记录,结束。stop logging the message; if the MSRP SEND message is a fragment of a large message interaction, the talk history function should reject this message and other fragments of the large message with an MSRP 413 reply, and send a system message to the user to indicate There is not enough space to store the history record, end; if SEND is part of the conversation interaction, keep the part of the conversation that has been stored, the conversation history record function sends a BYE request to the IM server hosting the meeting to exit the meeting, and sends a system message Give the user an indication that there is not enough space to store the history, end.

如果有足够资源,则转入(5);If there are enough resources, go to (5);

(4)在SIP MESSAGE请求的情形下,存储完整的消息(包含消息头和消息体);(4) In the case of a SIP MESSAGE request, store the complete message (including message header and message body);

(5)在MSRP会话的情形下,存储历史记录会话建立消息(INVITE和200OK)的所有相关头域From、To、P-Asserted-Identity、Subject、Date。(5) In the case of an MSRP session, store all relevant header fields From, To, P-Asserted-Identity, Subject, Date of the historical record session establishment messages (INVITE and 200OK).

上述处理逻辑中,需要为每个被存储的消息分配一个唯一的历史记录索引(URI格式,例如1234mailserver.example.com);对于大消息模式,存储完整的MSRP SEND请求(包含所有头域,IM服务器接收消息时的时间戳和完整的消息内容);对于会话模式,存储每个完整的MSRP SEND请求(包含所有头域,IM服务器接收消息时的时间戳和完整的消息内容),以及SIP BYE请求的相关头域。In the above processing logic, each stored message needs to be assigned a unique history record index (URI format, such as 1234mailserver.example.com); for the large message mode, store the complete MSRP SEND request (including all header fields, IM The timestamp and complete message content when the server receives the message); for session mode, store each complete MSRP SEND request (including all header fields, timestamp and complete message content when the IM server receives the message), and SIP BYE The relevant header field of the request.

而且,现有在对IM业务中的会谈历史记录中,历史记录存储在IM服务器存储实体中的IM用户账簿;而元数据存储在IM XDMS中。Moreover, in the existing conversation history in the IM business, the history is stored in the IM user account book in the storage entity of the IM server; and the metadata is stored in the IM XDMS.

通过上述处理逻辑,IM服务器实现了对会谈历史的记录功能,将会谈过程中交互的即时消息,无论是寻呼模式、大消息模式还是会话模式,都完整地记录了下来。Through the above processing logic, the IM server realizes the function of recording the conversation history, and records the instant messages exchanged during the conversation, whether it is in paging mode, large message mode or conversation mode, all are completely recorded.

IM业务的通信媒体类型比较单一,会谈中交互的只是以即时消息为载体的离散型媒体(如文字、图片、音频/视频片段等),涉及到的信令消息类型以及会话状态信息类型的种类也较少,因此,IM服务器在执行会谈历史记录功能时,基本上都是采用将完整的一条SIP MESSAGE消息或者一条完整的MSRPSEND消息进行保存,或者将SIP INVITE/SIP 200OK等消息的相关头域进行存储等方法。The type of communication media in the IM service is relatively single, and what is exchanged in the conversation is only discrete media with instant messages as the carrier (such as text, pictures, audio/video clips, etc.), the types of signaling messages involved and the types of session status information Therefore, when the IM server performs the meeting history recording function, it basically saves a complete SIP MESSAGE message or a complete MSRPSEND message, or saves the relevant header fields of SIP INVITE/SIP 200OK and other messages methods of storage, etc.

IM业务中是将会谈历史记录的实际内容存储在IM服务器中,而将会谈历史记录相关的元数据另外存储在IM XML文档管理服务器(XDMS)中,这种将元数据与会谈历史记录内容本身分开存储的方式,使得IM客户端在获取会谈历史记录功能时还需要首先使用XCAP协议访问IM XDMS获取到相应的信息,再根据这些信息通过SIP协议访问IM服务器获取会谈历史记录的实际内容,使得会谈历史记录的管理、操作变得复杂化了。In the IM business, the actual content of the conversation history is stored in the IM server, and the metadata related to the conversation history is additionally stored in the IM XML Document Management Server (XDMS). The method of separate storage makes the IM client need to use the XCAP protocol to access the IM XDMS to obtain the corresponding information when obtaining the meeting history function, and then access the IM server through the SIP protocol to obtain the actual content of the meeting history according to the information, so that The management and operation of interview history become complicated.

随着网络技术的演进,在通信网络上提供的消息通信业务呈现出一种融合的趋势,为此,OMA组织提供了一种融合的IP消息使能者(CPM使能者,Converged IP Messaging Enabler),CPM使能者可以跨越不同的接入网,架构在统一的IP核心网之上,以支持终端用户的一对一、一对多以及与应用之间的各种媒体类型(如文本、图片、音频/视频片段、二进制文件、音频/视频流)间的通信。With the evolution of network technology, the message communication service provided on the communication network shows a trend of convergence. Therefore, OMA organization provides a converged IP message enabler (CPM enabler, Converged IP Messaging Enabler ), the CPM enabler can span different access networks and be built on a unified IP core network to support one-to-one, one-to-many and various media types between end users and applications (such as text, images, audio/video clips, binary files, audio/video streams).

在融合的消息通信环境中,CPM使能者以CPM会谈为单位向用户提供CPM业务,使之进行信息交互,用户在通信过程中希望网络侧记录和存储自身所参与的CPM会谈的历史交互信息,从而实现在需要时,能够通过向网络侧服务器发送请求访问到自身曾参与过的CPM会谈的历史交互记录信息,以真实地重现用户曾参与的会谈的全过程;并且,还能够对网络侧服务器上存储的属于该用户自身的会谈历史记录信息进行管理。In a converged message communication environment, the CPM enabler provides CPM services to users in units of CPM talks to enable information interaction. During the communication process, users hope that the network side will record and store the historical interaction information of the CPM talks they participate in. , so that when needed, the historical interaction record information of the CPM talks that the user has participated in can be accessed by sending a request to the server on the network side, so as to truly reproduce the entire process of the talks that the user has participated in; Manage the conversation history information belonging to the user himself stored on the side server.

本文中,为CPM用户提供存储CPM会谈历史记录的功能的服务器称为CPM消息存储服务器,而CPM消息存储客户端通过访问CPM消息存储服务器对属于该CPM用户的CPM会谈历史记录及相关的内容进行访问和管理,并通过对从网络侧获取的会谈历史记录信息进行解析,向CPM用户展示会谈的视图和内容。In this article, the server that provides CPM users with the function of storing CPM conversation history records is called a CPM message storage server, and the CPM message storage client accesses the CPM message storage server to store the CPM conversation history records and related content belonging to the CPM user. Access and manage, and display the view and content of the meeting to CPM users by analyzing the meeting history information obtained from the network side.

CPM会谈描述了通信各方之间利用CPM使能者功能实体进行信息交互的行为,CPM会谈由任意数目的会话外交互的CPM消息、CPM文件传输和CPM会话组成。其中,CPM消息是可以包含多个离散即不连续媒体(如文本、图片、音频片段、视频片段等)的信息体;CPM文件传输是参与者之间进行一个或多个携带有多媒体内容的文件的传输过程,接收方用户必须在接收被传输文件的任何数据之前显示地确认接收过程;CPM会话是两个或多个参与者之间持续一段时间的逻辑连接,可用于参与方实时地交换连续性媒体,也可用于交换离散媒体。CPM消息交互、CPM文件传输可以在CPM会话内进行、也可以在CPM会话外进行。一般认为,每个CPM会谈在特定时间内只包含一个CPM会话。用户可以并行参与多个CPM会谈。A CPM session describes the behavior of information exchange between communication parties using the CPM enabler functional entity. A CPM session consists of any number of CPM messages, CPM file transfers, and CPM sessions that are exchanged outside the session. Among them, a CPM message is an information body that can contain multiple discrete or discontinuous media (such as text, pictures, audio clips, video clips, etc.); The receiving user must explicitly confirm the receiving process before receiving any data of the transferred file; a CPM session is a logical connection between two or more participants that lasts for a period of time, and can be used for participants to exchange continuous information in real time Sexual media can also be used to exchange discrete media. CPM message exchange and CPM file transfer can be performed within the CPM session or outside the CPM session. It is generally believed that each CPM meeting contains only one CPM session at a specific time. Users can participate in multiple CPM sessions in parallel.

CPM会谈历史记录是CPM会谈的存储表示。被授权责任人可以获取并存储他们在CPM会谈过程中交换的信息,并将这些信息作为CPM会谈历史记录存储到CPM业务提供商提供的CPM消息存储服务器中。此时,CPM会话外交互的一条CPM消息被存储为一条CPM消息记录,CPM会话外进行的CPM文件传输被存储为一份CPM文件传输历史记录,而一个CPM会话则被存储为一份CPM会话历史记录(包括会话内CPM消息、会话内CPM文件传输以及会话内交互的连续媒体片段等数据)。因此,从存储表示意义上看,CPM会谈历史记录可以描述为CPM消息记录、CPM文件传输历史记录和CPM会话历史记录的集合。A CPM meeting history is a stored representation of a CPM meeting. Authorized persons in charge can obtain and store the information they exchanged during the CPM conversation, and store the information as a CPM conversation history record in the CPM message storage server provided by the CPM service provider. At this time, a CPM message exchanged outside the CPM session is stored as a CPM message record, a CPM file transfer outside the CPM session is stored as a CPM file transfer history record, and a CPM session is stored as a CPM session History (including data such as intra-session CPM messages, intra-session CPM file transfers, and continuous media segments of intra-session interactions). Therefore, from the perspective of storage representation, the CPM conversation history can be described as a collection of CPM message records, CPM file transfer history and CPM session history.

在CPM业务中,由于提供的是融合的消息业务,涉及的通信媒体类型更为丰富,除了离散型媒体之外,还能够提供基于IP的语音流和视频流通信即CPM会话。CPM会话又可以分为1-1CPM会话和CPM群组会话,在群组会话中,由于参与者可以被移除、邀请、主动加入、主动离开等多种会话状态变化事件的发生,涉及到包括SIP INVITE、SIP REFER、SIP 200OK、SIP BYE等多种SIP信令的交互,且这些SIP消息在不同的会话上下文环境下代表不同的语义,如果还采用现有IM业务中的会谈历史记录功能,仅仅将这些交互信息完整地保存下来,是无法真实地记录整个会话的状态变化信息的。In the CPM service, since it provides a converged message service, it involves more types of communication media. In addition to discrete media, it can also provide IP-based voice stream and video stream communication, that is, CPM session. CPM sessions can be further divided into 1-1CPM sessions and CPM group sessions. In a group session, due to the occurrence of various session state change events such as participants being removed, invited, voluntarily joined, and voluntarily left, involving SIP INVITE, SIP REFER, SIP 200OK, SIP BYE and other SIP signaling interactions, and these SIP messages represent different semantics in different session contexts. If the conversation history recording function in the existing IM business is also used, It is impossible to truly record the state change information of the entire session only by completely saving these interaction information.

比如,对于消息记录,如果仅采用IM业务中的会谈历史记录功能,只是完整地存储一条SIP MESSAGE或者MSRP SEND,那么,CPM消息存储客户端以及CPM消息存储服务器在解析这些会谈历史记录内容时,还需要理解这些通信协议消息的格式等细节,也就是说,直接将现有IM业务中的会谈历史记录功能应用到CPM业务中,通用性、可扩展性差。For example, for message records, if only the conversation history record function in the IM service is used to completely store a SIP MESSAGE or MSRP SEND, then when the CPM message storage client and the CPM message storage server parse the content of these conversation history records, It is also necessary to understand details such as the format of these communication protocol messages, that is to say, directly applying the conversation history recording function in the existing IM service to the CPM service has poor versatility and scalability.

IM的会谈历史记录采用的处理逻辑是,每当IM服务器接收到一条即时消息就开始执行记录过程,并没有考虑到如果这条消息发送失败(接收方并没有成功接收)的情况下,会谈历史记录应该如何更新(例如,删除这条发送失败的消息记录或者是添加发送失败的记录信息)。总之,IM业务的会谈历史记录功能是一个比较简单的功能原型,并没有考虑完整的处理逻辑;而在融合的消息通信业务中,为用户提供完整的会谈历史记录是作为CPM业务的一个非常重要的特色,要求会谈历史记录功能具有更完善的处理逻辑。比如,在CPM业务中,会谈历史记录功能以及相关的元数据可以统一存储在消息存储服务器上,消息存储客户端和CPM参与功能均通过IMAP4协议访问消息存储服务器,所以,传统的IM业务的会谈历史记录功能的处理逻辑并不能直接重用到CPM业务中,基于CPM业务提供融合消息业务的本质,以及它特有的协议架构特点,需要为CPM业务的会谈历史记录功能定义新的、适合其特点的处理逻辑。The processing logic adopted by the IM conversation history record is that whenever the IM server receives an instant message, it starts to execute the recording process, and does not take into account that if the message fails to be sent (the recipient does not receive it successfully), the conversation history How the record should be updated (for example, delete the failed message record or add the failed record information). In short, the meeting history record function of the IM service is a relatively simple functional prototype, without considering the complete processing logic; and in the integrated message communication service, providing users with a complete meeting history record is a very important part of the CPM service. feature, it is required that the meeting history record function has a more complete processing logic. For example, in the CPM business, the meeting history record function and related metadata can be stored on the message storage server in a unified manner. Both the message storage client and the CPM participation function access the message storage server through the IMAP4 protocol. Therefore, the traditional IM business meeting The processing logic of the history record function cannot be directly reused in the CPM business. Based on the nature of the integrated message service provided by the CPM service and its unique protocol architecture characteristics, it is necessary to define a new and suitable for the meeting history record function of the CPM service. processing logic.

发明内容 Contents of the invention

有鉴于此,本发明的主要目的在于提供一种融合消息业务中实现会谈历史记录的方法及装置,实现融合消息业务环境中消息、文件传输和会话交互历史的记录功能。In view of this, the main purpose of the present invention is to provide a method and device for realizing conversation history recording in a converged message service, so as to realize the recording function of message, file transmission and session interaction history in a converged message service environment.

为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:

一种融合消息业务中实现会谈历史记录的方法,包括:A method for implementing conversation history records in a fusion message service, comprising:

融合的IP消息CPM参与功能接收到一条消息,并检测出用户已开启会谈历史记录功能,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能。The integrated IP message CPM participation function receives a message and detects that the user has enabled the conversation history recording function, analyzes the received message according to the protocol type of the received message, and executes the conversation history recording function according to the analysis result.

当所述接收到的消息的协议类型为SIP协议消息时,所述解析接收到的消息并按照解析结果执行会谈历史记录功能包括:When the protocol type of the received message is a SIP protocol message, the parsing the received message and executing the conversation history record function according to the parsing result includes:

调用SIP协议栈对接收到的SIP协议消息进行解析,当解析出为SIP INVITE,进行SIP INVITE消息处理;当解析出为SIP BYE,进行SIP BYE消息处理;当解析出为SIP REFER,进行SIP REFER消息处理;当解析出为SIP MESSAGE,进行SIP MESSAGE消息处理。Call the SIP protocol stack to analyze the received SIP protocol message, when it is resolved as SIP INVITE, process SIP INVITE message; when resolved as SIP BYE, process SIP BYE message; when resolved as SIP REFER, perform SIP REFER Message processing; when it is parsed as a SIP MESSAGE, perform SIP MESSAGE message processing.

当所述接收到的消息的协议类型为MSRP协议消息时,所述解析接收到的消息并按照解析结果执行会谈历史记录功能包括:When the protocol type of the received message is an MSRP protocol message, the function of parsing the received message and executing the conversation history recording function according to the parsing result includes:

调用MSRP协议栈对接收到的MSRP协议消息进行解析,当解析出为MSRPSEND,进行MSRP SEND消息处理。Call the MSRP protocol stack to parse the received MSRP protocol message, and when it is parsed as MSRPSEND, process the MSRP SEND message.

如果接收到连续性媒体流数据包,且检测出开启CPM会话记录功能,该方法还包括:If the continuous media stream packet is received and it is detected that the CPM session recording function is enabled, the method also includes:

所述CPM参与功能记录参与会话各方的连续性媒体流,并启用媒体混合功能,将参与CPM会话各方的媒体流进行混合,保存混合后的媒体流数据;The CPM participation function records the continuous media streams of the parties involved in the session, and enables the media mixing function to mix the media streams of the parties participating in the CPM session, and preserve the mixed media stream data;

当CPM会话结束后,所述CPM参与功能提取本地缓存的混合后的媒体流数据包,按照会话历史记录存储格式的需求进行编码,然后将该媒体流对象编码封装进CPM会话历史记录对象中。When the CPM session is over, the CPM participation function extracts the mixed media stream data packets cached locally, encodes them according to the storage format requirements of the session history record, and then encodes and encapsulates the media stream object into the CPM session history record object.

所述SIP INVITE消息处理包括:Described SIP INVITE message processing comprises:

所述CPM参与功能将该SIP INVITE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存;The CPM participation function caches the SIP INVITE message locally, waits to receive the success or failure response message returned by the receiver and caches it;

所述CPM参与功能检查该SIP INVITE消息的Accept-Contact头域和Contact头域中携带的CPM特征标签,对CPM特征标签指示的为CPM大消息传输而建立的临时SIP会话建立请求消息,或为CPM文件传输建立的临时SIP会话建立请求消息,或与CPM会话事件相关的SIP会话建立请求消息分别进行相应处理。The CPM participation function checks the Accept-Contact header field of the SIP INVITE message and the CPM feature label carried in the Contact header field, and the temporary SIP session establishment request message set up for the CPM large message transmission indicated by the CPM feature label, or for The temporary SIP session establishment request message established by the CPM file transfer, or the SIP session establishment request message related to the CPM session event is processed accordingly.

对所述为CPM大消息传输而建立的临时SIP会话建立请求消息的处理包括:The processing of the temporary SIP session establishment request message set up for the CPM large message transmission includes:

当判断出所述是为CPM会话内的大消息传输而建立的临时SIP会话建立请求消息,则,通过计算和比对Dialog-ID来寻找该CPM大消息所属的CPM会话,找到对应的CPM会话的会话历史记录对象,从INVITE消息中提取相关信息进行记录;根据INVITE请求的相关成功或失败的应答消息,在CPM会话历史记录对象中进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息;When it is judged that it is a temporary SIP session establishment request message set up for the large message transmission in the CPM session, then, find the CPM session to which the CPM large message belongs by calculating and comparing the Dialog-ID, and find the corresponding CPM session The session history record object, extract relevant information from the INVITE message to record; according to the success or failure response message of the INVITE request, record it in the CPM session history record object; wait to receive MSRP SEND at the port of the specified MSRP media channel information;

当判断出所述是为CPM会话外的大消息传输而建立的临时SIP会话建立请求消息,则,When it is judged that the temporary SIP session establishment request message is set up for the large message transmission outside the CPM session, then,

在根据应答消息判断出该SIP临时会话建立成功后,所述CPM参与功能新建一个CPM消息记录对象,并按照CPM消息统一存储格式的规定,从该SIPINVITE请求消息中提取出相关的信息进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息。After judging that the SIP temporary session is established successfully according to the response message, the CPM participation function creates a new CPM message record object, and extracts relevant information from the SIP INVITE request message to record according to the unified storage format of the CPM message; Wait for the MSRP SEND message to be received at the port of the specified MSRP media channel.

对所述为CPM文件传输建立的临时SIP会话建立请求消息的处理包括:The processing of the temporary SIP session setup request message set up for the CPM file transfer includes:

在判断出是为CPM会话内的文件传输而建立的临时SIP会话建立请求消息,则,通过计算和比对Dialog-ID来寻找该CPM文件所属的CPM会话,找到对应的CPM会话的会话历史记录对象,从INVITE消息中提取相关信息进行记录;根据INVITE请求的相关成功或失败的应答消息,在CPM会话历史记录对象中进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息;After judging that it is a temporary SIP session establishment request message established for the file transfer in the CPM session, then, by calculating and comparing the Dialog-ID, find the CPM session to which the CPM file belongs, and find the session history record of the corresponding CPM session Object, extract relevant information from the INVITE message for recording; record in the CPM session history record object according to the success or failure response message of the INVITE request; wait to receive the MSRP SEND message at the port of the specified MSRP media channel;

当判断出是为CPM会话外的文件传输而建立的临时SIP会话建立请求消息,且根据应答消息判断出该SIP临时会话建立成功,则,When it is judged that it is a temporary SIP session establishment request message established for file transfer outside the CPM session, and it is judged that the SIP temporary session is established successfully according to the response message, then,

所述CPM参与功能新建一个CPM文件传输历史记录对象,并按照CPM文件传输历史记录的统一存储格式的规定,从该SIP INVITE请求消息中提取出相关的信息进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息。Described CPM participation function creates a new CPM file transmission history record object, and according to the regulation of the unified storage format of CPM file transmission history record, extracts relevant information from this SIP INVITE request message and records; The port waits to receive MSRP SEND messages.

对所述与CPM会话事件相关的SIP会话建立请求消息的处理包括:The processing of the SIP session establishment request message related to the CPM session event includes:

当判断出与CPM会话事件相关的SIP会话建立请求消息是为建立一个新的CPM会话而发起的会话建立请求消息,则,所述CPM参与功能在本地存储空间中创建一个新的CPM会话历史记录对象;按照CPM会话历史记录的存储格式的规定,从该SIP INVITE消息中提取出相关的信息并记录;根据对该INVITE消息返回的成功或失败的应答消息,对该CPM会话创建事件的结果进行记录,也作为该CPM会话历史记录对象的一部分;When it is judged that the SIP session establishment request message related to the CPM session event is a session establishment request message initiated for establishing a new CPM session, then the CPM participation function creates a new CPM session history record in the local storage space Object; According to the provisions of the storage format of the CPM session history record, extract relevant information from the SIP INVITE message and record it; according to the response message of success or failure returned by the INVITE message, perform the result of the CPM session creation event records, also as part of this CPM Session History object;

当判断出与CPM会话事件相关的SIP会话建立请求消息是某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息,则,通过Request-URI中指示的CPM会话标识符找到相应的CPM会话历史记录对象;按照会话历史记录存储格式的规定,从该SIP INVITE消息中提取出相关的信息并记录;根据对该INVITE消息返回的成功或失败的应答消息,对该请求加入CPM会话事件的结果进行记录,也作为该CPM会话历史记录对象的一部分。When it is judged that the SIP session establishment request message related to the CPM session event is a session join request message initiated by a CPM user to apply for joining an ongoing CPM session, then, find the SIP session identifier indicated in the Request-URI The corresponding CPM session history object; according to the storage format of the session history record, extract relevant information from the SIP INVITE message and record it; according to the success or failure response message returned to the INVITE message, add the request to CPM The results of session events are logged, also as part of the CPM Session History object.

该方法进一步包括:检查SIP INVITE请求消息的Request-URI,The method further includes: checking the Request-URI of the SIP INVITE request message,

如果Request-URI的值是一个CPM会话标识,则所述SIP INVITE请求消息是某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息;If the value of Request-URI is a CPM session identifier, then the SIP INVITE request message is a session joining request message initiated by a CPM user for applying for joining an ongoing CPM session;

如果Request-URI的值是CPM控制功能的地址,且To头域中的tag参数为空,则所述SIP INVITE请求消息是为正在进行的Ad-hoc群组CPM会话而发起的会话建立请求消息;If the value of Request-URI is the address of the CPM control function, and the tag parameter in the To header field is empty, then the SIP INVITE request message is a session establishment request message initiated for an ongoing Ad-hoc group CPM session ;

如果Request-URI的值是CPM用户的地址,且To头域中的tag参数为空,则所述SIP INVITE请求消息是为建立新的1-1CPM会话而发起的会话建立请求消息;If the value of Request-URI is the address of the CPM user, and the tag parameter in the To header field is empty, then the SIP INVITE request message is a session establishment request message initiated for establishing a new 1-1CPM session;

如果Request-URI的值是CPM群组的地址,且To头域中的tag参数为空,则所述SIP INVITE请求消息是为建立新的预定义群组CPM会话而发起的会话建立请求消息。If the value of Request-URI is the address of the CPM group, and the tag parameter in the To header field is empty, then the SIP INVITE request message is a session establishment request message initiated for establishing a new predefined group CPM session.

所述SIP BYE消息处理包括:Described SIP BYE message processing comprises:

所述CPM参与功能将所述SIP BYE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,根据应答消息判断出该SIP BYE消息发送成功时,解析该SIP BYE消息,The CPM participation function caches the SIP BYE message locally, waits to receive the success or failure response message returned by the receiver and caches it, and then parses the SIP BYE message when judging that the SIP BYE message is sent successfully according to the response message ,

如果该SIP BYE消息为CPM用户离开会话,或整个CPM会话结束,或为传输CPM大消息的临时SIP会话结束且为会话内大消息传输过程结束,或为传输CPM文件的临时SIP会话结束且为会话内大消息传输过程结束,则找到相应的CPM会话历史记录对象;If the SIP BYE message is that the CPM user leaves the session, or the entire CPM session ends, or the temporary SIP session for transmitting a CPM large message ends and the transmission process of a large message within the session ends, or the temporary SIP session for transmitting a CPM file ends and is When the large message transmission process in the session ends, find the corresponding CPM session history record object;

如果该SIP BYE消息为传输CPM大消息的临时SIP会话结束且为会话外大消息传输过程结束,则找到相应的CPM消息记录对象;If the SIP BYE message is the end of the temporary SIP session for transmitting the CPM large message and the end of the large message transmission process outside the session, then find the corresponding CPM message record object;

如果该SIP BYE消息为传输CPM文件的临时SIP会话结束且为会话外文件传输过程结束,则找到相应的CPM文件传输历史记录对象;If the SIP BYE message is the end of the temporary SIP session for transferring the CPM file and the end of the file transfer process outside the session, then find the corresponding CPM file transfer history record object;

在上述获得记录对象后,均根据判断的结果更新相关的CPM会话历史记录对象、CPM消息记录对象或CPM文件传输历史记录对象。After the record object is obtained, the relevant CPM session history record object, CPM message record object or CPM file transfer history record object is updated according to the judgment result.

所述SIP REFER消息处理包括:Described SIP REFER message processing comprises:

所述CPM参与功能将所述SIP REFER消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,根据应答消息判断出该SIP REFER消息发送成功,通过Request-URI中携带的CPM会话标识符的值,获取该SIPREFER消息Refer-To头域中method参数的值:The CPM participation function caches the SIP REFER message locally, waits for receiving and caching the response message of success or failure returned by the receiver, judges that the SIP REFER message is successfully sent according to the response message, and carries the SIP REFER message through the Request-URI. The value of the CPM session identifier, and obtain the value of the method parameter in the Refer-To header field of the SIPREFER message:

如果method参数的值是BYE,则在CPM会话历史记录对象中写入移除用户的会话状态事件,并从该SIP REFER消息中提取相关的信息进行记录;If the value of the method parameter is BYE, write the session status event of the removed user in the CPM session history object, and extract relevant information from the SIP REFER message for recording;

如果method参数的值是INVITE,则在CPM会话历史记录对象中写入邀请用户加入的会话状态事件,并从该SIP REFER消息中提取相关的信息进行记录。If the value of the method parameter is INVITE, write the session state event inviting the user to join in the CPM session history record object, and extract relevant information from the SIP REFER message for recording.

所述SIP MESSAGE消息处理包括:Described SIP MESSAGE message processing comprises:

所述CPM参与功能将所述SIP MESSAGE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,根据应答消息判断出该SIPMESSAGE消息发送成功;解析所述SIP MESSAGE消息,The CPM participation function buffers the SIP MESSAGE message locally, waits to receive the success or failure response message returned by the receiver and caches it, and judges that the SIPMESSAGE message is sent successfully according to the response message; parses the SIP MESSAGE message,

如果SIP MESSAGE消息的To头域中携带有tag参数,则判断出该SIPMESSAGE消息是CPM会话内消息,则,找到该SIP MESSAGE消息匹配的CPM会话,从该SIP MESSAGE请求消息中提取相关的信息写入到对应的CPM会话历史记录对象中;并根据对该MESSAGE消息返回的成功或失败的应答消息,对该CPM消息发送的结果进行记录,也作为该CPM会话历史记录对象的一部分;If there is a tag parameter in the To header field of the SIP MESSAGE message, it is determined that the SIPMESSAGE message is a CPM session message, then find the CPM session that matches the SIP MESSAGE message, and extract relevant information from the SIP MESSAGE request message. Enter the corresponding CPM session history record object; and according to the success or failure response message returned by the MESSAGE message, record the result sent by the CPM message, also as a part of the CPM session history record object;

如果SIP MESSAGE消息的To头域中tag参数为空,则判断出是一个CPM会话外消息,则,根据对该SIP MESSAGE消息的应答消息判断出成功发送后,所述CPM参与功能将新建一个CPM消息记录对象,并按照CPM消息的存储格式的规定,从该SIP MESSAGE请求消息中提取出相关的信息进行记录。If the tag parameter in the To header field of the SIP MESSAGE message is empty, then it is judged that it is a message outside the CPM session, then, after judging that it has been successfully sent according to the response message to the SIP MESSAGE message, the CPM participation function will create a new CPM Message record object, and extract relevant information from the SIP MESSAGE request message for recording according to the storage format of the CPM message.

所述MSRP SEND消息处理包括:The MSRP SEND message processing includes:

所述当CPM参与功能将所述MSRP SEND消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,如果收到成功应答消息,When the CPM participation function caches the MSRP SEND message locally, waits to receive the success or failure response message returned by the receiver and caches it, if a success response message is received,

解析所述MSRP SEND消息,如果所述MSRP SEND消息没有进行分片,通过MSRP SEND消息的接收端口号找到对应的会谈历史记录对象,并根据所述MSRP SEND消息对应的CPM消息记录过程、或CPM文件传输记录过程、或CPM会话历史记录过程进行相应处理;Parse the MSRP SEND message, if the MSRP SEND message is not fragmented, find the corresponding conversation history record object through the receiving port number of the MSRP SEND message, and record the process of the CPM message corresponding to the MSRP SEND message, or CPM File transfer recording process, or CPM session history recording process for corresponding processing;

如果所述MSRP SEND消息是一个分片,进一步判断是否该分片是最后一个分片,且是最后一个分片,将同属于一个大消息的各个MSRP SEND消息分片组装起来,形成一条完整的MSRP SEND大消息;通过MSRP SEND消息的接收端口号找到对应的会谈历史记录对象,并根据所述MSRP SEND消息对应的CPM消息记录过程、或CPM文件传输记录过程、或CPM会话历史记录过程进行相应处理。If the MSRP SEND message is a fragment, it is further judged whether the fragment is the last fragment, and it is the last fragment, and each MSRP SEND message fragment belonging to a large message is assembled to form a complete MSRP SEND large message; find the corresponding conversation history record object through the receiving port number of the MSRP SEND message, and perform corresponding actions according to the CPM message recording process, CPM file transfer recording process, or CPM session history recording process corresponding to the MSRP SEND message deal with.

所述对应CPM消息记录过程的处理为:取得所述MSRP SEND消息中的内容,作为会话外传输的CPM大消息的内容,封装到对应的CPM消息记录对象中,形成最终的CPM消息记录对象;The processing of the corresponding CPM message recording process is: obtain the content in the MSRP SEND message, as the content of the CPM large message transmitted outside the session, encapsulate it in the corresponding CPM message recording object, and form the final CPM message recording object;

所述对应CPM文件传输记录过程的处理为:取得所述MSRP SEND消息中的内容,作为会话外传输的CPM文件的内容,封装到对应的CPM文件传输历史记录对象中,形成最终的CPM文件传输历史记录对象;The processing of the corresponding CPM file transmission recording process is: obtain the content in the MSRP SEND message, as the content of the CPM file transmitted outside the session, encapsulate it in the corresponding CPM file transmission history record object, and form the final CPM file transmission history object;

所述对应CPM会话历史记录过程的处理为:取得所述MSRP SEND消息中的内容,作为CPM会话内传输的大消息或文件,封装到对应的CPM会话历史记录对象中,并进行更新。The processing of the corresponding CPM session history record process is: obtain the content in the MSRP SEND message, encapsulate it into the corresponding CPM session history record object as a large message or file transmitted in the CPM session, and update it.

所述CPM参与功能作为SIP背对背的用户代理B2BUA将自身插入在信令和媒体通道上。The CPM participation function inserts itself as a SIP back-to-back user agent B2BUA on signaling and media channels.

一种融合消息业务中实现会谈历史记录的装置,至少包括接收模块、判断模块、记录模块,其中,A device for achieving conversation history recording in a fusion message service, at least including a receiving module, a judging module, and a recording module, wherein,

接收模块,用于接收消息并输出记录模块,通知判断模块;The receiving module is used to receive the message and output the recording module to notify the judging module;

判断模块,用于收到来自接收模块的通知,检测用户是否开启会谈历史记录功能,在开启时,向记录模块发送记录通知;The judging module is used to receive a notification from the receiving module, detect whether the user has enabled the conversation history recording function, and send a recording notification to the recording module when it is enabled;

记录模块,用于接收到记录通知,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能。The recording module is configured to receive the recording notification, analyze the received message according to the protocol type of the received message, and execute the conversation history recording function according to the analysis result.

当所述接收到的消息的协议类型为SIP协议消息时,所述记录模块具体用于,When the protocol type of the received message is a SIP protocol message, the recording module is specifically used to:

调用SIP协议栈对接收到的SIP协议消息进行解析,当解析出为SIP INVITE,进行SIP INVITE消息处理;当解析出为SIP BYE,进行SIP BYE消息处理;当解析出为SIP REFER,进行SIP REFER消息处理;当解析出为SIP MESSAGE,进行SIP MESSAGE消息处理。Call the SIP protocol stack to analyze the received SIP protocol message, when it is resolved as SIP INVITE, process SIP INVITE message; when resolved as SIP BYE, process SIP BYE message; when resolved as SIP REFER, perform SIP REFER Message processing; when it is parsed as a SIP MESSAGE, perform SIP MESSAGE message processing.

当所述接收到的消息的协议类型为MSRP协议消息时,所述记录模块具体用于,When the protocol type of the received message is an MSRP protocol message, the recording module is specifically used to:

调用MSRP协议栈对接收到的MSRP协议消息进行解析,当解析出为MSRPSEND,进行MSRP SEND消息处理。Call the MSRP protocol stack to parse the received MSRP protocol message, and when it is parsed as MSRPSEND, process the MSRP SEND message.

所述接收到的消息为连续性媒体流数据包,且所述判断模块检测出开启CPM会话记录功能,该装置还包括处理模块,用于,The received message is a continuous media stream data packet, and the judging module detects that the CPM session recording function is enabled, and the device also includes a processing module for,

记录参与会话各方的连续性媒体流,并启用媒体混合功能,将参与CPM会话各方的媒体流进行混合,保存混合后的媒体流数据;Record the continuous media streams of all parties participating in the session, and enable the media mixing function to mix the media streams of all parties participating in the CPM session, and save the mixed media stream data;

当CPM会话结束后,提取本地缓存的混合后的媒体流数据包,按照会话历史记录存储格式的需求进行编码,然后将该媒体流对象编码封装进CPM会话历史记录对象中。When the CPM session ends, extract the mixed media stream data packet cached locally, encode according to the storage format requirements of the session history record, and then encode and encapsulate the media stream object into the CPM session history record object.

所述装置设置在CPM会谈历史记录功能中。Said means is set in the CPM session history recording function.

从上述本发明提供的技术方案可以看出,包括CPM参与功能接收到一条消息,并检测出用户已开启会谈历史记录功能,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能。通过本发明CPM参与功能的会谈历史记录功能的处理逻辑,实现了融合消息业务环境中消息、文件传输和会话交互历史的记录功能。It can be seen from the above-mentioned technical solution provided by the present invention that the CPM participation function receives a message, and detects that the user has opened the conversation history recording function, and analyzes the received message according to the protocol type of the received message and according to the analysis result Executes the conversation history function. Through the processing logic of the meeting history recording function of the CPM participation function of the present invention, the recording function of message, file transmission and session interaction history in the integrated message business environment is realized.

附图说明 Description of drawings

图1为CPM会谈与CPM消息、CPM文件传输、CPM会话的关系,以及CPM会谈历史记录与CPM消息记录、CPM文件传输历史记录、CPM会话历史记录之间的关系的示意图;1 is a schematic diagram of the relationship between CPM talks and CPM messages, CPM file transfers, and CPM sessions, and the relationship between CPM talk history records, CPM message records, CPM file transfer history records, and CPM session history records;

图2为本发明实现会谈历史记录的方法的流程示意图;Fig. 2 is a schematic flow chart of the method for realizing the interview history record in the present invention;

图3为对SIP INVITE消息进行处理的流程图;Fig. 3 is the flow chart that SIP INVITE message is processed;

图4为图3中步骤3031的实现流程图;Fig. 4 is the implementation flowchart of step 3031 in Fig. 3;

图5为图3中步骤3032的实现流程图;Fig. 5 is the realization flowchart of step 3032 in Fig. 3;

图6为图3中步骤3033的实现流程图;Fig. 6 is the realization flowchart of step 3033 in Fig. 3;

图7为对SIP BYE消息进行处理的流程图;Fig. 7 is the flowchart that SIP BYE message is processed;

图8为对SIP REFER消息进行处理的流程图;Fig. 8 is the flow chart that SIP REFER message is processed;

图9为对SIP MESSAGE消息进行处理的流程图;Fig. 9 is the flow chart that SIP MESSAGE message is processed;

图10为对MSRP SEND消息进行处理的流程图;Fig. 10 is the flow chart that MSRP SEND message is processed;

图11为本发明实现会谈历史记录的装置的组成示意图。FIG. 11 is a schematic diagram of the composition of the device for achieving meeting history recording in the present invention.

具体实施方式 Detailed ways

图1为CPM会谈与CPM消息、CPM文件传输、CPM会话的关系,以及CPM会谈历史记录与CPM消息记录、CPM文件传输历史记录、CPM会话历史记录之间的关系的示意图,如图1所示:Figure 1 is a schematic diagram of the relationship between CPM talks and CPM messages, CPM file transfers, and CPM sessions, as well as the relationship between CPM talk history records, CPM message records, CPM file transfer history records, and CPM session history records, as shown in Figure 1 :

CPM会谈历史记录功能,实际上就是对CPM会谈过程中交互的CPM消息、CPM文件传输以及进行的CPM会话进行记录。为了实现会谈历史记录功能,需要在网络侧有一个CPM功能实体能够在通信过程中同时位于信令平面和媒体平面上,作为背对背的用户代理(B2BUA,Back-to-Back User Agent)接收和发送通信过程中所有的信令消息和媒体消息,通过解析从中提取出需要记录的信息按照一定的格式进行记录:将CPM会话外交互的一条CPM消息记录为一份CPM消息记录对象、将CPM会话外传输的一个CPM文件记录为一份CPM文件传输历史记录对象,将一次CPM会话记录为一份CPM会话历史记录对象。CPM参与功能服务器完成上述的会谈历史记录功能,并将这些记录对象提交给CPM消息存储服务器,进行永久存储。The CPM meeting history recording function is actually to record the CPM messages exchanged during the CPM meeting, the CPM file transfer and the CPM session conducted. In order to realize the conversation history recording function, there needs to be a CPM functional entity on the network side that can be located on the signaling plane and the media plane at the same time during the communication process, as a back-to-back user agent (B2BUA, Back-to-Back User Agent) receiving and sending All signaling messages and media messages in the communication process are extracted from them by parsing and recorded according to a certain format: a CPM message interacted outside the CPM session is recorded as a CPM message record object, and a CPM message outside the CPM session is recorded. A transferred CPM file is recorded as a CPM file transfer history record object, and a CPM session is recorded as a CPM session history record object. The CPM participation function server completes the above-mentioned meeting history record function, and submits these record objects to the CPM message storage server for permanent storage.

CPM消息记录对象,存储的是在CPM会话外交互的一条CPM消息。CPM消息有两种类型:寻呼模式(Page-Mode)和大消息模式(Large Message Mode)。其中,寻呼模式CPM消息是采用[RFC 3428]中定义的SIP MESSAGE方法通过SIP信令平面来传送,也就是说,寻呼模式的CPM消息的大小有限制,即不能超过1300字节,如果超过,则消息的内容就不会放入SIP MESSAGE消息体中,而是使用大消息模式的CPM消息来发送。大消息模式CPM消息是通过MSRP协议([RFC 4975])来发送单条包含大数据量信息的CPM消息(比如携带多媒体内容时),如果需要,还可以进行分段传送,所以,在发送大消息模式的CPM消息之前,首先要在通信的各方之间通过SIP INVITE请求建立临时SIP会话以协商建立MSRP媒体通道,当临时SIP会话建立成功之后,才能够通过MSRP SEND请求发送实际的消息内容。在该大消息传送结束之后,该临时SIP会话将被立即拆除。The CPM message record object stores a CPM message exchanged outside the CPM session. There are two types of CPM messages: Page-Mode and Large Message Mode. Among them, the paging mode CPM message is transmitted through the SIP signaling plane using the SIP MESSAGE method defined in [RFC 3428]. That is to say, the size of the paging mode CPM message is limited, that is, it cannot exceed 1300 bytes. If If it exceeds, the content of the message will not be put into the SIP MESSAGE message body, but will be sent using the CPM message in the large message mode. The large message mode CPM message is to send a single CPM message containing a large amount of data information (such as when carrying multimedia content) through the MSRP protocol ([RFC 4975]). If necessary, it can also be transmitted in segments. Therefore, when sending a large message Before the CPM message in the mode, it is first necessary to establish a temporary SIP session through the SIP INVITE request between the communication parties to negotiate the establishment of the MSRP media channel. After the temporary SIP session is successfully established, the actual message content can be sent through the MSRP SEND request. After the large message transmission is over, the temporary SIP session will be torn down immediately.

CPM文件传输历史记录对象,存储的是在CPM会话外传输的一个可能携带多媒体内容的CPM文件,比如一个文本文档、一个图片、一个音频文件、视频文件或一个应用程序等等。CPM文件的传输过程与大消息模式的CPM消息的发送过程类似,也是首先在发送方与文件的接收方之间通过SIP INVITE请求建立临时SIP会话以协商建立MSRP媒体通道。接收方需要显示地接受或者拒绝该CPM文件的传输请求。如果临时SIP会话建立成功,则使用MSRP SEND请求消息发送CPM文件的实际内容(根据需要,还可以分段传送)。在CPM文件传送结束之后,该临时SIP会话将被立即拆除。The CPM file transmission history record object stores a CPM file that may carry multimedia content transmitted outside the CPM session, such as a text document, a picture, an audio file, a video file, or an application program. The transmission process of the CPM file is similar to the sending process of the CPM message in the large message mode. First, the sender and the receiver of the file request to establish a temporary SIP session through SIP INVITE to negotiate the establishment of an MSRP media channel. The receiver needs to explicitly accept or reject the transmission request of the CPM file. If the temporary SIP session is set up successfully, then use the MSRP SEND request message to send the actual content of the CPM file (as required, it can also be segmented). The temporary SIP session will be torn down immediately after the CPM file transfer ends.

CPM会话历史记录对象,存储的是一次CPM会话过程中的交互历史信息,应该包括四类信息:CPM会话状态变化信息、在CPM会话中交互的CPM消息(以及可能包含的媒体对象)、在CPM会话中传输的CPM文件,以及在该CPM会话中交互的连续媒体流对象(如音频/视频通话片段)。其中,The CPM session history record object stores the interaction history information during a CPM session, and should include four types of information: CPM session state change information, CPM messages (and possibly contained media objects) interacted in the CPM session, CPM files transmitted in a session, and continuous media streaming objects (such as audio/video call segments) interacted in the CPM session. in,

CPM会话状态信息用于描述整个CPM会话从创建到结束的整个发展变化过程,包括以下六类会话状态变化事件信息:CPM会话创建事件相关信息(SIP INVITE请求消息及相关应答消息)、CPM会话参与者离开会话事件相关信息(SIP BYE请求及相关应答消息)、CPM会话参与者被从CPM会话中移除事件信息(SIP REFER请求及相关应答消息)、一个CPM用户加入到CPM会话事件信息(SIP INVITE请求及相关应答消息)、邀请其他CPM会话参与者加入该CPM会话事件信息(SIP REFER请求及相关应答消息)以及CPM会话结束事件信息(SIP BYE请求及相关应答消息)。CPM session state information is used to describe the entire development and change process of the entire CPM session from creation to end, including the following six types of session state change event information: CPM session creation event related information (SIP INVITE request message and related response message), CPM session participation Event related information about the party leaving the session (SIP BYE request and related response message), CPM session participant is removed from the CPM session event information (SIP REFER request and related response message), a CPM user joins the CPM session event information (SIP INVITE request and related response messages), inviting other CPM session participants to join the CPM session event information (SIP REFER request and related response messages), and CPM session end event information (SIP BYE request and related response messages).

可见,为了形成一份CPM会谈历史记录,CPM会谈历史记录功能需要对来自信令平面、媒体平面的多种不同类型的消息进行处理,并根据会谈上下文环境,理解这些消息所代表的语义,从而对会谈的过程进行记录。由于处理逻辑十分复杂,实现会谈历史记录功能仅仅通过对现有机制的重用无法很好地实现,因此,需要在现有机制的基础上,提供一种新的、有效的机制来实现会谈历史记录功能。It can be seen that in order to form a CPM conversation history record, the CPM conversation history record function needs to process a variety of different types of messages from the signaling plane and the media plane, and understand the semantics represented by these messages according to the context of the conversation, so that Record the process of the interview. Due to the complexity of the processing logic, the function of meeting history recording cannot be achieved well only by reusing the existing mechanism. Therefore, it is necessary to provide a new and effective mechanism based on the existing mechanism to realize meeting history recording Function.

在融合的消息业务通信环境中,为了对用户参与会谈的所有通信交互过程进行记录,本发明中,设置CPM参与功能同时位于CPM会谈的信令通道和媒体通道上,所有与CPM会谈相关的CPM消息或CPM会话信息全部都经过CPM参与功能,CPM参与功能对这些消息进行检查,执行相应的逻辑功能,并针对不同消息在不同的上下文环境中代表的不同语义,完成相应的CPM消息、CPM文件传输历史和CPM会话历史的记录功能。In the integrated message business communication environment, in order to record all the communication interaction processes of users participating in the talks, in the present invention, the CPM participation function is set to be located on the signaling channel and the media channel of the CPM talks at the same time, and all CPMs related to the CPM talks All messages or CPM session information pass through the CPM participation function. The CPM participation function checks these messages, executes corresponding logic functions, and completes the corresponding CPM messages and CPM files according to the different semantics represented by different messages in different contexts. Recording function for transfer history and CPM session history.

与CPM会谈历史记录相关的协议消息主要包括:SIP INVITE请求及其相关的应答消息、SIP REFER请求及其相关的应答消息、SIP BYE请求及其相关的应答消息、SIP MESSAGE请求及其相关的应答消息、MSRP SEND及其相关的应答消息。这些消息在不同的上下文环境中,通过携带不同的头域内容来完成不同的功能,比如:SIP INVITE消息可以是发起一个CPM会话,也可以是为发送大消息模式的CPM消息而建立MSRP通道,还可以是为某个CPM用户申请加入一个正在进行的CPM会话发起会话建立过程,所以本发明中,通过针对不同的消息所携带的相关头域的判断来获知该消息的实际语义,并据此完成相关的消息记录或会话历史记录功能。Protocol messages related to CPM conversation history mainly include: SIP INVITE request and its related response message, SIP REFER request and its related response message, SIP BYE request and its related response message, SIP MESSAGE request and its related response message message, MSRP SEND and its associated reply messages. These messages perform different functions by carrying different header fields in different contexts. For example, a SIP INVITE message can initiate a CPM session, or establish an MSRP channel for sending CPM messages in the large message mode. It is also possible to initiate a session establishment process for a certain CPM user to apply for joining an ongoing CPM session, so in the present invention, the actual semantics of the message is known by judging the relevant header fields carried by different messages, and based on this Complete the relevant message recording or session history recording function.

为了执行会谈历史记录功能,CPM参与功能还将自身同时插入到CPM会谈的信令和媒体通道上并执行B2BUA功能。对于信令平面,每当接收到一条信令消息,CPM参与功能首先执行应有的CPM业务处理逻辑之后,判断用户是否开启了会谈历史记录功能,如果用户开启了会谈记录功能,则CPM参与功能需要根据会谈上下文,判断收到这条消息在会谈过程中代表的实际语义,并对相关的消息记录对象或会话历史记录对象进行更新。如果用户没有开启会谈历史记录功能,则CPM参与功能根据CPM业务的处理逻辑转发这条信令消息。对于用户平面,一旦用户开启了会谈记录功能,CPM参与功能就需要对相关媒体通道上传输的媒体流进行缓存记录,并在会话结束之后,将缓存的媒体流封装进会话历史记录对象中,形成一份完整的会话历史记录对象。To perform the session history function, the CPM Participation function also inserts itself simultaneously on the signaling and media channels of the CPM session and performs the B2BUA function. For the signaling plane, whenever a signaling message is received, the CPM participation function first executes the proper CPM business processing logic, and then judges whether the user has enabled the conversation history recording function. If the user enables the conversation recording function, the CPM participation function According to the context of the conversation, it is necessary to judge the actual semantics represented by the received message during the conversation, and update the related message record object or session history record object. If the user does not enable the conversation history recording function, the CPM participation function forwards this signaling message according to the processing logic of the CPM service. For the user plane, once the user enables the meeting recording function, the CPM participation function needs to cache and record the media stream transmitted on the relevant media channel, and after the session ends, encapsulate the cached media stream into the session history object to form A copy of the full session history object.

下面结合实施例对本发明的方案进行详细描述。The solution of the present invention will be described in detail below in conjunction with the embodiments.

图2为本发明实现会谈历史记录的方法的流程示意图,如图2所示,包括:Fig. 2 is a schematic flow chart of the method for realizing the historical records of talks in the present invention, as shown in Fig. 2 , including:

步骤200~201:CPM参与功能接收到一条消息,检测用户是否开启会谈历史记录功能,如果已开启,开始执行会谈历史记录功能,进入步骤202;否则进入步骤207。Steps 200-201: The CPM participation function receives a message, and detects whether the user has enabled the conversation history recording function, and if so, starts executing the conversation history recording function, and proceeds to step 202; otherwise, proceeds to step 207.

步骤202:检查接收到的消息的协议类型,如果是SIP协议消息,进入步骤203;如果是MSRP协议消息,进入步骤205。Step 202: Check the protocol type of the received message, if it is a SIP protocol message, go to step 203; if it is an MSRP protocol message, go to step 205.

步骤203~步骤2044:调用SIP协议栈进行解析,当解析出为SIP INVITE时,进入步骤2041对其进行具体分析,结束;当解析出为SIP BYE时,进入步骤2042对其进行具体分析,结束;当解析出为SIP REFER时,进入步骤2043对其进行具体分析,结束;当解析出为SIP MESSAGE时,进入步骤2044对其进行具体分析,结束。Step 203~step 2044: call SIP protocol stack to analyze, when it is analyzed as SIP INVITE, enter step 2041 to analyze it in detail, end; when resolved as SIP BYE, enter step 2042 to analyze it in detail, end ; When parsing out as SIP REFER, enter step 2043 to carry out specific analysis to it, end; when parsing out to be SIP MESSAGE, enter step 2044 to carry out specific analysis to it, end.

步骤205~步骤206:调用MSRP协议栈进行解析,当解析出为MSRP SEND时,对其进行具体分析,结束。Steps 205 to 206: call the MSRP protocol stack for analysis, and when the analysis is MSRP SEND, analyze it in detail and end.

步骤207:转发接收到的消息。Step 207: Forward the received message.

如果开启CPM会谈历史记录功能,并接收到连续性媒体流数据包,则CPM参与功能记录参与会话各方的连续性媒体流,并启用媒体混合功能,将参与CPM会话各方的媒体流进行混合,保存混合后的媒体流数据。当CPM会话结束后,CPM参与功能提取本地缓存的混合后的媒体流数据包,按照会话历史记录存储格式的需求进行编码,然后将该媒体流对象编码封装进CPM会话历史记录对象中。If the CPM conversation history recording function is enabled and continuous media stream packets are received, the CPM participation function will record the continuous media streams of all parties involved in the session, and enable the media mixing function to mix the media streams of all parties involved in the CPM session , save the mixed media stream data. When the CPM session ends, the CPM participation function extracts the locally cached mixed media stream data packet, encodes it according to the storage format requirements of the session history record, and then encapsulates the media stream object encoding into the CPM session history record object.

由于融合消息业务通信环境中的会谈历史记录功能的处理逻辑十分复杂,且现有的消息业务中并没有成熟的会谈历史机制可以借鉴,本发明技术方案弥补了对融合消息业务通信环境中的会谈历史记录功能的处理逻辑这一空白。Since the processing logic of the conversation history record function in the converged message service communication environment is very complicated, and there is no mature conversation history mechanism in the existing message service for reference, the technical solution of the present invention makes up for the need for conversations in the converged message service communication environment. This gap is the processing logic of the history function.

针对本发明方法还提供一种融合消息业务中实现会谈历史记录的装置,如图11所示,可设置在CPM会谈历史记录功能中,至少包括接收模块、判断模块、记录模块,其中,Aiming at the method of the present invention, there is also provided a device for achieving conversation history recording in the integrated message service, as shown in Figure 11, which can be set in the CPM conversation history recording function, at least including a receiving module, a judging module, and a recording module, wherein,

接收模块,用于接收消息并输出记录模块,通知判断模块;The receiving module is used to receive the message and output the recording module to notify the judging module;

判断模块,用于收到来自接收模块的通知,检测用户是否开启会谈历史记录功能,在开启时,向记录模块发送记录通知;The judging module is used to receive a notification from the receiving module, detect whether the user has enabled the conversation history recording function, and send a recording notification to the recording module when it is enabled;

记录模块,用于接收到记录通知,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能。The recording module is configured to receive the recording notification, analyze the received message according to the protocol type of the received message, and execute the conversation history recording function according to the analysis result.

当接收到的消息的协议类型为SIP协议消息时,所述记录模块具体用于,调用SIP协议栈对接收到的SIP协议消息进行解析,当解析出为SIP INVITE,进行SIP INVITE消息处理;当解析出为SIP BYE,进行SIP BYE消息处理;当解析出为SIP REFER,进行SIP REFER消息处理;当解析出为SIP MESSAGE,进行SIPMESSAGE消息处理。When the protocol type of the received message is a SIP protocol message, the recording module is specifically used to call the SIP protocol stack to parse the received SIP protocol message, and when parsing out as SIP INVITE, carry out SIP INVITE message processing; If it is parsed as SIP BYE, process the SIP BYE message; if it is parsed as SIP REFER, process the SIP REFER message; if it is parsed as SIP MESSAGE, process the SIPMESSAGE message.

当所述接收到的消息的协议类型为MSRP协议消息时,所述记录模块具体用于,调用MSRP协议栈对接收到的MSRP协议消息进行解析,当解析出为MSRPSEND,进行MSRP SEND消息处理。When the protocol type of the received message is an MSRP protocol message, the recording module is specifically used to call the MSRP protocol stack to parse the received MSRP protocol message, and when it is parsed as MSRP SEND, perform MSRP SEND message processing.

当所述接收到的消息为连续性媒体流数据包,且所述判断模块检测出开启CPM会话记录功能,该装置还包括处理模块,该处理模块用于,记录参与会话各方的连续性媒体流,并启用媒体混合功能,将参与CPM会话各方的媒体流进行混合,保存混合后的媒体流数据;当CPM会话结束后,提取本地缓存的混合后的媒体流数据包,按照会话历史记录存储格式的需求进行编码,然后将该媒体流对象编码封装进CPM会话历史记录对象中。When the received message is a continuous media stream data packet, and the judging module detects that the CPM session recording function is enabled, the device also includes a processing module, which is used to record the continuous media of all parties involved in the session stream, and enable the media mixing function to mix the media streams of all parties participating in the CPM session, and save the mixed media stream data; when the CPM session ends, extract the mixed media stream data packets cached locally, and record The requirements of the storage format are encoded, and then the media stream object is encoded and encapsulated into the CPM session history record object.

下面将分别针对上述五种在CPM会话中将会出现的与会话状态相关的请求消息进行具体分析,重点关注CPM参与功能的历史记录功能相关的处理逻辑,也就是说默认CPM参与功能已经验证这些消息的合法性,并完成了相关的CPM业务处理逻辑之后,并在CPM用户开启了会谈历史记录功能的前提下,如何完成CPM会话历史的记录功能相关的处理逻辑。The following will analyze the above five request messages related to the session state that will appear in the CPM session, focusing on the processing logic related to the history record function of the CPM participation function, that is to say, the default CPM participation function has verified these How to complete the processing logic related to the CPM session history recording function after the message is legal and the relevant CPM business processing logic is completed, and on the premise that the CPM user has enabled the conversation history recording function.

图3为对SIP INVITE进行处理的流程图,如图3所示,包括:Figure 3 is a flow chart of processing SIP INVITE, as shown in Figure 3, including:

步骤300~步骤301:当CPM参与功能接收到一条SIP INVITE消息时,首先将该SIP INVITE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,开始执行会谈历史信息记录功能。Steps 300 to 301: When the CPM participation function receives a SIP INVITE message, it first caches the SIP INVITE message locally, waits for the response message of success or failure returned by the receiver and caches it, and then starts to execute the session history information Record function.

步骤302~步骤3033:CPM参与功能检查Accept-Contact头域和Contact头域中携带的CPM特征标签,如果CPM特征标签指示这是一个为CPM大消息传输而建立的临时SIP会话建立请求消息,则执行步骤3031;如果CPM特征标签指示这是一个为CPM文件传输而建立临时SIP会话的建立请求消息,则执行步骤3032;如果CPM特征标签指示这是一个与CPM会话事件相关的SIP会话建立请求消息,则执行步骤3033。Steps 302 to 3033: The CPM participation function checks the CPM feature tag carried in the Accept-Contact header field and the Contact header field. If the CPM feature tag indicates that this is a temporary SIP session establishment request message established for CPM large message transmission, then Execute step 3031; If the CPM feature label indicates that this is a setup request message for setting up a temporary SIP session for CPM file transfer, then perform step 3032; if the CPM feature label indicates that this is a SIP session setup request message related to the CPM session event , then step 3033 is executed.

图4为图3中步骤3031的实现流程图,如图4所示,包括:Fig. 4 is the implementation flowchart of step 3031 in Fig. 3, as shown in Fig. 4, including:

步骤400:判断是为CPM会话内的大消息传输而建立临时SIP会话的建立请求消息,还是一个CPM会话外的大消息传输而建立临时SIP会话的建立请求消息,如果是CPM会话内的大消息,则进入步骤404,否则进入步骤401。Step 400: judging whether it is the establishment request message of establishing a temporary SIP session for the transmission of large messages in the CPM session, or the establishment request message of establishing a temporary SIP session for the transmission of large messages outside the CPM session, if it is a large message in the CPM session , then go to step 404, otherwise go to step 401.

本步骤中,判断的方法是:检查SIP INVITE消息的To头域是否携带tag参数,如果携带有tag参数,则表明为CPM会话内的大消息传输而建立临时SIP会话的建立请求消息;如果没有携带tag参数,则表明为CPM会话外的大消息传输而建立临时SIP会话的建立请求消息。In this step, the method for judging is: check whether the To header field of the SIP INVITE message carries the tag parameter, if the tag parameter is carried, it indicates that the establishment request message of the temporary SIP session is set up for the large message transmission in the CPM session; if not Carrying the tag parameter indicates the establishment request message for establishing a temporary SIP session for large message transmission outside the CPM session.

步骤401:根据应答消息判断该SIP临时会话是否建立成功,如果成功,进入步骤402;否则进入步骤403。Step 401: Judging whether the SIP temporary session is successfully established according to the response message, if successful, proceed to step 402; otherwise, proceed to step 403.

本步骤中,根据接收到的该INVITE消息相应的应答消息(SIP 200OK或失败应答)进行判断,如果接收到的是SIP 200OK应答消息,则表明该SIP会话建立成功,如果接收到的是失败应答,则表明该SIP会话建立失败。In this step, judge according to the response message (SIP 200OK or failure response) corresponding to the INVITE message received, if what is received is a SIP 200OK response message, it shows that the SIP session is established successfully, if what is received is a failure response , it indicates that the establishment of the SIP session failed.

步骤402:CPM参与功能新建一个CPM消息记录对象,并按照CPM消息的统一存储格式的规定,从该SIP INVITE请求消息中提取出相关的信息(From头域、To头域等)进行记录。之后进入步骤407。Step 402: The CPM participation function creates a new CPM message record object, and extracts relevant information (From header field, To header field, etc.) from the SIP INVITE request message according to the unified storage format of the CPM message for recording. Then go to step 407.

步骤403:不进行任何记录。CPM参与功能抛弃该INVITE消息,不做记录,并返回失败应答消息。结束。Step 403: Do not record anything. The CPM participation function discards the INVITE message without making a record, and returns a failure response message. Finish.

步骤404~406:通过计算和比对Dialog-ID来寻找该CPM大消息所属的CPM会话,找到对应的CPM会话的会话历史记录对象,从INVITE消息中提取相关信息进行记录;根据INVITE请求的相关成功或失败的应答消息,在CPM会话历史记录对象中进行记录。之后进入步骤407。Steps 404-406: Find the CPM session to which the CPM large message belongs by calculating and comparing the Dialog-ID, find the session history record object of the corresponding CPM session, and extract relevant information from the INVITE message for recording; Response messages of success or failure are recorded in the CPM session history object. Then go to step 407.

本步骤具体包括:按照[RFC 3261]中的相关描述计算Dialog-ID(即取得Call-ID头域、From头域中tag参数、To头域中tag参数的值),并和CPM参与功能保存的各个正在进行的CPM会话状态参数中的Dialog-ID进行比对,找到这条CPM会话内的大消息所属的CPM会话;找到匹配的CPM会话对应的CPM会话历史记录对象,并从该SIP INVITE请求消息中提取相关的信息写入到对应的CPM会话历史记录对象中;根据对该INVITE消息返回的成功或失败的应答消息,对该SIP会话建立成功或失败的结果进行记录,也作为该CPM会话历史记录对象的一部分。This step specifically includes: Calculate the Dialog-ID according to the relevant description in [RFC 3261] (that is, obtain the values of the Call-ID header field, the tag parameter in the From header field, and the tag parameter in the To header field), and save it with the CPM participation function Compare the Dialog-ID in each ongoing CPM session state parameter to find the CPM session to which the big message in this CPM session belongs; find the CPM session history record object corresponding to the matching CPM session, and send it from the SIP INVITE Extract relevant information from the request message and write it into the corresponding CPM session history record object; according to the successful or failed response message returned to the INVITE message, record the result of the success or failure of the SIP session establishment, which is also used as the CPM Part of the session history object.

步骤407:在指定的MSRP媒体通道的端口等待接收MSRP SEND消息。Step 407: Wait for the MSRP SEND message to be received at the port of the specified MSRP media channel.

本步骤中,为了进行会谈历史记录,CPM参与功能需要作为B2BUA将自己插入到信令和媒体通道上,即CPM参与功能将分别代表接收方与发送方协商媒体通道端口,以实现将自己插入到媒体通道上。故CPM参与功能将在协商好的MSRP通信端口上等待接收MSRP SEND消息,以接收CPM大消息。In this step, in order to record the conversation history, the CPM participation function needs to insert itself into the signaling and media channel as a B2BUA, that is, the CPM participation function will negotiate the media channel port with the sender on behalf of the receiver to achieve insertion into the on the media channel. Therefore, the CPM participation function will wait to receive the MSRP SEND message on the negotiated MSRP communication port to receive the CPM large message.

图5为图3中步骤3032的实现流程图,如图5所示,包括:Fig. 5 is the implementation flowchart of step 3032 in Fig. 3, as shown in Fig. 5, including:

步骤500:判断是为CPM会话内的文件传输而建立临时SIP会话的建立请求消息,还是为一个CPM会话外的文件传输而建立临时SIP会话的建立请求消息,如果是CPM会话内的文件传输,则进入步骤504,否则进入步骤501。Step 500: judging whether to set up a request message for setting up a temporary SIP session for file transfer in a CPM session, or a request message for setting up a temporary SIP session for file transfer outside a CPM session, if it is a file transfer in a CPM session, Then go to step 504, otherwise go to step 501.

本步骤中,判断的方法是:检查SIP INVITE消息的To头域是否携带tag参数,如果携带有tag参数,则表明为CPM会话内的文件传输而建立临时SIP会话的建立请求消息;如果没有携带tag参数,则表明为CPM会话外的文件传输而建立临时SIP会话的建立请求消息。In this step, the method for judging is: check whether the To header field of the SIP INVITE message carries the tag parameter, if the tag parameter is carried, it indicates that the establishment request message of the temporary SIP session is set up for the file transfer in the CPM session; if it does not carry the The tag parameter indicates the establishment request message for establishing a temporary SIP session for file transfer outside the CPM session.

步骤501:根据应答消息判断该SIP临时会话是否建立成功,如果成功,进入步骤502;否则进入步骤503。Step 501: Judging whether the SIP temporary session is established successfully according to the response message, if successful, proceed to step 502; otherwise, proceed to step 503.

本步骤中,根据接收到的该INVITE消息相应的应答消息(SIP 200OK或失败应答)进行判断,如果接收到的是SIP 200OK应答消息,则表明该SIP会话建立成功,如果接收到的是失败应答,则表明该SIP会话建立失败。In this step, judge according to the response message (SIP 200OK or failure response) corresponding to the INVITE message received, if what is received is a SIP 200OK response message, it shows that the SIP session is established successfully, if what is received is a failure response , it indicates that the establishment of the SIP session failed.

步骤502:CPM参与功能新建一个CPM文件传输历史记录对象,并按照CPM文件传输历史记录的统一存储格式的规定,从该SIP INVITE请求消息中提取出相关的信息(From头域、To头域等)进行记录。之后进入步骤507。Step 502: The CPM participation function creates a new CPM file transfer history record object, and extracts relevant information (From header field, To header field, etc.) ) to record. Then go to step 507.

步骤503:不进行任何记录。CPM参与功能抛弃该INVITE消息,不做记录,并返回失败应答消息。结束。Step 503: Do not record anything. The CPM participation function discards the INVITE message without making a record, and returns a failure response message. Finish.

步骤504~步骤506:通过计算和比对Dialog-ID来寻找该CPM文件传输所属的CPM会话,找到对应的CPM会话的会话历史记录对象,从INVITE消息中提取相关信息进行记录;根据INVITE请求的相关成功或失败的应答消息,在CPM会话历史记录对象中进行记录。之后进入步骤507。Steps 504 to 506: Find the CPM session to which the CPM file transfer belongs by calculating and comparing the Dialog-ID, find the session history record object of the corresponding CPM session, and extract relevant information from the INVITE message for recording; according to the INVITE request Response messages related to success or failure are recorded in the CPM Session History object. Then go to step 507.

本步骤具体包括:按照[RFC 3261]中的相关描述计算Dialog-ID(即取得Call-ID头域、From头域中tag参数、To头域中tag参数的值),并和CPM参与功能保存的各个正在进行的CPM会话状态参数中的Dialog-ID进行比对,找到这条CPM文件传输所属的CPM会话;找到匹配的CPM会话对应的CPM会话历史记录对象,并从该SIP INVITE请求消息中提取相关的信息写入到对应的CPM会话历史记录对象中;根据对该INVITE消息返回的成功或失败的应答消息,对该SIP会话建立成功或失败的结果进行记录,也作为该CPM会话历史记录对象的一部分。This step specifically includes: Calculate the Dialog-ID according to the relevant description in [RFC 3261] (that is, obtain the values of the Call-ID header field, the tag parameter in the From header field, and the tag parameter in the To header field), and save it with the CPM participation function Compare the Dialog-ID in each of the ongoing CPM session state parameters to find the CPM session to which this CPM file transfer belongs; find the CPM session history object corresponding to the matching CPM session, and retrieve it from the SIP INVITE request message Extract relevant information and write it into the corresponding CPM session history record object; according to the success or failure response message returned to the INVITE message, record the result of the success or failure of the SIP session establishment, which is also used as the CPM session history record part of the object.

步骤507:在指定的MSRP媒体通道的端口等待接收MSRP SEND消息。Step 507: Wait for the MSRP SEND message to be received at the port of the specified MSRP media channel.

本步骤中,为了进行会谈历史记录,CPM参与功能需要作为B2BUA将自己插入到信令和媒体通道上,即CPM参与功能将分别代表接收方与发送方协商媒体通道端口,以实现将自己插入到媒体通道上。故CPM参与功能将在协商好的MSRP通信端口上等待接收MSRP SEND消息,以接收CPM文件。In this step, in order to record the conversation history, the CPM participation function needs to insert itself into the signaling and media channel as a B2BUA, that is, the CPM participation function will negotiate the media channel port with the sender on behalf of the receiver to achieve insertion into the on the media channel. Therefore, the CPM participation function will wait to receive the MSRP SEND message on the negotiated MSRP communication port to receive the CPM file.

图6为图3中步骤3033的实现流程图,如图4所示,包括:Fig. 6 is the implementation flowchart of step 3033 in Fig. 3, as shown in Fig. 4, including:

步骤600:判断与CPM会话事件相关的SIP会话建立请求消息是一个为建立一个新的CPM会话而发起的会话建立请求消息,还是一个某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息,如果是前者,则进入步骤605;如果是后者,进入步骤601。Step 600: Judging whether the SIP session establishment request message related to the CPM session event is a session establishment request message initiated for establishing a new CPM session, or initiated by a certain CPM user for applying to join an ongoing CPM session If the session join request message is the former, go to step 605; if it is the latter, go to step 601.

本步骤中,判断的方法是:检查SIP INVITE消息的To头域是否携带tag参数,如果携带有tag参数,则表明与CPM会话事件相关的SIP会话建立请求消息,是一个为建立一个新的CPM会话而发起的会话建立请求消息;如果没有携带tag参数(即为空),则表明与CPM会话事件相关的SIP会话建立请求消息,是一个某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息。In this step, the method for judging is: check whether the To header field of the SIP INVITE message carries the tag parameter, if the tag parameter is carried, it indicates that the SIP session establishment request message related to the CPM session event is a request message for setting up a new CPM The session establishment request message initiated by the session; if it does not carry the tag parameter (that is, it is empty), it indicates that the SIP session establishment request message related to the CPM session event is a CPM user who applies for joining an ongoing CPM session Initiated session join request message.

进一步地,检查SIP INVITE请求消息的Request-URI,Further, check the Request-URI of the SIP INVITE request message,

如果Request-URI的值是一个CPM会话标识,则表明SIP INVITE请求消息是某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息;If the value of Request-URI is a CPM session identifier, it indicates that the SIP INVITE request message is a session joining request message initiated by a CPM user to apply for joining an ongoing CPM session;

如果Request-URI的值是CPM控制功能的地址,且To头域中的tag参数为空,则表明该SIP INVITE请求消息是为正在进行的Ad-hoc群组CPM会话而发起的会话建立请求消息;If the value of Request-URI is the address of the CPM control function, and the tag parameter in the To header field is empty, it indicates that the SIP INVITE request message is a session establishment request message initiated for an ongoing Ad-hoc group CPM session ;

如果Request-URI的值是CPM用户的地址,且To头域中的tag参数为空,则表明该SIP INVITE请求消息是为建立新的1-1CPM会话而发起的会话建立请求消息;If the value of Request-URI is the address of the CPM user, and the tag parameter in the To header field is empty, it indicates that the SIP INVITE request message is a session establishment request message initiated to establish a new 1-1CPM session;

如果Request-URI的值是CPM群组的地址,且To头域中的tag参数为空,则表明该SIP INVITE请求消息是为建立新的预定义群组CPM会话而发起的会话建立请求消息。If the value of Request-URI is the address of the CPM group, and the tag parameter in the To header field is empty, it indicates that the SIP INVITE request message is a session establishment request message initiated to establish a new predefined group CPM session.

步骤601~步骤604:是某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话请求消息,通过Request-URI中指示的CPM会话标识符找到相应的CPM会话历史记录对象;按照会话历史记录存储格式的规定,从该SIPINVITE消息中提取出相关的信息并记录;根据对该INVITE消息返回的成功或失败的应答消息,对该请求加入CPM会话事件的结果进行记录,也作为该CPM会话历史记录对象的一部分。结束。Steps 601 to 604: It is a session request message initiated by a CPM user to apply for joining an ongoing CPM session, and finds the corresponding CPM session history record object through the CPM session identifier indicated in the Request-URI; according to the session history According to the provisions of the record storage format, relevant information is extracted from the SIP INVITE message and recorded; according to the response message of success or failure returned by the INVITE message, the result of the request to join the CPM session event is recorded, which is also used as the CPM session Part of the history object. Finish.

步骤605~步骤607:是为建立新的CPM会话而发起的会话建立请求消息,CPM参与功能在本地存储空间中创建一个新的CPM会话历史记录对象;按照CPM会话历史记录的存储格式的规定,从该SIP INVITE消息中提取出相关的信息并记录;根据对该INVITE消息返回的成功或失败的应答消息,对该CPM会话创建事件的结果进行记录,也作为该CPM会话历史记录对象的一部分。Steps 605 to 607: are session establishment request messages initiated for establishing a new CPM session, and the CPM participation function creates a new CPM session history record object in the local storage space; according to the storage format of the CPM session history record, Extract and record relevant information from the SIP INVITE message; record the result of the CPM session creation event according to the success or failure response message returned by the INVITE message, and also serve as a part of the CPM session history record object.

图7为对SIP BYE消息进行处理的流程图,如图7所示,包括:Fig. 7 is a flow chart of processing the SIP BYE message, as shown in Fig. 7, including:

步骤700~步骤701:当CPM参与功能接收到一条SIP BYE消息时,首先将该SIP BYE消息缓存在本地,并等待接收到接收方返回的成功或失败的应答消息并缓存后,开始执行会谈历史信息记录功能。Step 700~Step 701: When the CPM participation function receives a SIP BYE message, it first caches the SIP BYE message locally, and waits for the success or failure response message returned by the receiver and caches it, then starts to execute the session history Information recording function.

步骤702:根据应答消息判断该SIP BYE消息是否发送成功,如果收到的是SIP 200OK应答消息,表明SIP BYE消息传送成功,则继续执行步骤703;如果收到的是SIP失败应答消息,表明该SIP BYE消息传送失败,执行步骤714。Step 702: Judging whether the SIP BYE message is sent successfully according to the response message, if it is a SIP 200OK response message that is received, it indicates that the SIP BYE message is transmitted successfully, then continue to perform step 703; if it is a SIP failure response message that is received, it indicates that the SIP BYE message is transmitted successfully. SIP BYE message transmission fails, go to step 714.

步骤703~步骤709:解析该SIP BYE消息,通过计算Dialog-ID找到与该SIP BYE消息相关联的SIP会话,获得该SIP会话代表的语义,如果该SIP BYE消息的含义是:Step 703~step 709: parse this SIP BYE message, find the SIP session associated with this SIP BYE message by calculating Dialog-ID, obtain the semantics that this SIP session represents, if the meaning of this SIP BYE message is:

CPM用户离开会话,或整个CPM会话结束,或为传输CPM大消息的临时SIP会话结束且为会话内大消息传输过程结束,或为传输CPM文件的临时SIP会话结束且为会话内大消息传输过程结束,那么进入步骤712;The CPM user leaves the session, or the entire CPM session ends, or the temporary SIP session for transmitting CPM large messages ends and the intra-session large message transmission process ends, or the temporary SIP session for transmitting CPM files ends and the intra-session large message transmission process ends end, then enter step 712;

如果为传输CPM大消息的临时SIP会话结束且为会话外大消息传输过程结束,则进入步骤710;If the temporary SIP session for transmitting the CPM large message ends and the large message transmission process outside the session ends, then enter step 710;

如果为传输CPM文件的临时SIP会话结束且为会话外文件传输过程结束,则进入步骤711。If the temporary SIP session for transferring the CPM file ends and the file transfer process outside the session ends, go to step 711 .

步骤710:找到相应的CPM消息记录对象,并进入步骤713。Step 710: find the corresponding CPM message record object, and go to step 713.

步骤711:找到相应的CPM文件传输历史记录对象,并进入步骤713。Step 711: find the corresponding CPM file transfer history record object, and go to step 713.

步骤712:找到相应的CPM会话历史记录对象,并进入步骤713。Step 712: find the corresponding CPM session history record object, and go to step 713.

步骤713:根据判断的结果更新相关的CPM会话历史记录对象、CPM消息记录对象或CPM文件传输历史记录对象。如果整个CPM会话结束,则CPM参与功能将缓存的CPM会话过程中交互的连续性媒体也按照统一存储格式封装进相关的CPM会话历史记录对象中,最终完成这份CPM会话历史记录对象的组装工作,并将其提交给消息存储服务器。结束。Step 713: Update the relevant CPM session history record object, CPM message record object or CPM file transfer history record object according to the judgment result. If the entire CPM session ends, the CPM participation function will also encapsulate the cached continuous media interacted during the CPM session into the relevant CPM session history object in a unified storage format, and finally complete the assembly of the CPM session history object , and submit it to the message storage server. Finish.

步骤714:丢弃该SIP BYE消息,并返回失败应答消息。Step 714: Discard the SIP BYE message, and return a failure response message.

图8为对SIP REFER消息进行处理的流程图,如图8所示,包括:Fig. 8 is a flowchart of processing the SIP REFER message, as shown in Fig. 8, including:

步骤800~步骤801:当CPM参与功能接收到一条SIP REFER消息时,首先将该SIP REFER消息缓存在本地,并等待接收到接收方返回的成功或失败的应答消息并缓存后,开始执行会谈历史信息记录功能。Steps 800 to 801: When the CPM participation function receives a SIP REFER message, it first caches the SIP REFER message locally, waits for the success or failure response message returned by the receiver and caches it, and then starts to execute the session history Information recording function.

步骤802:根据应答消息判断该SIP REFER消息是否发送成功,如果收到的是SIP 200OK应答消息,表明该SIP REFER消息传送成功,进入步骤803;如果收到的是SIP失败应答消息,表明该SIP REFER消息传送失败,进入步骤808。Step 802: Judging whether the SIP REFER message is sent successfully according to the response message, if a SIP 200OK response message is received, it indicates that the SIP REFER message is transmitted successfully, and enters step 803; if a SIP failure response message is received, it indicates that the SIP REFER message is sent successfully. REFER message transmission fails, go to step 808.

步骤803~步骤807:解析该SIP REFER消息,通过Request-URI中携带的CPM会话标识符的值,获取该SIP REFER消息Refer-To头域中“method”参数的值:Steps 803 to 807: parse the SIP REFER message, and obtain the value of the "method" parameter in the Refer-To header field of the SIP REFER message through the value of the CPM session identifier carried in the Request-URI:

如果“method”参数的值是“BYE”,表示该SIP REFER消息希望将某些用户从指定的CPM会话中移除,则在CPM会话历史记录对象中写入一个“移除用户”的会话状态事件,并从该SIP REFER消息中提取相关的信息进行记录;结束。If the value of the "method" parameter is "BYE", it means that the SIP REFER message wants to remove some users from the specified CPM session, then write a session state of "remove user" in the CPM session history object event, and extract relevant information from the SIP REFER message for recording; end.

如果“method”参数的值是“INVITE”,表示该SIP REFER消息希望邀请某些用户加入到指定的CPM会话中,则在CPM会话历史记录对象中写入一个“邀请用户加入”的会话状态事件,并从该SIP REFER消息中提取相关的信息进行记录。结束。If the value of the "method" parameter is "INVITE", it means that the SIP REFER message wants to invite some users to join the specified CPM session, then write a session state event of "invite users to join" in the CPM session history object , and extract relevant information from the SIP REFER message for recording. Finish.

步骤808:丢弃该消息,并返回失败应答消息。Step 808: Discard the message and return a failure response message.

图9为对SIP MESSAGE消息进行处理的流程图,如图9所示,包括:Fig. 9 is a flow chart of processing the SIP MESSAGE message, as shown in Fig. 9, including:

步骤900~步骤901:当CPM参与功能接收到一条SIP MESSAGE消息时,首先将该SIP MESSAGE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,开始执行会谈历史信息记录功能。Steps 900 to 901: When the CPM participation function receives a SIP MESSAGE message, it first caches the SIP MESSAGE message locally, waits for the success or failure response message returned by the receiver and caches it, and then starts to execute the session history information Record function.

同样,根据应答消息判断该SIP MESSAGE消息是否发送成功,如果收到的是SIP 200OK应答消息,表明该SIP MESSAGE消息传送成功,进入步骤902;如果收到的是SIP失败应答消息,表明该SIP MESSAGE消息传送失败,则丢弃该消息,并返回失败应答消息。Equally, judge whether this SIP MESSAGE message is sent successfully according to response message, if what receive is SIP 200OK response message, show that this SIP MESSAGE message transmits success, enter step 902; If what receive is SIP failure response message, show that this SIP MESSAGE If the message transmission fails, the message is discarded and a failure response message is returned.

步骤902:解析SIP MESSAGE消息的To头域中是否携带tag参数,如果携带有tag参数,则判断出该SIP MESSAGE消息是一个CPM会话内消息,执行步骤903;如果tag参数为空,则判断出是一个CPM会话外消息,执行步骤907。Step 902: analyze whether the To header field of the SIP MESSAGE message carries the tag parameter, if the tag parameter is carried, then it is judged that the SIP MESSAGE message is a message in a CPM session, and step 903 is performed; if the tag parameter is empty, then it is judged is a CPM out-of-session message, go to step 907.

步骤903~步骤906:该SIP MESSAGE消息是一个CPM会话内的CPM消息,则按照[RFC 3261]中的相关描述计算Dialog-ID(即取得Call-ID头域、From头域中tag参数、To头域中tag参数的值),并和CPM参与功能保存的各个正在进行的CPM会话状态参数中的Dialog-ID进行比对,找到这条CPM消息所属的那个CPM会话:Steps 903 to 906: The SIP MESSAGE message is a CPM message in a CPM session, then calculate the Dialog-ID according to the relevant description in [RFC 3261] (that is, obtain the Call-ID header field, the tag parameter in the From header field, the To The value of the tag parameter in the header field), and compare it with the Dialog-ID in each ongoing CPM session state parameter saved by the CPM participation function, and find the CPM session to which this CPM message belongs:

如果找到匹配的CPM会话,则从该SIP MESSAGE请求消息中提取相关的信息写入到对应的CPM会话历史记录对象中;并根据对该CPM消息返回的成功或失败的应答消息,对该CPM消息发送的结果进行记录,也作为该CPM会话历史记录对象的一部分;结束。If a matching CPM session is found, relevant information is extracted from the SIP MESSAGE request message and written into the corresponding CPM session history record object; The results of the send are logged, also as part of the CPM session history object; end.

如果没有找到匹配的CPM会话,则返回错误信息,结束。If no matching CPM session is found, return an error message and end.

步骤907~步骤911:该SIP MESSAGE消息是一个CPM会话外的CPM消息,根据对该SIP MESSAGE消息的应答消息判断消息是否成功发送:Step 907~step 911: this SIP MESSAGE message is a CPM message outside the CPM session, judge whether the message is successfully sent according to the response message to this SIP MESSAGE message:

如果该消息成功发送,则CPM参与功能将新建一个CPM消息记录对象,并按照CPM消息的存储格式的规定,从该SIP MESSAGE请求消息中提取出相关的信息进行记录;如果该消息发送失败,则CPM参与功能不进行任何记录,抛弃该消息,并返回错误应答。If the message is successfully sent, the CPM participation function will create a new CPM message record object, and extract relevant information from the SIP MESSAGE request message for recording according to the storage format of the CPM message; if the message fails to be sent, then The CPM Participation function does not record anything, discards the message, and returns an error response.

图10为对MSRP SEND消息进行处理的流程图,如图10所示,包括:Figure 10 is a flow chart of processing the MSRP SEND message, as shown in Figure 10, including:

步骤1000~步骤1001:当CPM参与功能接收到一条MSRP SEND消息时,首先将该MSRP SEND消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,开始执行会谈历史信息记录功能。Step 1000~Step 1001: When the CPM participation function receives an MSRP SEND message, it first caches the MSRP SEND message locally, waits for the response message of success or failure returned by the receiver and caches it, and then starts to execute the session history information Record function.

步骤1002:根据应答消息判断该MSRP SEND消息是否发送成功,如果收到的是MSRP 200OK应答消息,表明该MSRP SEND消息传送成功,进入步骤1003;如果收到的是MSRP失败应答消息,表明该MSRP SEND消息传送失败,进入步骤1012。Step 1002: Judging whether the MSRP SEND message is sent successfully according to the response message, if the MSRP 200OK response message is received, it indicates that the MSRP SEND message is transmitted successfully, and then enters step 1003; if the MSRP failure response message is received, it indicates that the MSRP SEND message transmission fails, go to step 1012.

步骤1003~步骤1004:解析MSRP SEND消息,根据[RFC 4975]中定义的流程,通过检查“Byte-Range”头域的值来判断该MSRP SEND消息是否被分段传输,如果是分段传输,则该MSRP SEND消息是一个分片,进一步判断是否该分片是最后一个分片,如果是最后一个分片,表明收完所有分片,则进入步骤1005;如果不是最后一个分片,则进入步骤1011。Steps 1003 to 1004: Analyze the MSRP SEND message, and judge whether the MSRP SEND message is segmented by checking the value of the "Byte-Range" header field according to the flow defined in [RFC 4975]. If it is segmented, Then this MSRP SEND message is a fragmentation, further judge whether this fragmentation is the last fragmentation, if it is the last fragmentation, show that all fragmentation has been received, then enter step 1005; if not the last fragmentation, then enter Step 1011.

如果该MSRP SEND消息没有进行分片,则该MSRP SEND消息不是分段传输,则,直接进入步骤1006。If the MSRP SEND message is not fragmented, then the MSRP SEND message is not segmented transmission, then directly enter step 1006.

步骤1005:将同属于一个大消息的各个MSRP SEND消息分片组装起来,形成一条完整的MSRP SEND大消息。Step 1005: Assemble fragments of MSRP SEND messages belonging to one big message to form a complete big MSRP SEND message.

步骤1006:通过MSRP SEND消息的接收端口号找到对应的会谈历史记录对象。Step 1006: Find the corresponding session history record object through the receiving port number of the MSRP SEND message.

步骤1007:判断该MSRP SEND消息对应的是CPM消息记录过程、还是CPM文件传输记录过程、或是CPM会话历史记录过程。如果MSRP SEND传输的是CPM会话外大消息,则进入步骤1008;如果MSRP SEND传输的是CPM会话外文件,则进入步骤1009;如果MSRP SEND传输的是会话内的CPM大消息或CPM文件,则进入步骤1010。Step 1007: Determine whether the MSRP SEND message corresponds to a CPM message recording process, a CPM file transfer recording process, or a CPM session history recording process. If what MSRP SEND transmits is the large message outside the CPM session, then enter step 1008; If what MSRP SEND transmits is the file outside the CPM session, then enter step 1009; If what MSRP SEND transmits is the CPM large message or the CPM file in the session, then Go to step 1010.

步骤1008:取得MSRP SEND消息中的内容,作为会话外传输的CPM大消息的内容,封装到对应的CPM消息记录对象中,形成最终的CPM消息记录对象;结束。Step 1008: Obtain the content in the MSRP SEND message, encapsulate it into the corresponding CPM message record object as the content of the CPM large message transmitted outside the session, and form the final CPM message record object; end.

步骤1009:取得MSRP SEND消息中的内容,作为会话外传输的CPM文件的内容,封装到对应的CPM文件传输历史记录对象中,形成最终的CPM文件传输历史记录对象;结束。Step 1009: Obtain the content in the MSRP SEND message, use it as the content of the CPM file transmitted outside the session, encapsulate it into the corresponding CPM file transmission history record object, and form the final CPM file transmission history record object; end.

步骤1010:取得MSRP SEND消息中的内容,作为CPM会话内传输的大消息或文件,封装到对应的CPM会话历史记录对象中,对其进行更新;结束。Step 1010: Obtain the content in the MSRP SEND message, encapsulate it into the corresponding CPM session history record object as a large message or file transmitted in the CPM session, and update it; end.

步骤1011:继续等待剩余的MSRP SEND消息的其他分片,返回步骤1000。Step 1011: continue to wait for other fragments of the remaining MSRP SEND message, return to step 1000.

步骤1012:丢弃该消息,并返回失败应答消息。Step 1012: Discard the message and return a failure response message.

通过本发明方法,可以看到:By the inventive method, it can be seen that:

(1)一旦CPM参与功能激活会谈历史记录功能,则CPM参与功能将同时位于信令通道和媒体通道上,对与会谈状态相关的消息进行分类处理。CPM在信令平面上对SIP INVITE、SIP REFER、SIP MESSAGE、SIP 200OK以及SIP失败应答消息等进行相应处理,并根据上下文环境,判断该消息所代表的含义,从相关的请求消息和应答消息中提取出关键信息以统一的格式进行记录,而不是仅仅将这些消息原封不动地存储下来。(1) Once the CPM participation function activates the meeting history recording function, the CPM participation function will be located on the signaling channel and the media channel at the same time, and classify and process messages related to the meeting status. CPM processes SIP INVITE, SIP REFER, SIP MESSAGE, SIP 200OK, and SIP failure response messages on the signaling plane, and judges the meaning of the messages according to the context. Extract key information and record it in a unified format, rather than just storing these messages intact.

(2)对于SIP INVITE消息,由于可能代表发送CPM大消息、传输CPM文件或建立CPM会话三种不同的会谈事件,因此,本发明CPM参与功能通过解析INVITE消息“Accepted-Contact”头域携带的CPM特征标签,来判断属于哪一种事件发生,以决定应该进行CPM消息记录或CPM文件传输记录或进行CPM会话历史记录。(2) For the SIP INVITE message, since it may represent three different meeting events of sending a CPM large message, transmitting a CPM file or setting up a CPM session, the CPM participation function of the present invention is carried by analyzing the INVITE message "Accepted-Contact" header field The CPM feature tag is used to determine which type of event occurs, so as to decide whether to record CPM message or CPM file transfer or record CPM session history.

(3)CPM参与功能等待获得接收方返回的应答消息后,再执行会谈历史记录功能,如果消息成功发送,执行相应的记录功能;如果消息发送失败且是会话外的消息,就直接丢弃;如果消息发送失败且是会话相关的消息,则获取其代表的语义在会话历史记录中进行记录。(3) The CPM participation function waits for the response message returned by the receiver, and then executes the conversation history recording function. If the message is successfully sent, execute the corresponding recording function; if the message fails to be sent and it is a message outside the session, it is directly discarded; If the message fails to be sent and it is a session-related message, the semantics represented by it are obtained and recorded in the session history.

(4)CPM参与功能接收到SIP 200OK应答消息后,确定该成功应答消息代表的实际语义,若指示大消息传输媒体通道建立成功,则CPM参与功能启动MSRP媒体平面,并准备接收MSRP SEND消息并进行记录;若指示CPM文件传输媒体通道建立成功,则CPM参与功能启动相应的媒体平面,准备接收MSRP SEND消息并进行记录;若指示CPM会话建立成功,则CPM参与功能启动相应的连续媒体流平面,准备接受连续性媒体流并将参与会话的各方的媒体流进行混合后记录。(4) After the CPM participation function receives the SIP 200OK response message, it determines the actual semantics represented by the successful response message. If it indicates that the large message transmission media channel is established successfully, the CPM participation function starts the MSRP media plane, and prepares to receive the MSRP SEND message and Record; if it indicates that the CPM file transmission media channel is successfully established, the CPM participation function starts the corresponding media plane, prepares to receive the MSRP SEND message and records it; if it indicates that the CPM session is successfully established, the CPM participation function starts the corresponding continuous media flow plane , ready to accept continuous media streams and record after mixing the media streams of the parties involved in the session.

(5)CPM参与功能接收到SIP REFER消息后,在判断出是添加用户操作还是移除用户操作后,再记录相应的会话状态变化信息。(5) After the CPM participation function receives the SIP REFER message, after judging whether to add a user operation or remove a user operation, record the corresponding session state change information.

(6)CPM参与功能接收到SIP BYE消息后,确定BYE消息代表的语义:如果是CPM会话结束,则CPM参与功能为该会话缓存的所有内容封装成完整的一份会话历史记录;如果是会话外的CPM大消息或CPM文件传输结束,则CPM参与功能将相关的内容封装成一份完整的CPM消息记录或CPM文件传输历史记录;如果是会话内的CPM消息或CPM文件传输结束,或CPM用户离开会话,则对相应CPM会话的会话状态信息进行更新。(6) After the CPM participation function receives the SIP BYE message, it determines the semantics represented by the BYE message: if the CPM session ends, the CPM participation function encapsulates all the contents of the session cache into a complete session history record; if it is a session If the CPM large message outside the session or the CPM file transfer ends, the CPM participation function will encapsulate the relevant content into a complete CPM message record or CPM file transfer history record; if the CPM message or CPM file transfer in the session ends, or the CPM user If the session is left, the session state information of the corresponding CPM session is updated.

通过本发明CPM参与功能的会谈历史记录功能的处理逻辑,实现了融合消息业务环境中消息和会话交互历史的记录功能。Through the processing logic of the meeting history recording function of the CPM participation function of the present invention, the recording function of message and session interaction history in the integrated message business environment is realized.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention, and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the within the protection scope of the present invention.

Claims (16)

1.一种融合消息业务中实现会谈历史记录的方法,其特征在于,包括:1. A method for implementing conversation history records in a fusion message service, characterized in that it comprises: 融合的IP消息CPM参与功能接收到一条消息,并检测出用户已开启会谈历史记录功能,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能;The integrated IP message CPM participation function receives a message and detects that the user has enabled the conversation history recording function, analyzes the received message according to the protocol type of the received message, and executes the conversation history recording function according to the analysis result; 当所述接收到的消息的协议类型为SIP协议消息时,所述解析接收到的消息并按照解析结果执行会谈历史记录功能包括:When the protocol type of the received message is a SIP protocol message, the parsing the received message and executing the conversation history record function according to the parsing result includes: 调用SIP协议栈对接收到的SIP协议消息进行解析,当解析出为SIP INVITE,进行SIP INVITE消息处理;当解析出为SIP BYE,进行SIP BYE消息处理;当解析出为SIP REFER,进行SIP REFER消息处理;当解析出为SIP MESSAGE,进行SIP MESSAGE消息处理;或者,Call the SIP protocol stack to analyze the received SIP protocol message, when it is resolved as SIP INVITE, process SIP INVITE message; when resolved as SIP BYE, process SIP BYE message; when resolved as SIP REFER, perform SIP REFER Message processing; when it is parsed as a SIP MESSAGE, perform SIP MESSAGE message processing; or, 当所述接收到的消息的协议类型为MSRP协议消息时,所述解析接收到的消息并按照解析结果执行会谈历史记录功能包括:When the protocol type of the received message is an MSRP protocol message, the function of parsing the received message and executing the conversation history recording function according to the parsing result includes: 调用MSRP协议栈对接收到的MSRP协议消息进行解析,当解析出为MSRPSEND,进行MSRP SEND消息处理。Call the MSRP protocol stack to parse the received MSRP protocol message, and when it is parsed as MSRPSEND, process the MSRP SEND message. 2.根据权利要求1所述的方法,其特征在于,如果接收到连续性媒体流数据包,且检测出开启CPM会话记录功能,该方法还包括:2. The method according to claim 1, wherein, if the continuous media stream data packet is received, and it is detected that the CPM session recording function is enabled, the method also includes: 所述CPM参与功能记录参与会话各方的连续性媒体流,并启用媒体混合功能,将参与CPM会话各方的媒体流进行混合,保存混合后的媒体流数据;The CPM participation function records the continuous media streams of the parties involved in the session, and enables the media mixing function to mix the media streams of the parties participating in the CPM session, and preserve the mixed media stream data; 当CPM会话结束后,所述CPM参与功能提取本地缓存的混合后的媒体流数据包,按照会话历史记录存储格式的需求进行编码,然后将该媒体流对象编码封装进CPM会话历史记录对象中。When the CPM session is over, the CPM participation function extracts the mixed media stream data packets cached locally, encodes them according to the storage format requirements of the session history record, and then encodes and encapsulates the media stream object into the CPM session history record object. 3.根据权利要求1所述的方法,其特征在于,所述SIP INVITE消息处理包括:3. method according to claim 1, is characterized in that, described SIP INVITE message processing comprises: 所述CPM参与功能将该SIP INVITE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存;The CPM participation function caches the SIP INVITE message locally, waits to receive the success or failure response message returned by the receiver and caches it; 所述CPM参与功能检查该SIP INVITE消息的Accept-Contact头域和Contact头域中携带的CPM特征标签,对CPM特征标签指示的为CPM大消息传输而建立的临时SIP会话建立请求消息,或为CPM文件传输建立的临时SIP会话建立请求消息,或与CPM会话事件相关的SIP会话建立请求消息分别进行相应处理。The CPM participation function checks the Accept-Contact header field of the SIP INVITE message and the CPM feature label carried in the Contact header field, and the temporary SIP session establishment request message set up for the CPM large message transmission indicated by the CPM feature label, or for The temporary SIP session establishment request message established by the CPM file transfer, or the SIP session establishment request message related to the CPM session event is processed accordingly. 4.根据权利要求3所述的方法,其特征在于,对所述为CPM大消息传输而建立的临时SIP会话建立请求消息的处理包括:4. The method according to claim 3, wherein the processing of the temporary SIP session setup request message set up for the CPM large message transmission comprises: 当判断出所述为CPM大消息传输而建立的临时SIP会话建立请求消息是为CPM会话内的大消息传输而建立的临时SIP会话建立请求消息时,则,通过计算和比对Dialog-ID来寻找该CPM大消息所属的CPM会话,找到对应的CPM会话的会话历史记录对象,从INVITE消息中提取相关信息进行记录;根据INVITE请求的相关成功或失败的应答消息,在CPM会话历史记录对象中进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息;When judging that the temporary SIP session establishment request message established for the CPM large message transmission is a temporary SIP session establishment request message established for the large message transmission in the CPM session, then, by calculating and comparing the Dialog-ID Find the CPM session to which the big CPM message belongs, find the session history record object of the corresponding CPM session, and extract relevant information from the INVITE message to record; Record; wait to receive MSRP SEND message at the port of the specified MSRP media channel; 当判断出所述为CPM大消息传输而建立的临时SIP会话建立请求消息是为CPM会话外的大消息传输而建立的临时SIP会话建立请求消息时,则,When judging that the temporary SIP session establishment request message established for the CPM large message transmission is the temporary SIP session establishment request message established for the large message transmission outside the CPM session, then, 在根据应答消息判断出该SIP临时会话建立成功后,所述CPM参与功能新建一个CPM消息记录对象,并按照CPM消息统一存储格式的规定,从该SIPINVITE请求消息中提取出相关的信息进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息。After judging that the SIP temporary session is established successfully according to the response message, the CPM participation function creates a new CPM message record object, and extracts relevant information from the SIP INVITE request message to record according to the unified storage format of the CPM message; Wait for the MSRP SEND message to be received at the port of the specified MSRP media channel. 5.根据权利要求3所述的方法,其特征在于,对所述为CPM文件传输建立的临时SIP会话建立请求消息的处理包括:5. The method according to claim 3, wherein the processing of the temporary SIP session setup request message set up for the CPM file transfer comprises: 在判断出所述为CPM文件传输建立的临时SIP会话建立请求消息是为CPM会话内的文件传输而建立的临时SIP会话建立请求消息时,则,通过计算和比对Dialog-ID来寻找该CPM文件所属的CPM会话,找到对应的CPM会话的会话历史记录对象,从INVITE消息中提取相关信息进行记录;根据INVITE请求的相关成功或失败的应答消息,在CPM会话历史记录对象中进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息;When judging that the temporary SIP session establishment request message established for the CPM file transfer is a temporary SIP session establishment request message established for the file transfer within the CPM session, then, find the CPM by calculating and comparing the Dialog-ID For the CPM session to which the file belongs, find the session history record object of the corresponding CPM session, extract relevant information from the INVITE message and record it; record it in the CPM session history record object according to the success or failure response message of the INVITE request; The port of the specified MSRP media channel is waiting to receive the MSRP SEND message; 当判断出所述为CPM文件传输建立的临时SIP会话建立请求消息是为CPM会话外的文件传输而建立的临时SIP会话建立请求消息,且根据应答消息判断出该SIP临时会话建立成功时,则,When judging that the temporary SIP session setup request message set up for the CPM file transfer is a temporary SIP session setup request message set up for the file transfer outside the CPM session, and judging that the SIP temporary session setup was successful according to the response message, then , 所述CPM参与功能新建一个CPM文件传输历史记录对象,并按照CPM文件传输历史记录的统一存储格式的规定,从该SIP INVITE请求消息中提取出相关的信息进行记录;在指定的MSRP媒体通道的端口等待接收MSRP SEND消息。Described CPM participation function creates a new CPM file transmission history record object, and according to the regulation of the unified storage format of CPM file transmission history record, extracts relevant information from this SIP INVITE request message and records; The port waits to receive MSRP SEND messages. 6.根据权利要求3所述的方法,其特征在于,对所述与CPM会话事件相关的SIP会话建立请求消息的处理包括:6. The method according to claim 3, wherein the processing of the SIP session establishment request message related to the CPM session event comprises: 当判断出与CPM会话事件相关的SIP会话建立请求消息是为建立一个新的CPM会话而发起的会话建立请求消息,则,所述CPM参与功能在本地存储空间中创建一个新的CPM会话历史记录对象;按照CPM会话历史记录的存储格式的规定,从该SIP INVITE消息中提取出相关的信息并记录;根据对该INVITE消息返回的成功或失败的应答消息,对该CPM会话创建事件的结果进行记录,也作为该CPM会话历史记录对象的一部分;When it is judged that the SIP session establishment request message related to the CPM session event is a session establishment request message initiated for establishing a new CPM session, then the CPM participation function creates a new CPM session history record in the local storage space Object; According to the provisions of the storage format of the CPM session history record, extract relevant information from the SIP INVITE message and record it; according to the response message of success or failure returned by the INVITE message, perform the result of the CPM session creation event records, also as part of this CPM Session History object; 当判断出与CPM会话事件相关的SIP会话建立请求消息是某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息,则,通过Request-URI中指示的CPM会话标识符找到相应的CPM会话历史记录对象;按照会话历史记录存储格式的规定,从该SIP INVITE消息中提取出相关的信息并记录;根据对该INVITE消息返回的成功或失败的应答消息,对该请求加入CPM会话事件的结果进行记录,也作为该CPM会话历史记录对象的一部分。When it is judged that the SIP session establishment request message related to the CPM session event is a session join request message initiated by a CPM user to apply for joining an ongoing CPM session, then, find the SIP session identifier indicated in the Request-URI The corresponding CPM session history object; according to the storage format of the session history record, extract relevant information from the SIP INVITE message and record it; according to the success or failure response message returned to the INVITE message, add the request to CPM The results of session events are logged, also as part of the CPM Session History object. 7.根据权利要求6所述的方法,其特征在于,该方法进一步包括:检查SIP INVITE请求消息的Request-URI,7. The method according to claim 6, characterized in that the method further comprises: checking the Request-URI of the SIP INVITE request message, 如果Request-URI的值是一个CPM会话标识,则所述SIP INVITE请求消息是某个CPM用户为申请加入一个正在进行的CPM会话而发起的会话加入请求消息;If the value of Request-URI is a CPM session identifier, then the SIP INVITE request message is a session joining request message initiated by a CPM user for applying for joining an ongoing CPM session; 如果Request-URI的值是CPM控制功能的地址,且To头域中的tag参数为空,则所述SIP INVITE请求消息是为正在进行的Ad-hoc群组CPM会话而发起的会话建立请求消息;If the value of Request-URI is the address of the CPM control function, and the tag parameter in the To header field is empty, then the SIP INVITE request message is a session establishment request message initiated for an ongoing Ad-hoc group CPM session ; 如果Request-URI的值是CPM用户的地址,且To头域中的tag参数为空,则所述SIP INVITE请求消息是为建立新的1-1CPM会话而发起的会话建立请求消息;If the value of Request-URI is the address of the CPM user, and the tag parameter in the To header field is empty, then the SIP INVITE request message is a session establishment request message initiated for establishing a new 1-1CPM session; 如果Request-URI的值是CPM群组的地址,且To头域中的tag参数为空,则所述SIP INVITE请求消息是为建立新的预定义群组CPM会话而发起的会话建立请求消息。If the value of Request-URI is the address of the CPM group, and the tag parameter in the To header field is empty, then the SIP INVITE request message is a session establishment request message initiated for establishing a new predefined group CPM session. 8.根据权利要求1所述的方法,其特征在于,所述SIP BYE消息处理包括:8. The method according to claim 1, wherein the processing of the SIP BYE message comprises: 所述CPM参与功能将所述SIP BYE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,根据应答消息判断出该SIP BYE消息发送成功时,解析该SIP BYE消息,The CPM participation function caches the SIP BYE message locally, waits to receive the success or failure response message returned by the receiver and caches it, and then parses the SIP BYE message when judging that the SIP BYE message is sent successfully according to the response message , 如果该SIP BYE消息为CPM用户离开会话的消息,或整个CPM会话结束的消息,或为传输CPM大消息的临时SIP会话结束且为会话内大消息传输过程结束的消息,或为传输CPM文件的临时SIP会话结束且为会话内大消息传输过程结束的消息,则找到相应的CPM会话历史记录对象;If the SIP BYE message is the message that the CPM user leaves the session, or the message that the entire CPM session ends, or the end of the temporary SIP session that transmits the CPM large message and the end of the large message transmission process in the session, or the message that transmits the CPM file If the temporary SIP session ends and the large message transmission process in the session ends, then find the corresponding CPM session history record object; 如果该SIP BYE消息为传输CPM大消息的临时SIP会话结束且为会话外大消息传输过程结束的消息,则找到相应的CPM消息记录对象;If the SIP BYE message is the end of the temporary SIP session for transmitting the CPM large message and the end of the large message transmission process outside the session, then find the corresponding CPM message record object; 如果该SIP BYE消息为传输CPM文件的临时SIP会话结束且为会话外文件传输过程结束的消息,则找到相应的CPM文件传输历史记录对象;If the SIP BYE message is the end of the temporary SIP session for transferring the CPM file and the end of the file transfer process outside the session, then find the corresponding CPM file transfer history record object; 在上述获得记录对象后,均根据判断的结果更新相关的CPM会话历史记录对象、CPM消息记录对象或CPM文件传输历史记录对象。After the record object is obtained, the relevant CPM session history record object, CPM message record object or CPM file transfer history record object is updated according to the judgment result. 9.根据权利要求1所述的方法,其特征在于,所述SIP REFER消息处理包括:9. The method according to claim 1, wherein the SIP REFER message processing comprises: 所述CPM参与功能将所述SIP REFER消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,根据应答消息判断出该SIP REFER消息发送成功,通过Request-URI中携带的CPM会话标识符的值,获取该SIPREFER消息Refer-To头域中method参数的值:The CPM participation function caches the SIP REFER message locally, waits for receiving and caching the response message of success or failure returned by the receiver, judges that the SIP REFER message is successfully sent according to the response message, and carries the SIP REFER message through the Request-URI. The value of the CPM session identifier, and obtain the value of the method parameter in the Refer-To header field of the SIPREFER message: 如果method参数的值是BYE,则在CPM会话历史记录对象中写入移除用户的会话状态事件,并从该SIP REFER消息中提取相关的信息进行记录;If the value of the method parameter is BYE, write the session status event of the removed user in the CPM session history object, and extract relevant information from the SIP REFER message for recording; 如果method参数的值是INVITE,则在CPM会话历史记录对象中写入邀请用户加入的会话状态事件,并从该SIP REFER消息中提取相关的信息进行记录。If the value of the method parameter is INVITE, write the session state event inviting the user to join in the CPM session history record object, and extract relevant information from the SIP REFER message for recording. 10.根据权利要求1所述的方法,其特征在于,所述SIP MESSAGE消息处理包括:10. The method according to claim 1, wherein the SIP MESSAGE message processing comprises: 所述CPM参与功能将所述SIP MESSAGE消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,根据应答消息判断出该SIPMESSAGE消息发送成功;解析所述SIP MESSAGE消息,The CPM participation function buffers the SIP MESSAGE message locally, waits to receive the success or failure response message returned by the receiver and caches it, and judges that the SIPMESSAGE message is sent successfully according to the response message; parses the SIP MESSAGE message, 如果SIP MESSAGE消息的To头域中携带有tag参数,则判断出该SIPMESSAGE消息是CPM会话内消息,则,找到该SIP MESSAGE消息匹配的CPM会话,从该SIP MESSAGE请求消息中提取相关的信息写入到对应的CPM会话历史记录对象中;并根据对该MESSAGE消息返回的成功或失败的应答消息,对该CPM消息发送的结果进行记录,也作为该CPM会话历史记录对象的一部分;If there is a tag parameter in the To header field of the SIP MESSAGE message, it is determined that the SIPMESSAGE message is a CPM session message, then find the CPM session that matches the SIP MESSAGE message, and extract relevant information from the SIP MESSAGE request message. Enter the corresponding CPM session history record object; and according to the success or failure response message returned by the MESSAGE message, record the result sent by the CPM message, also as a part of the CPM session history record object; 如果SIP MESSAGE消息的To头域中tag参数为空,则判断出是一个CPM会话外消息,则,根据对该SIP MESSAGE消息的应答消息判断出成功发送后,所述CPM参与功能将新建一个CPM消息记录对象,并按照CPM消息的存储格式的规定,从该SIP MESSAGE请求消息中提取出相关的信息进行记录。If the tag parameter in the To header field of the SIP MESSAGE message is empty, then it is judged that it is a message outside the CPM session, then, after judging that it has been successfully sent according to the response message to the SIP MESSAGE message, the CPM participation function will create a new CPM Message record object, and extract relevant information from the SIP MESSAGE request message for recording according to the storage format of the CPM message. 11.根据权利要求1所述的方法,其特征在于,所述MSRP SEND消息处理包括:11. The method according to claim 1, wherein the MSRP SEND message processing comprises: 所述当CPM参与功能将所述MSRP SEND消息缓存在本地,等待接收到接收方返回的成功或失败的应答消息并缓存后,如果收到成功应答消息,When the CPM participation function caches the MSRP SEND message locally, waits to receive the success or failure response message returned by the receiver and caches it, if a success response message is received, 解析所述MSRP SEND消息,如果所述MSRP SEND消息没有进行分片,通过MSRP SEND消息的接收端口号找到对应的会谈历史记录对象,并根据所述MSRP SEND消息对应的CPM消息记录过程、或CPM文件传输记录过程、或CPM会话历史记录过程进行相应处理;Parse the MSRP SEND message, if the MSRP SEND message is not fragmented, find the corresponding conversation history record object through the receiving port number of the MSRP SEND message, and record the process of the CPM message corresponding to the MSRP SEND message, or CPM File transfer recording process, or CPM session history recording process for corresponding processing; 如果所述MSRP SEND消息是一个分片,进一步判断是否该分片是最后一个分片,且是最后一个分片,将同属于一个大消息的各个MSRP SEND消息分片组装起来,形成一条完整的MSRP SEND大消息;通过MSRP SEND消息的接收端口号找到对应的会谈历史记录对象,并根据所述MSRP SEND消息对应的CPM消息记录过程、或CPM文件传输记录过程、或CPM会话历史记录过程进行相应处理。If the MSRP SEND message is a fragment, it is further judged whether the fragment is the last fragment, and it is the last fragment, and each MSRP SEND message fragment belonging to a large message is assembled to form a complete MSRP SEND large message; find the corresponding conversation history record object through the receiving port number of the MSRP SEND message, and perform corresponding actions according to the CPM message recording process, CPM file transfer recording process, or CPM session history recording process corresponding to the MSRP SEND message deal with. 12.根据权利要求11所述的方法,其特征在于,所述对应CPM消息记录过程的处理为:取得所述MSRP SEND消息中的内容,作为会话外传输的CPM大消息的内容,封装到对应的CPM消息记录对象中,形成最终的CPM消息记录对象;12. The method according to claim 11, characterized in that, the processing of the corresponding CPM message recording process is: obtaining the content in the MSRP SEND message, as the content of the CPM large message transmitted outside the session, and encapsulating it into the corresponding The final CPM message record object is formed in the CPM message record object; 所述对应CPM文件传输记录过程的处理为:取得所述MSRP SEND消息中的内容,作为会话外传输的CPM文件的内容,封装到对应的CPM文件传输历史记录对象中,形成最终的CPM文件传输历史记录对象;The processing of the corresponding CPM file transmission recording process is: obtain the content in the MSRP SEND message, as the content of the CPM file transmitted outside the session, encapsulate it in the corresponding CPM file transmission history record object, and form the final CPM file transmission history object; 所述对应CPM会话历史记录过程的处理为:取得所述MSRP SEND消息中的内容,作为CPM会话内传输的大消息或文件,封装到对应的CPM会话历史记录对象中,并进行更新。The processing of the corresponding CPM session history record process is: obtain the content in the MSRP SEND message, encapsulate it into the corresponding CPM session history record object as a large message or file transmitted in the CPM session, and update it. 13.根据权利要求1~12任一项所述的方法,其特征在于,所述CPM参与功能作为SIP背对背的用户代理B2BUA将自身插入在信令和媒体通道上。13. The method according to any one of claims 1-12, wherein the CPM participation function inserts itself as a SIP back-to-back user agent B2BUA on the signaling and media channel. 14.一种融合消息业务中实现会谈历史记录的装置,其特征在于,至少包括接收模块、判断模块、记录模块,其中,14. A device for achieving conversation history recording in a converged message service, characterized in that it includes at least a receiving module, a judging module, and a recording module, wherein, 接收模块,用于接收消息并将收到的消息传输到记录模块,以及通知判断模块;The receiving module is used to receive the message and transmit the received message to the recording module, and notify the judging module; 判断模块,用于收到来自接收模块的通知,检测用户是否开启会谈历史记录功能,在开启时,向记录模块发送记录通知;The judging module is used to receive a notification from the receiving module, detect whether the user has enabled the conversation history recording function, and send a recording notification to the recording module when it is enabled; 记录模块,用于接收到记录通知,根据接收到的消息的协议类型,解析接收到的消息并按照解析结果执行会谈历史记录功能;The recording module is used to receive the recording notification, analyze the received message according to the protocol type of the received message and execute the meeting history recording function according to the analysis result; 当所述接收到的消息的协议类型为SIP协议消息时,所述记录模块具体用于,调用SIP协议栈对接收到的SIP协议消息进行解析,当解析出为SIP INVITE,进行SIP INVITE消息处理;当解析出为SIP BYE,进行SIP BYE消息处理;当解析出为SIP REFER,进行SIP REFER消息处理;当解析出为SIP MESSAGE,进行SIP MESSAGE消息处理;When the protocol type of the received message is a SIP protocol message, the recording module is specifically used to call the SIP protocol stack to analyze the received SIP protocol message, and when it is resolved as SIP INVITE, carry out SIP INVITE message processing ; When it is parsed as SIP BYE, process SIP BYE message; when it is parsed as SIP REFER, process SIP REFER message; when it is parsed as SIP MESSAGE, process SIP MESSAGE message; 当所述接收到的消息的协议类型为MSRP协议消息时,所述记录模块具体用于,调用MSRP协议栈对接收到的MSRP协议消息进行解析,当解析出为MSRPSEND,进行MSRP SEND消息处理。When the protocol type of the received message is an MSRP protocol message, the recording module is specifically used to call the MSRP protocol stack to parse the received MSRP protocol message, and when it is parsed as MSRP SEND, perform MSRP SEND message processing. 15.根据权利要求14所述的装置,其特征在于,所述接收到的消息为连续性媒体流数据包,且所述判断模块检测出开启CPM会话记录功能,该装置还包括处理模块,用于,15. The device according to claim 14, wherein the received message is a continuous media stream packet, and the judging module detects that the CPM session recording function is opened, and the device also includes a processing module for At, 记录参与会话各方的连续性媒体流,并启用媒体混合功能,将参与CPM会话各方的媒体流进行混合,保存混合后的媒体流数据;Record the continuous media streams of all parties participating in the session, and enable the media mixing function to mix the media streams of all parties participating in the CPM session, and save the mixed media stream data; 当CPM会话结束后,提取本地缓存的混合后的媒体流数据包,按照会话历史记录存储格式的需求进行编码,然后将该媒体流对象编码封装进CPM会话历史记录对象中。When the CPM session ends, extract the mixed media stream data packet cached locally, encode according to the storage format requirements of the session history record, and then encode and encapsulate the media stream object into the CPM session history record object. 16.根据权利要求15所述的装置,其特征在于,所述装置设置在CPM会谈历史记录功能中。16. The device according to claim 15, characterized in that the device is set in the CPM session history recording function.
CN200910243666A 2009-12-22 2009-12-22 Method and device for implementing session history record in converged message service Expired - Fee Related CN101789910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910243666A CN101789910B (en) 2009-12-22 2009-12-22 Method and device for implementing session history record in converged message service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910243666A CN101789910B (en) 2009-12-22 2009-12-22 Method and device for implementing session history record in converged message service

Publications (2)

Publication Number Publication Date
CN101789910A CN101789910A (en) 2010-07-28
CN101789910B true CN101789910B (en) 2012-09-05

Family

ID=42532971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910243666A Expired - Fee Related CN101789910B (en) 2009-12-22 2009-12-22 Method and device for implementing session history record in converged message service

Country Status (1)

Country Link
CN (1) CN101789910B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713373A (en) * 2015-07-13 2017-05-24 中兴通讯股份有限公司 File sending method and apparatus
CN110677497B (en) * 2019-10-23 2022-10-18 中国工商银行股份有限公司 Network medium distribution method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227418A (en) * 2007-01-19 2008-07-23 华为技术有限公司 A method, device and system for realizing fusion of IP messages
EP2028807A1 (en) * 2007-08-22 2009-02-25 Samsung Electronics Co., Ltd. Mobile Terminal and Message Transmitting/Receiving Method for "Converged IP Messaging" (OMA CPM)
CN101588546A (en) * 2008-05-21 2009-11-25 华为技术有限公司 Method, device and system for transmitting non-CPM service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227418A (en) * 2007-01-19 2008-07-23 华为技术有限公司 A method, device and system for realizing fusion of IP messages
EP2028807A1 (en) * 2007-08-22 2009-02-25 Samsung Electronics Co., Ltd. Mobile Terminal and Message Transmitting/Receiving Method for "Converged IP Messaging" (OMA CPM)
CN101588546A (en) * 2008-05-21 2009-11-25 华为技术有限公司 Method, device and system for transmitting non-CPM service

Also Published As

Publication number Publication date
CN101789910A (en) 2010-07-28

Similar Documents

Publication Publication Date Title
CN1703690B (en) Side channel for membership management in conference control
CN101047515B (en) A billing association method and system for application services
CN101682409B (en) Method for managing pre-established session, poc system and poc user equipment for implementing the same
CN101232465B (en) Method for transmitting document in conference system, document transmitting system and conference server
US20030145054A1 (en) Conferencing architecture employing media servers and enhanced session initiation protocol
CN101360091B (en) Apparatus, system and method realizing session initial protocol terminal conference accessing
CN101300797A (en) Method and apparatus for instant messaging
JP2014150584A (en) Multi-user real time transcoding system and method for multi-media session
CN102388631B (en) System and method for establishing a session when certain conditions are met
CN102075737A (en) Video monitoring conversation method
CN100411394C (en) System and method for encapsulating and transmitting messages in message session relay protocol
US20130097265A1 (en) Method for transferring and storing cpm service message and service thereof
CN106161201B (en) A method, device and system for participating in a group chat with an email account as an identifier
CN101621752B (en) Method, system and equipment for sending multimedia message
CN101778056B (en) Processing method and system for meeting history record fusing message business
CN101789910B (en) Method and device for implementing session history record in converged message service
US9124605B2 (en) Terminal, information inter-cut system and method
CN102291366A (en) Method for realizing instant messaging of multi-media conference and user equipment
CN103139216A (en) A method for managing one or more media types supported in a poc session, and a poc system and a poc user equipment for implementing the same
CN101026815A (en) Multimedia communication session establishing method
WO2008046697A1 (en) Enrichment of the signalling in a communication session of “push to talk” type by inserting a business card
WO2009036689A1 (en) A message association method, user terminal and server
CN100459746C (en) System and method of push-to-talk session playback on cellular network
CN101588546A (en) Method, device and system for transmitting non-CPM service
Cheng et al. Design and Implementation of Document-Sharing Based on IMS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120905

Termination date: 20171222