[go: up one dir, main page]

CN101137104B - A method and system for realizing resource release - Google Patents

A method and system for realizing resource release Download PDF

Info

Publication number
CN101137104B
CN101137104B CN200610111582A CN200610111582A CN101137104B CN 101137104 B CN101137104 B CN 101137104B CN 200610111582 A CN200610111582 A CN 200610111582A CN 200610111582 A CN200610111582 A CN 200610111582A CN 101137104 B CN101137104 B CN 101137104B
Authority
CN
China
Prior art keywords
session
refresher
unit
header field
message
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
CN200610111582A
Other languages
Chinese (zh)
Other versions
CN101137104A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200610111582A priority Critical patent/CN101137104B/en
Priority to PCT/CN2007/002314 priority patent/WO2008025216A1/en
Publication of CN101137104A publication Critical patent/CN101137104A/en
Application granted granted Critical
Publication of CN101137104B publication Critical patent/CN101137104B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种实现资源释放的方法。该方法包括:背靠背用户代理B2BUA单元接收到不含有带时间timer标签的支持Supported头域的会话建立请求消息后,则在请求消息中添加带timer标签的Supported头域;节点设备之间进行刷新者协商,通知除刷新者外本次会话所途径的节点设备不发起会话更新请求;在会话建立后,由协商确定为刷新者的节点设备分别向与自身连接的两侧本次会话所途径的节点设备发起会话更新请求。通过本发明的方案,解决了会话过程中无意义的进行会话更新请求的转发和消息碰撞问题,实现了主叫和被叫终端都不支持会话终计时Session Timers协议,也能释放资源。本发明同时公开了一种实现资源释放的系统。

Figure 200610111582

The invention discloses a method for realizing resource release. The method includes: after the B2BUA unit of the back-to-back user agent receives the session establishment request message that does not contain the Supported header field with the timer tag, adding the Supported header field with the timer tag in the request message; Negotiation, notify the node devices passed by this session other than the refresher not to initiate a session update request; The device initiates a session update request. The solution of the invention solves the problems of meaningless forwarding of session update requests and message collisions in the session process, and realizes that both the calling terminal and the called terminal do not support the Session Timers protocol, and resources can also be released. The invention also discloses a system for realizing resource release.

Figure 200610111582

Description

一种实现资源释放的方法和系统 A method and system for realizing resource release

技术领域technical field

本发明涉及通信技术领域,特别涉及一种实现资源释放的方法和系统。The present invention relates to the field of communication technology, in particular to a method and system for realizing resource release.

背景技术Background technique

近年来,随着移动通信技术的发展,单一的语音通信方式已不能完全满足用户的需要,全新的多媒体通信方式正不断涌现。这些多媒体通信不仅仅是简单的视频、音频通信,还包括即时消息、同址浏览、协同工作、流媒体等,特别是新的通信方式和传统语音相互融合的业务,更被大众所接受。在众多的基于互联网和电信网络融合会话控制系统中,大多数会话控制系统都采用初始会话协议(SIP)作为会话控制协议,最具代表性的就是网际协议多媒体子系统(IMS)。In recent years, with the development of mobile communication technology, a single voice communication method can no longer fully meet the needs of users, and new multimedia communication methods are constantly emerging. These multimedia communications are not only simple video and audio communications, but also include instant messaging, co-location browsing, collaborative work, streaming media, etc., especially the integration of new communication methods and traditional voice services, which are more accepted by the public. Among the many session control systems based on Internet and telecommunications network convergence, most of the session control systems use Session Initiation Protocol (SIP) as the session control protocol, and the most representative one is Internet Protocol Multimedia Subsystem (IMS).

IMS是语音和数据服务系统,它可以按照用户数据,屏蔽用户的接入方式,控制业务能力的开放程度,从而提供多媒体的通信体验。而且综合了语音、数据和多媒体创新应用的IMS可以产生对新服务的需求,比如在线状态服务、多媒体聊天、会议、按键通话和按键会议等。IMS is a voice and data service system. It can shield users' access methods and control the opening degree of service capabilities according to user data, thereby providing multimedia communication experience. Moreover, IMS, which integrates innovative applications of voice, data and multimedia, can generate demand for new services, such as presence service, multimedia chat, conferencing, push-to-talk and push-to-conferencing.

IMS中主要的功能包括控制用户注册、会话控制等功能的呼叫控制(CSCF)和实现与电路交换网互通的媒体网关控制功能/IMS媒体网关功能(MGCF/IM-MGW)。The main functions in IMS include call control (CSCF) which controls functions such as user registration and session control, and media gateway control function/IMS media gateway function (MGCF/IM-MGW) which realizes intercommunication with the circuit switching network.

IMS中主要的设备包括提供各种业务逻辑控制功能的应用服务器(AS)和用于集中管理用户签约数据的归属用户服务器(HSS)。The main equipment in the IMS includes an Application Server (AS) that provides various business logic control functions and a Home Subscriber Server (HSS) that is used to centrally manage user subscription data.

其中,CSCF根据在网络中的功能分为:当前所在地代理节点(P-CSCF)、注册地的归属域服务节点(S-CSCF)以及问讯节点(I-CSCF)。P-CSCF是IMS系统中用户的接入点,所有来自UE或发往UE的SIP信令流都必须经过P-CSCF。I-CSCF是在一个运营商网络中为所有连接到这个运营商的用户提供的联系点。S-CSCF在IMS核心网中处于核心的控制地位,它位于归属网络。负责对UE的注册鉴权和会话控制,执行针对主叫端及被叫端IMS用户的基本会话路由功能,并根据用户签约的IMS触发相应的规则。Among them, CSCF is divided into according to the function in the network: current location proxy node (P-CSCF), registration home domain service node (S-CSCF) and interrogation node (I-CSCF). The P-CSCF is the user's access point in the IMS system, and all SIP signaling flows from or to the UE must pass through the P-CSCF. The I-CSCF is the point of contact within an operator's network for all users connected to this operator. The S-CSCF is in the core control position in the IMS core network, and it is located in the home network. Responsible for UE registration authentication and session control, perform basic session routing functions for calling and called IMS users, and trigger corresponding rules according to the IMS signed by the user.

用户通过当前所在地代理节点P-CSCF接入IMS,会话和业务触发控制和与AS的业务控制交互则由其注册地的归属域服务节点S-CSCF完成;IMS采用SIP协议作为应用层交互信令,终端和CSCF之间、CSCF之间、CSCF与AS之间的接口协议均为SIP协议。但是SIP协议没有定义一种协议使得中间节点能够在会话建立之后及时检测会话是否处于活动状态,这造成当终端发送释放指示消息失败的情况下,IMS系统中的中间节点可能使资源无法释放。会话计时(Session Timers)协议则是针对此问题对SIP协议的补充,是SIP协议的一个扩展。该Session Timers协议让会话中的某个终端负责周期性的发起会话更新请求以保证会话处于活动状态,如果周期内没有收到会话更新请求或者会话更新请求发送失败,则表明会话已经处于非活动状态,那么该终端释放相关资源。IMS系统中的中间节点,例如P-CSCF或S-CSCF则在超时后直接释放该会话相关资源。这样就保证了相关资源的及时释放。The user accesses the IMS through the proxy node P-CSCF of the current location, and the session and service trigger control and the service control interaction with the AS are completed by the home domain service node S-CSCF of the registration location; the IMS uses the SIP protocol as the application layer interaction signaling , the interface protocols between the terminal and the CSCF, between the CSCFs, and between the CSCF and the AS are all SIP protocols. However, the SIP protocol does not define a protocol so that the intermediate node can detect whether the session is active after the session is established, which causes the intermediate node in the IMS system to fail to release resources when the terminal fails to send the release indication message. The Session Timers protocol is a supplement to the SIP protocol for this problem, and is an extension of the SIP protocol. The Session Timers protocol allows a terminal in the session to be responsible for periodically initiating a session update request to ensure that the session is active. If no session update request is received within the period or the session update request fails to be sent, it indicates that the session is already in an inactive state. , then the terminal releases related resources. Intermediate nodes in the IMS system, such as P-CSCF or S-CSCF, directly release the session-related resources after timeout. This ensures the timely release of related resources.

按照Session Timers协议的规定,对于作为代理服务器(PROXY)的节点能够很方便的实现,例如P-CSCF和S-CSCF通常只作为PROXY单元.但是对于AS这种通常作为背靠背用户代理(B2BUA)单元,Session Timers协议没有进行规定,如果直接硬套该协议的话,在会话的过程中对会话更新请求进行多次无意义的转发或者发生碰撞,无法顺利实现,所以,B2BUA单元的资源释放问题还没有很好地解决。According to the provisions of the Session Timers protocol, it can be conveniently implemented for nodes as proxy servers (PROXY). For example, P-CSCF and S-CSCF are usually only used as PROXY units. But for AS, they are usually used as back-to-back user agent (B2BUA) units. , the Session Timers protocol is not stipulated. If the protocol is directly enforced, the session update request will be forwarded many times meaninglessly or collided during the session, which cannot be realized smoothly. Therefore, the resource release problem of the B2BUA unit has not yet been solved. Nice work out.

图1A为主叫终端发出会话更新请求的无意义转发的流程示意图。FIG. 1A is a schematic flow diagram of meaningless forwarding of a session update request sent by a calling terminal.

步骤100、主叫终端向B2BUA1单元发出会话建立请求消息。Step 100, the calling terminal sends a session establishment request message to the B2BUA1 unit.

主叫终端发出的会话建立请求消息中包含会话终止(Session-Expires)头域,也可能包含带时间标签的支持(supported:timer)头域和/或最小会话终止(Min_SE)头域。The session establishment request message sent by the calling terminal includes a session-expires (Session-Expires) header field, and may also include a time-stamped supported (supported:timer) header field and/or a minimum session-expires (Min_SE) header field.

如果主叫终端和B2BUA1之间有PROXY单元,则PROXY单元将收到的会话建立请求消息进行转发。If there is a PROXY unit between the calling terminal and the B2BUA1, the PROXY unit forwards the received session establishment request message.

步骤101、B2BUA1单元收到会话建立请求消息进行Session Timers协议规定的相关处理。Step 101, the B2BUA1 unit receives the session establishment request message and performs related processing specified in the Session Timers protocol.

B2BUA1单元的用户代理服务器(UAS)端检查消息中是否含有带有supported:timer头域。The user agent server (UAS) side of the B2BUA1 unit checks whether the supported:timer header field is included in the message.

如果会话建立请求消息中带有supported:timer头域,并且Session-Expires头域的值小于本地Min_SE头域的值,则向主叫终端回复表明会话更新间隔太短的响应并在响应中带上本地Min_SE头域的值,主叫终端收到回复响应后将Session-Expires头域的值改成不小于Min_SE头域的值,重新向B2BUA1单元发送。If there is a supported:timer header field in the session establishment request message, and the value of the Session-Expires header field is smaller than the value of the local Min_SE header field, then reply to the calling terminal with a response indicating that the session update interval is too short and include the The value of the local Min_SE header field. After receiving the response, the calling terminal changes the value of the Session-Expires header field to not less than the value of the Min_SE header field and sends it to the B2BUA1 unit again.

如果会话建立请求消息中不带有supported:timer头域,并且Session-Expires头域的值小于本地Min_SE头域的值,在消息中有Min_SE头域时,将请求消息中Min_SE头域的值增加到与本地Min_SE头域的值相等并作为Session-Expires头域的值,在消息中没有Min_SE头域时,在请求消息中插入Min_SE头域,其值为本地Min_SE头域的值,并将该值做为Session-Expires头域的值。If the session establishment request message does not contain the supported:timer header field, and the value of the Session-Expires header field is smaller than the value of the local Min_SE header field, if there is a Min_SE header field in the message, increase the value of the Min_SE header field in the request message It is equal to the value of the local Min_SE header field and used as the value of the Session-Expires header field. If there is no Min_SE header field in the message, the Min_SE header field is inserted in the request message, and its value is the value of the local Min_SE header field, and the The value is used as the value of the Session-Expires header field.

无论会话建立请求中是否含有带有supported:timer头域,只要Session-Expires头域的值不小于本地Min_SE头域的值,则可以不对Session-Expires的值进行任何修改,也可以在不小于消息中Min_SE头域的值且不小于本地Min_SE头域的值的基础上适当减小Session-Expires头域的值。Regardless of whether the session establishment request contains the supported:timer header field, as long as the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the value of Session-Expires may not be modified in any way, or the value of the message Properly reduce the value of the Session-Expires header field on the basis of the value of the Min_SE header field and not less than the value of the local Min_SE header field.

B2BUA1单元的用户代理客户(UAC)端根据UAS端处理后的会话建立请求消息构造新的会话建立请求消息。The user agent client (UAC) of the B2BUA1 unit constructs a new session establishment request message according to the session establishment request message processed by the UAS end.

步骤102、B2BUA1单元将处理后的会话建立请求消息发送给PROXY单元。Step 102, the B2BUA1 unit sends the processed session establishment request message to the PROXY unit.

如果是多个PROXY单元,则每个PROXY单元都将会话建立请求消息进行转发;如果没有PROXY单元,则B2BUA1直接将会话建立请求消息发送给B2BUA2。If there are multiple PROXY units, each PROXY unit forwards the session establishment request message; if there is no PROXY unit, B2BUA1 directly sends the session establishment request message to B2BUA2.

步骤103、PROXY单元将收到的会话建立请求消息发送给AS(B2BUA2单元)。Step 103, the PROXY unit sends the received session establishment request message to the AS (B2BUA2 unit).

步骤104、B2BUA2单元收到会话建立请求消息进行Session Timers协议规定的相关处理。Step 104, the B2BUA2 unit receives the session establishment request message and performs related processing specified in the Session Timers protocol.

处理过程与步骤101的处理过程相同。The processing procedure is the same as that of step 101.

步骤105、B2BUA2单元将处理后的会话建立请求消息发送给被叫终端。Step 105, the B2BUA2 unit sends the processed session establishment request message to the called terminal.

如果B2BUA2和被叫终端之间有PROXY单元,则PROXY单元将收到的会话建立请求消息进行转发。If there is a PROXY unit between the B2BUA2 and the called terminal, the PROXY unit forwards the received session establishment request message.

步骤106、被叫终端向B2BUA2单元发送表示成功的200响应消息。Step 106, the called terminal sends a 200 response message indicating success to the B2BUA2 unit.

如果B2BUA2和被叫终端之间有PROXY单元,则PROXY单元将收到的200响应消息进行转发。If there is a PROXY unit between the B2BUA2 and the called terminal, the PROXY unit forwards the received 200 response message.

步骤107、B2BUA2单元收到200响应消息进行Session Timers协议规定的相关处理。Step 107, the B2BUA2 unit receives the 200 response message and performs related processing specified in the Session Timers protocol.

B2BUA2单元的UAC端根据响应消息中Session-Expires头域的时间和刷新者(refresher)参数,会话协商将刷新者设为uac,因此B2BUA2单元的UAC端启动发起会话更新请求定时器和超时释放定时器时器。The UAC end of the B2BUA2 unit sets the refresher to uac according to the time of the Session-Expires header field in the response message and the refresher (refresher) parameter in the session negotiation, so the UAC end of the B2BUA2 unit starts the session update request timer and the timeout release timer Timer.

B2BUA2单元的UAS端根据Session-Expires头域的值启动超时释放定时器时器。The UAS side of the B2BUA2 unit starts the timeout release timer according to the value of the Session-Expires header field.

会话协商将刷新者为设为uac,因此B2BUA2单元的UAS端不启动发送会话更新请求定时器。Session negotiation sets the refresher as uac, so the UAS side of the B2BUA2 unit does not start the timer for sending session update requests.

步骤108、B2BUA2单元将处理后的200响应消息发送给PROXY单元。Step 108, the B2BUA2 unit sends the processed 200 response message to the PROXY unit.

步骤109、PROXY单元将收到的200响应消息发送给AS(B2BUA1单元)。Step 109, the PROXY unit sends the received 200 response message to the AS (B2BUA1 unit).

如果是多个PROXY单元,则每个PROXY单元都将消息进行转发;如果没有PROXY单元,则B2BUA2直接将消息发送给B2BUA1。If there are multiple PROXY units, each PROXY unit forwards the message; if there is no PROXY unit, B2BUA2 directly sends the message to B2BUA1.

步骤110、B2BUA1单元收到200响应消息进行Session Timers协议规定的相关处理。Step 110, the B2BUA1 unit receives the 200 response message and performs related processing specified in the Session Timers protocol.

处理过程与步骤107的处理过程相同。The processing procedure is the same as that of step 107.

步骤111、B2BUA1单元将处理的200响应消息发送给主叫终端。Step 111, the B2BUA1 unit sends the processed 200 response message to the calling terminal.

主叫终端收到200响应消息后,会话成功建立,同时Session Timers也协商成功。主叫终端的会话更新定时器启动计时。After the calling terminal receives the 200 response message, the session is successfully established, and the session timers are also successfully negotiated. The session update timer of the calling terminal starts timing.

步骤112、根据协商时确定的参数refresher为uac,主叫终端负责发起会话更新请求,那么主叫终端的会话更新定时器过了(Session Expires/2)秒通知主叫终端向B2BUA1单元发出会话更新请求。Step 112, according to the parameter refresher determined during negotiation as uac, the calling terminal is responsible for initiating a session update request, then the session update timer of the calling terminal has passed (Session Expires/2) seconds to notify the calling terminal to send a session update to the B2BUA1 unit ask.

步骤113、根据协商时确定的参数refresher为uac,B2BUA1单元的UAC端负责发起会话更新请求,B2BUA1单元的会话更新定时器过了(SessionExpires/2)秒通知B2BUA1单元的UAC端向PROXY单元发出会话更新请求。Step 113, according to the parameter refresher determined during negotiation as uac, the UAC end of the B2BUA1 unit is responsible for initiating a session update request, and the session update timer of the B2BUA1 unit has passed (SessionExpires/2) seconds to notify the UAC end of the B2BUA1 unit to send a session to the PROXY unit update request.

步骤114、B2BUA1单元将主叫终端发送的会话更新请求进行相关处理并发送给PROXY单元。Step 114, the B2BUA1 unit processes the session update request sent by the calling terminal and sends it to the PROXY unit.

步骤115、PROXY单元将B2BUA1单元发送的会话更新请求发送给AS(B2BUA2单元)。Step 115, the PROXY unit sends the session update request sent by the B2BUA1 unit to the AS (B2BUA2 unit).

步骤116、PROXY单元将B2BUA1单元发送的会话更新请求发送给AS(B2BUA2单元)。Step 116, the PROXY unit sends the session update request sent by the B2BUA1 unit to the AS (B2BUA2 unit).

步骤117、根据协商时确定的参数refresher为uac,B2BUA2单元的UAC端负责发起会话更新请求,B2BUA2单元的会话更新定时器过了(SessionExpires/2)秒通知B2BUA2单元向被叫终端发出会话更新请求。Step 117, according to the parameter refresher determined during negotiation as uac, the UAC side of the B2BUA2 unit is responsible for initiating a session update request, and the session update timer of the B2BUA2 unit has passed (SessionExpires/2) seconds to notify the B2BUA2 unit to send a session update request to the called terminal .

步骤118、B2BUA2单元将PROXY单元发送的会话更新请求进行相关处理并发送给被叫终端。Step 118, the B2BUA2 unit processes the session update request sent by the PROXY unit and sends it to the called terminal.

步骤119、B2BUA2单元将PROXY单元发送的会话更新请求进行相关处理并发送给被叫终端.Step 119: The B2BUA2 unit processes the session update request sent by the PROXY unit and sends it to the called terminal.

图1B为主叫终端发出会话更新请求的碰撞流程示意图。FIG. 1B is a schematic diagram of a collision process in which a calling terminal sends a session update request.

步骤1000、主叫终端向B2BUA1单元发出会话建立请求消息。Step 1000, the calling terminal sends a session establishment request message to the B2BUA1 unit.

如果主叫终端和B2BUA1之间有PROXY单元,则PROXY单元将收到的会话建立请求消息进行转发。If there is a PROXY unit between the calling terminal and the B2BUA1, the PROXY unit forwards the received session establishment request message.

步骤1001、B2BUA1单元收到会话建立请求消息进行Session Timers协议规定的相关处理。Step 1001, the B2BUA1 unit receives the session establishment request message and performs related processing specified in the Session Timers protocol.

B2BUA1单元的UAS端检查消息中是否含有带有supported:timer头域。The UAS side of the B2BUA1 unit checks whether the message contains the supported:timer header field.

如果会话建立请求消息中带有supported:timer头域,并且Session-Expires头域的值小于本地Min_SE头域的值,则向主叫终端回复表明会话更新间隔太短的响应并在响应中带上本地Min_SE头域的值,主叫终端收到回复响应后将Session-Expires头域的值改成不小于Min_SE头域的值,重新向B2BUA1单元发送。If there is a supported:timer header field in the session establishment request message, and the value of the Session-Expires header field is smaller than the value of the local Min_SE header field, then reply to the calling terminal with a response indicating that the session update interval is too short and include the The value of the local Min_SE header field. After receiving the response, the calling terminal changes the value of the Session-Expires header field to not less than the value of the Min_SE header field and sends it to the B2BUA1 unit again.

如果会话建立请求消息中不带有supported:timer头域,表示主叫终端不支持Session Timers协议,并且Session-Expires头域的值小于本地Min_SE头域的值,在消息中有Min_SE头域时,将请求消息中Min_SE头域的值增加到与本地Min_SE头域的值相等并作为Session-Expires头域的值,在消息中没有Min_SE头域时,在请求消息中插入Min_SE头域,其值为本地Min_SE头域的值,并将该值做为Session-Expires头域的值。If the supported:timer header field is not included in the session establishment request message, it means that the calling terminal does not support the Session Timers protocol, and the value of the Session-Expires header field is smaller than the value of the local Min_SE header field. If there is a Min_SE header field in the message, Increase the value of the Min_SE header field in the request message to be equal to the value of the local Min_SE header field and use it as the value of the Session-Expires header field. If there is no Min_SE header field in the message, insert the Min_SE header field in the request message, and its value is The value of the local Min_SE header field, and use this value as the value of the Session-Expires header field.

无论会话建立请求消息中是否含有带有supported:timer头域,只要Session-Expires头域的值不小于本地Min_SE头域的值,则可以不对Session-Expires的值进行任何修改,也可以在不小于消息中Min_SE头域的值且不小于本地Min_SE头域的值的基础上适当减小Session-Expires头域的值。Regardless of whether the session establishment request message contains the supported:timer header field, as long as the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the value of Session-Expires may not be modified in any way, or it may be not less than Properly reduce the value of the Session-Expires header field on the basis of the value of the Min_SE header field in the message and not less than the value of the local Min_SE header field.

B2BUA1单元的UAC端根据UAS端处理后的请求消息构造新的请求消息。The UAC side of the B2BUA1 unit constructs a new request message according to the request message processed by the UAS side.

步骤1002、B2BUA1单元将处理后的会话建立请求消息发送给PROXY单元。Step 1002, the B2BUA1 unit sends the processed session establishment request message to the PROXY unit.

如果是多个PROXY单元,则每个PROXY单元都将会话建立请求消息进行转发;如果没有PROXY单元,则B2BUA1直接将会话建立请求消息发送给B2BUA2。If there are multiple PROXY units, each PROXY unit forwards the session establishment request message; if there is no PROXY unit, B2BUA1 directly sends the session establishment request message to B2BUA2.

步骤1003、PROXY单元将收到的会话建立请求消息发送给AS(B2BUA2单元)。Step 1003, the PROXY unit sends the received session establishment request message to the AS (B2BUA2 unit).

步骤1004、B2BUA2单元收到请求消息进行Session Timers协议规定的相关处理。Step 1004, the B2BUA2 unit receives the request message and performs related processing specified in the Session Timers protocol.

处理过程与步骤1001的处理过程相同。The processing procedure is the same as that of step 1001.

步骤1005、B2BUA2单元将处理后的会话建立请求消息发送给被叫终端。Step 1005, the B2BUA2 unit sends the processed session establishment request message to the called terminal.

如果B2BUA2和被叫终端之间有PROXY单元,则PROXY单元将收到的会话建立请求消息进行转发。If there is a PROXY unit between the B2BUA2 and the called terminal, the PROXY unit forwards the received session establishment request message.

步骤1006、被叫终端向B2BUA2单元发送表示成功的200响应消息。Step 1006, the called terminal sends a 200 response message indicating success to the B2BUA2 unit.

如果B2BUA2和被叫终端之间有PROXY单元,则PROXY单元将收到的200响应消息进行转发。If there is a PROXY unit between the B2BUA2 and the called terminal, the PROXY unit forwards the received 200 response message.

步骤1007、B2BUA2单元收到200响应消息进行规定的相关处理。Step 1007, the B2BUA2 unit receives the 200 response message and performs the specified related processing.

B2BUA2单元的UAC端根据响应消息中Session-Expires头域的时间和refresher参数,会话协商将B2BUA2与被叫终端之间的refresher设置为refresher=uac,因此B2BUA2单元的UAC端启动会话更新定时器和会话超时释放定时器。The UAC side of the B2BUA2 unit sets the refresher between the B2BUA2 and the called terminal as refresher=uac according to the time of the Session-Expires header field in the response message and the refresher parameter in the session negotiation, so the UAC side of the B2BUA2 unit starts the session update timer and Session timeout release timer.

B2BUA2单元的UAS端根据Session-Expires头域的值和refresher参数启动相关定时器.The UAS side of the B2BUA2 unit starts the relevant timer according to the value of the Session-Expires header field and the refresher parameter.

会话协商将B2BUA1与B2BUA2之间的refresher设置为refresher=uas,因此B2BUA2单元的UAS端启动会话更新定时器和会话超时释放定时器。The session negotiation sets the refresher between B2BUA1 and B2BUA2 as refresher=uas, so the UAS side of the B2BUA2 unit starts the session update timer and the session timeout release timer.

步骤1008、B2BUA2单元将处理后的200响应消息发送给PROXY单元。Step 1008, the B2BUA2 unit sends the processed 200 response message to the PROXY unit.

步骤1009、PROXY单元将收到的200响应消息发送给AS(B2BUA1单元)。Step 1009, the PROXY unit sends the received 200 response message to the AS (B2BUA1 unit).

如果是多个PROXY单元,则每个PROXY单元都将消息进行转发;如果没有PROXY单元,则B2BUA2直接将消息发送给B2BUA1。If there are multiple PROXY units, each PROXY unit forwards the message; if there is no PROXY unit, B2BUA2 directly sends the message to B2BUA1.

步骤1010、B2BUA1单元收到200响应消息进行Session Timers协议规定的相关处理。Step 1010, the B2BUA1 unit receives the 200 response message and performs related processing specified in the Session Timers protocol.

B2BUA1单元的UAC端根据响应消息中Session-Expires头域的时间和refresher参数,启动相关定时器。The UAC side of the B2BUA1 unit starts the relevant timer according to the time in the Session-Expires header field and the refresher parameter in the response message.

会话协商将B2BUA1与B2BUA2之间的refresher设置为refresher=uas,因此B2BUA1单元的UAC端不启动会话更新定时器和会话超时释放定时器。The session negotiation sets the refresher between B2BUA1 and B2BUA2 as refresher=uas, so the UAC side of the B2BUA1 unit does not start the session update timer and the session timeout release timer.

B2BUA1单元的UAS端根据Session-Expires头域的值和refresher参数启动相关定时器。The UAS side of the B2BUA1 unit starts the relevant timer according to the value of the Session-Expires header field and the refresher parameter.

会话协商将B2BUA1与B2BUA2之间的refresher设置为refresher=uas,因此B2BUA2单元的UAS端不启动会话更新定时器和会话超时释放定时器。The session negotiation sets the refresher between B2BUA1 and B2BUA2 as refresher=uas, so the UAS side of the B2BUA2 unit does not start the session update timer and the session timeout release timer.

步骤1011、B2BUA1单元将处理的200响应消息发送给主叫终端。Step 1011, the B2BUA1 unit sends the processed 200 response message to the calling terminal.

主叫终端收到200响应消息后,会话成功建立,同时Session Timers也协商成功。主叫终端的会话更新定时器启动计时。After the calling terminal receives the 200 response message, the session is successfully established, and the session timers are also successfully negotiated. The session update timer of the calling terminal starts timing.

步骤1012、根据协商时确定的参数refresher,主叫终端到B2BUA1之间refresher=uac,B2BUA1与B2BUA2之间refresher=uas,B2BUA2与被叫终端之间refresher=uac,那么主叫终端负责发起会话更新请求,主叫终端的会话更新定时器过了(SessionExpires/2)秒通知主叫终端向B2BUA1单元发出会话更新请求。Step 1012, according to the parameter refresher determined during negotiation, refresher=uac between the calling terminal and B2BUA1, refresher=uas between B2BUA1 and B2BUA2, refresher=uac between B2BUA2 and the called terminal, then the calling terminal is responsible for initiating session update request, the calling terminal's session update timer expires (SessionExpires/2) seconds to notify the calling terminal to send a session update request to the B2BUA1 unit.

步骤1013、B2BUA1单元将主叫终端发送的会话更新请求进行相关处理并发送给PROXY单元。Step 1013, the B2BUA1 unit processes the session update request sent by the calling terminal and sends it to the PROXY unit.

步骤1014、PROXY单元将B2BUA1单元发送的会话更新请求发送给AS(B2BUA2单元)。Step 1014, the PROXY unit sends the session update request sent by the B2BUA1 unit to the AS (B2BUA2 unit).

步骤1015、B2BUA2单元将PROXY单元发送的会话更新请求进行相关处理并发送给被叫终端。Step 1015, the B2BUA2 unit processes the session update request sent by the PROXY unit and sends it to the called terminal.

步骤1016、根据协商时确定的参数refresher,主叫终端到B2BUA1之间refresher=uac,B2BUA1与B2BUA2之间refresher=uas,B2BUA2与被叫终端之间refresher=uac,那么B2BUA2单元负责发起会话更新请求,B2BUA2单元的会话更新定时器过了(SessionExpires/2)秒通知B2BUA2单元向PROXY单元发出会话更新请求。Step 1016, according to the parameter refresher determined during negotiation, refresher=uac between the calling terminal and B2BUA1, refresher=uas between B2BUA1 and B2BUA2, refresher=uac between B2BUA2 and the called terminal, then the B2BUA2 unit is responsible for initiating a session update request , the B2BUA2 unit's session update timer expires (SessionExpires/2) seconds to notify the B2BUA2 unit to send a session update request to the PROXY unit.

步骤1017、PROXY单元将B2BUA2单元发送的会话更新请求发送给AS(B2BUA1单元)。Step 1017, the PROXY unit sends the session update request sent by the B2BUA2 unit to the AS (B2BUA1 unit).

步骤1018、B2BUA1单元将PROXY单元发送的会话更新请求进行相关处理并发送给主叫终端。Step 1018, the B2BUA1 unit processes the session update request sent by the PROXY unit and sends it to the calling terminal.

步骤1019、根据协商时确定的参数refresher,主叫终端到B2BUA1之间refresher=uac,B2BUA1与B2BUA2之间refresher=uas,B2BUA2与被叫终端之间refresher=uac,那么B2BUA2单元负责发起会话更新请求,B2BUA2单元的会话更新定时器过了(SessionExpires/2)秒通知B2BUA2单元向被叫终端发出会话更新请求.Step 1019, according to the parameter refresher determined during negotiation, refresher=uac between the calling terminal and B2BUA1, refresher=uas between B2BUA1 and B2BUA2, refresher=uac between B2BUA2 and the called terminal, then the B2BUA2 unit is responsible for initiating a session update request , the B2BUA2 unit’s session update timer expires (SessionExpires/2) seconds to notify the B2BUA2 unit to send a session update request to the called terminal.

从图1B中可以看出,在B2BUA1单元上,步骤1012和步骤1017的会话更新请求发生碰撞,并且B2BUA1单元转发多余的会话更新请求。It can be seen from FIG. 1B that on the B2BUA1 unit, the session update requests in step 1012 and step 1017 collide, and the B2BUA1 unit forwards redundant session update requests.

现有技术中还可能从被叫终端发出会话更新请求,则主叫终端到B2BUA1之间refresher=uas,B2BUA1与B2BUA2之间refresher=uac,B2BUA2与被叫终端之间refresher=uas,B2BUA2单元附近会话更新请求发生碰撞,B2BUA2单元转发多余的会话更新请求。In the prior art, it is also possible to send a session update request from the called terminal, then refresher=uas between the calling terminal and B2BUA1, refresher=uac between B2BUA1 and B2BUA2, refresher=uas between B2BUA2 and the called terminal, near the B2BUA2 unit Session update requests collide, and the B2BUA2 unit forwards redundant session update requests.

综上所述,在现有技术中,如果会话处于非活动状态,需要释放会话资源,要求主叫终端或被叫终端至少有一个支持Session Timers协议,由支持SessionTimers协议的主叫终端或被叫终端发出的会话更新请求。如果主叫终端或被叫终端都不支持Session Timers协议,每个B2BUA单元将无法释放为该会话分配的资源。To sum up, in the prior art, if the session is in an inactive state, session resources need to be released, and at least one of the calling terminal or the called terminal is required to support the Session Timers protocol, and the calling terminal or the called terminal that supports the SessionTimers protocol A session update request from an endpoint. If neither the calling terminal nor the called terminal supports the Session Timers protocol, each B2BUA unit will not be able to release the resources allocated for the session.

而且,如果由主叫终端发送会话更新请求,则每个B2BUA单元收到会话更新请求后,由于无法判断当前该请求消息是会话更新请求消息还是普通的业务协商消息,因此都生成一个新会话更新请求,并将收到的会话更新请求和新会话更新请求发送给会话建立所途径的下一B2BUA单元,直至被叫终端。同样,如果由被叫终端发送会话更新请求,则每个B2BUA单元收到会话更新请求后,也都将收到的会话更新请求和生成的新会话更新请求向主叫侧发送,直至主叫终端。因此,由于每个B2BUA单元都会转发并发起会话更新请求,最后用户终端会收到大量无意义的会话更新请求,如果B2BUA单元在收到会话更新请求后向两侧发送新的会话更新请求,还会造成会话更新请求的碰撞。Moreover, if the session update request is sent by the calling terminal, after each B2BUA unit receives the session update request, it cannot judge whether the current request message is a session update request message or a common service negotiation message, so a new session update request message is generated. request, and send the received session update request and new session update request to the next B2BUA unit through which the session is established until the called terminal. Similarly, if the called terminal sends a session update request, after each B2BUA unit receives the session update request, it will also send the received session update request and the generated new session update request to the calling side until the calling terminal . Therefore, since each B2BUA unit will forward and initiate a session update request, the user terminal will receive a large number of meaningless session update requests in the end. If the B2BUA unit sends a new session update request to both sides after receiving the session update request, it will Will cause a collision of session update requests.

发明内容Contents of the invention

本发明的主要目的是提供一种实现资源释放的方法和系统,使其在终端不支持Session Timers协议的情况下,在会话处于非活动状态时,能实现资源释放。The main purpose of the present invention is to provide a method and system for realizing resource release, so that it can realize resource release when the session is in an inactive state when the terminal does not support the Session Timers protocol.

本发明的另一个目的是提供一种背靠背用户代理装置,应用于资源释放系统中,在终端不支持Session Timers协议时,如果会话处于非活动状态,能实现资源释放。Another object of the present invention is to provide a back-to-back user agent device, which is applied in a resource release system, and can realize resource release if the session is in an inactive state when the terminal does not support the Session Timers protocol.

本发明提供的一种实现资源释放的方法包括:A method for realizing resource release provided by the present invention includes:

当收到会话建立请求消息后,判断其中是否含有带时间timer标签的支持Supported头域,如果是,将该会话建立请求消息转发出去,否则,在该消息中增加带timer标签的Supported头域,并将该会话建立请求消息转发出去;After receiving the session establishment request message, judge whether it contains the Supported header field with the time timer tag, if so, forward the session establishment request message, otherwise, add the Supported header field with the timer tag in the message, and forward the session establishment request message;

在会话建立过程中,节点设备之间进行刷新者协商,确定一节点设备为刷新者;During the session establishment process, refresher negotiation is carried out between node devices, and a node device is determined as the refresher;

在会话建立后,由协商确定为刷新者的节点设备向其他的网络节点发送会话更新请求。After the session is established, the node device determined to be the refresher through negotiation sends a session update request to other network nodes.

在会话建立后,该方法还可以包括:每个节点设备收到会话更新请求后,判断会话更新请求中是否含有带timer标签的Supported头域,如果是,则只根据收到的会话更新请求向会话所途径的下一节点设备发送会话更新请求。After the session is established, the method may also include: after each node device receives the session update request, judge whether the session update request contains a Supported header field with a timer label, and if so, send the The next node device through which the session passes sends a session update request.

所述节点设备之间进行刷新者协商,确定一节点设备为刷新者的步骤可以包括:The refresher negotiation is performed between the node devices, and the step of determining a node device as the refresher may include:

A11、B2BUA单元在向会话建立所途径的节点设备转发的该会话建立请求消息中的会话终止Session-Expires头域中添加刷新者参数,将刷新者refresher设置为用户代理客户端uac,用于表明本B2BUA单元负责向被叫终端发起会话更新请求;A11. The B2BUA unit adds the refresher parameter in the session termination Session-Expires header field in the session establishment request message forwarded to the node device through which the session is established, and sets the refresher refresher as the user agent client uac to indicate The B2BUA unit is responsible for initiating a session update request to the called terminal;

A12、该B2BUA单元收到会话建立响应消息后,则在向主叫终端回复的会话建立响应消息中的Session-Expires头域中添加刷新者参数,将refresher设置为用户代理服务器端uas,用于表明本B2BUA单元负责向主叫终端发起会话更新请求。A12. After the B2BUA unit receives the session establishment response message, it adds a refresher parameter to the Session-Expires header field in the session establishment response message returned to the calling terminal, and sets refresher as the user agent server-side uas for Indicates that the B2BUA unit is responsible for initiating a session update request to the calling terminal.

所述节点设备之间进行刷新者协商,确定一节点设备为刷新者的步骤可以包括:The refresher negotiation is performed between the node devices, and the step of determining a node device as the refresher may include:

A21、B2BUA单元向会话建立所途径的节点设备发送该会话建立请求消息,其中含有带timer标签的Supported头域,每个节点设备收到该会话建立请求消息后,向下一节点设备转发,直到被叫终端;A21, the B2BUA unit sends the session establishment request message to the node device through which the session is established, which contains a Supported header field with a timer label. After each node device receives the session establishment request message, it forwards it to the next node device until called terminal;

A22、被叫终端收到该会话建立请求消息后,如果确定自身为刷新者,则通过节点设备向该B2BUA返回会话建立响应消息,其中Session-Expires头域为uas,如果确定自身不为刷新者,则通过节点设备向该B2BUA返回自身不为刷新者的会话建立响应消息;A22. After the called terminal receives the session establishment request message, if it determines that it is the refresher, it returns a session establishment response message to the B2BUA through the node device, wherein the Session-Expires header field is uas, and if it determines that it is not the refresher , the node device returns to the B2BUA a session establishment response message that it is not the refresher;

A23、该B2BUA单元收到会话建立响应消息后,判断被叫终端是否为刷新者,如果是,执行步骤A24,否则,将自身作为刷新者,执行步骤A24;A23. After receiving the session establishment response message, the B2BUA unit judges whether the called terminal is the refresher, if yes, executes step A24, otherwise, takes itself as the refresher, and executes step A24;

A24、该B2BUA单元在向主叫终端回复的会话建立响应消息中Session-Expires头域中添加刷新者参数,将refresher设置为用户代理服务器端uas。A24. The B2BUA unit adds a refresher parameter to the Session-Expires header field in the session establishment response message returned to the calling terminal, and sets refresher as the uas of the user agent server.

在步骤A22中自身不为刷新者的会话建立响应消息可以为不含有带timer标签的Supported头域的会话建立响应消息;In step A22, the session establishment response message that is not the refresher itself may be a session establishment response message that does not contain the Supported header field with the timer tag;

在步骤A22中自身不为刷新者的会话建立响应消息可以为含有带timer标签的Supported头域的会话建立响应消息,其中Session-Expires头域的refresher为uas。In step A22, the session establishment response message that is not the refresher itself may be a session establishment response message that contains the Supported header field with the timer tag, where the refresher in the Session-Expires header field is uas.

本发明提供的一种实现资源释放的系统包括:一个或一个以上B2BUA单元,其中,每个B2BUA单元可以包括:A system for implementing resource release provided by the present invention includes: one or more B2BUA units, wherein each B2BUA unit may include:

会话协议判断模块,用于判断收到的会话建立请求消息中是否含有带timer标签的Supported头域,如果是,直接将该会话建立请求消息转发出去,否则,在该会话建立请求消息中添加带timer标签的Supported头域,将该会话建立请求消息转发出去;The session protocol judging module is used to judge whether the received session establishment request message contains the Supported header field with the timer label, if so, directly forwards the session establishment request message, otherwise, adds the header field with the timer label in the session establishment request message. The Supported header field of the timer tag forwards the session establishment request message;

资源释放模块,用于根据收到的会话更新响应消息判断会话状态是否正常,在该会话处于非活动状态,释放掉自身为该会话分配的资源。The resource release module is used to judge whether the session state is normal according to the received session update response message, and release the resources allocated by itself for the session when the session is in an inactive state.

刷新者协商模块,用于将该会话建立请求消息中的Session-Expires头域中添加刷新者参数,并根据收到的会话建立响应消息确定自身是否为刷新者;A refresher negotiation module, configured to add a refresher parameter to the Session-Expires header field in the session establishment request message, and determine whether it is a refresher according to the received session establishment response message;

会话更新请求模块,用于在会话建立后,如果确定自身为刷新者,分别向两侧本次会话建立所途径的网络节点发起会话更新请求;如果确定自身不是刷新者,判断收到的会话更新请求中是否含有带timer标签的Supported头域,如果是,则只向会话所途径的下一网络节点发送会话更新请求。The session update request module is used to initiate a session update request to the network nodes through which the session is established on both sides if it is determined that it is the refresher after the session is established; if it is determined that it is not the refresher, it judges the received session update Whether the request contains the Supported header field with the timer tag, and if so, only send the session update request to the next network node passed by the session.

本发明提供的一种背靠背用户代理装置包括:A back-to-back user agent device provided by the present invention includes:

会话协议判断模块,用于判断收到的会话建立请求消息中是否含有带timer标签的Supported头域,如果是,直接将该会话建立请求消息转发出去,否则,在该会话建立请求消息中添加带timer标签的Supported头域,将该会话建立请求消息转发出去;The session protocol judging module is used to judge whether the received session establishment request message contains the Supported header field with the timer label, if so, directly forwards the session establishment request message, otherwise, adds the header field with the timer label in the session establishment request message. The Supported header field of the timer tag forwards the session establishment request message;

资源释放模块,用于根据收到的会话更新响应消息判断会话状态是否正常,在该会话处于非活动状态,释放掉自身为该会话分配的资源;The resource release module is used to judge whether the session state is normal according to the received session update response message, and release the resources allocated by itself for the session when the session is in an inactive state;

刷新者协商模块,用于将该会话建立请求消息中的Session-Expires头域中添加刷新者参数,并根据收到的会话建立响应消息确定自身是否为刷新者;A refresher negotiation module, configured to add a refresher parameter to the Session-Expires header field in the session establishment request message, and determine whether it is a refresher according to the received session establishment response message;

会话更新请求模块,用于在会话建立后,如果确定自身为刷新者,分别向两侧本次会话建立所途径的网络节点发起会话更新请求;如果确定自身不是刷新者,判断收到的会话更新请求中是否含有带timer标签的Supported头域,如果是,则只向会话所途径的下一网络节点发送会话更新请求。The session update request module is used to initiate a session update request to the network nodes through which the session is established on both sides if it is determined that it is the refresher after the session is established; if it is determined that it is not the refresher, it judges the received session update Whether the request contains the Supported header field with the timer tag, and if so, only send the session update request to the next network node passed by the session.

本发明通过刷新者协商所确定的B2BUA单元向主叫终端和被叫终端发起会话更新请求,实现了主叫终端和被叫终端都不支持Session Timers协议的情况下也能实现资源释放,取消了其他B2BUA单元主动发起会话更新请求的行为,在收到会话更新请求后只转发该请求。避免了会话过程中会话更新请求无意义的转发和碰撞的问题。The present invention initiates a session update request to the calling terminal and the called terminal through the B2BUA unit determined through refresher negotiation, and realizes resource release even when neither the calling terminal nor the called terminal supports the Session Timers protocol. Other B2BUA units actively initiate the session update request, and only forward the request after receiving the session update request. The problem of meaningless forwarding and collision of session update requests during the session is avoided.

附图说明Description of drawings

图1A为主叫终端发出会话更新请求的无意义转发的流程示意图;FIG. 1A is a schematic flow diagram of meaningless forwarding of a session update request sent by a calling terminal;

图1B为主叫终端发出会话更新请求的会话更新请求碰撞的流程示意图;FIG. 1B is a schematic flow diagram of a session update request collision in which the calling terminal sends a session update request;

图2为实现本发明资源释放的系统结构示意图;FIG. 2 is a schematic structural diagram of a system for realizing resource release in the present invention;

图3为本发明的B2BUA装置的结构示意图;Fig. 3 is a schematic structural diagram of the B2BUA device of the present invention;

图4为本发明实现资源释放方法的流程示意图;FIG. 4 is a schematic flowchart of a method for realizing resource release in the present invention;

图5A为实现本发明方法的具体实施例一的流程示意图;FIG. 5A is a schematic flow diagram of a specific embodiment 1 for realizing the method of the present invention;

图5B为实现本发明方法的具体实施例二的流程示意图;FIG. 5B is a schematic flow diagram of a second embodiment of the method of the present invention;

图6为实现本发明方法的具体实施例三的流程示意图;FIG. 6 is a schematic flow diagram of a third embodiment of the method of the present invention;

图7为实现本发明方法的具体实施例四的流程示意图。FIG. 7 is a schematic flowchart of a fourth embodiment of the method of the present invention.

具体实施方式Detailed ways

针对目前在通信技术领域中,B2BUA单元上实现Session Timers协议存在会话更新请求信息发生多次无意义的转发和碰撞问题,本发明通过去掉B2BUA单元主动发起会话更新请求的功能解决了上述问题。并且会话建立过程中,通过改变B2BUA单元,使其能主动向主叫终端和被叫终端发起会话更新请求,从而实现了在主叫终端和被叫终端都不支持Session Timers协议的情况下,也能成功建立起Session Timers协议。Aiming at the problem of multiple meaningless forwarding and collisions of session update request information in the implementation of the Session Timers protocol on the B2BUA unit in the current communication technology field, the present invention solves the above problem by removing the function of the B2BUA unit actively initiating a session update request. And during the session establishment process, by changing the B2BUA unit, it can actively initiate a session update request to the calling terminal and the called terminal, so that even if the calling terminal and the called terminal do not support the Session Timers protocol, The Session Timers protocol can be successfully established.

在会话建立过程中,B2BUA单元接收到会话建立请求消息后,判断该会话建立请求消息中是否含有带时间timer标签的支持Supported头域,如果含有,则直接将该会话建立请求消息向下一节点设备转发;如果不含有,则在该会话建立请求消息中添加带timer标签的Supported头域,再将增加带timer标签的Supported头域的会话建立请求消息向下一节点设备转发。During the session establishment process, after receiving the session establishment request message, the B2BUA unit judges whether the session establishment request message contains the Supported header field with the time timer tag, and if so, sends the session establishment request message directly to the next node The device forwards it; if it does not contain it, add the Supported header field with the timer tag to the session establishment request message, and then forward the session establishment request message with the Supported header field with the timer tag added to the next node device.

在会话建立过程中,节点设备之间还可以进行刷新者协商。在会话建立后,由协商所确定的刷新者分别向与自身连接的两侧本次会话所途径的节点设备发起会话更新请求。每个节点设备收到会话更新请求后,根据收到的会话更新请求向上游或下游发送会话更新请求,直至主叫终端和被叫终端;每个节点设备在确定该会话处于非活动状态的情况下,释放掉自身为该会话分配的资源。During session establishment, refresher negotiation can also be performed between node devices. After the session is established, the refresher determined by the negotiation respectively initiates a session update request to the node devices on both sides of the current session that are connected to itself. After each node device receives the session update request, it sends a session update request upstream or downstream according to the received session update request until the calling terminal and the called terminal; each node device determines that the session is inactive Next, release the resources allocated by itself for the session.

在会话建立后,当B2BUA单元接收到会话建立请求消息后,如果确定消息中含有带timer标签的Supported头域,则不再生成会话更新请求,只向会话所途径的下一节点设备发送会话更新请求.After the session is established, when the B2BUA unit receives the session establishment request message, if it is determined that the message contains the Supported header field with the timer tag, it will no longer generate a session update request, and only send the session update to the next node device passed by the session ask.

图2为实现本发明资源释放的系统结构示意图。如图2所示,本发明的系统包括:一个或一个以上B2BUA单元,FIG. 2 is a schematic structural diagram of a system for implementing resource release in the present invention. As shown in Figure 2, the system of the present invention includes: one or more B2BUA units,

每个B2BUA单元,用于接收到来自上一节点设备的会话建立请求后,判断该会话建立请求中是否携带timer标签的Supported头域,如果含有,将该会话建立请求消息向下一节点设备转发,否则,在会话建立请求消息中添加带timer标签的Supported头域,将该会话建立请求消息向下一节点设备转发;在会话建立后,如果确定该会话处于非活动状态,释放掉自身为该会话分配的资源。Each B2BUA unit is used to determine whether the session establishment request carries the Supported header field of the timer label after receiving the session establishment request from the previous node device, and if so, forward the session establishment request message to the next node device , otherwise, add a Supported header field with a timer tag in the session establishment request message, and forward the session establishment request message to the next node device; after the session is established, if it is determined that the session is inactive, release itself as the Resources allocated by the session.

在会话建立后,如果B2BUA单元收到会话更新请求,B2BUA单元还进一步用于判断会话更新请求中是否带timer标签的Supported头域,如果是,则只根据收到的会话更新请求向会话所途径的下一网络节点发送会话更新请求。After the session is established, if the B2BUA unit receives the session update request, the B2BUA unit is further used to judge whether the Supported header field with the timer tag is included in the session update request. The next network node of the node sends a session update request.

如图3所示,本发明的B2BUA单元包括:会话协议判断模块和资源释放模块。其中,会话协议判断模块,用于判断收到的会话建立请求消息中是否带timer标签的Supported头域,如果是,直接将该会话建立请求消息转发出去,否则,在该会话建立请求消息中添加带timer标签的Supported头域,将该会话建立请求消息转发出去;源释放模块,用于根据收到的会话更新响应消息判断会话状态是否正常,在该会话处于非活动状态,释放掉自身为该会话分配的资源。As shown in Fig. 3, the B2BUA unit of the present invention includes: a session protocol judgment module and a resource release module. Wherein, the session agreement judging module is used to judge whether the Supported header field with the timer label is in the session establishment request message received, and if so, forwards the session establishment request message directly; otherwise, adds the session establishment request message in the session establishment request message The Supported header field with the timer tag forwards the session establishment request message; the source release module is used to judge whether the session status is normal according to the received session update response message, and release itself for the session when the session is in an inactive state. Resources allocated by the session.

当然,为了进行刷新者协商,B2BUA单元还可以进一步包括:刷新者协商模块和会话更新请求模块。其中,刷新者协商模块,用于将该会话建立请求消息中的会话终止Session-Expires头域中添加刷新者参数,并根据收到的会话建立响应消息确定自身是否为刷新者;会话更新请求模块,用于在会话建立后,如果确定自身为刷新者,分别向两侧本次会话建立所途径的网络节点发起会话更新请求;如果确定自身不是刷新者,判断收到的会话更新请求中是否带timer标签的Supported头域,如果是,则只向会话所途径的下一网络节点发送会话更新请求。Of course, in order to perform refresher negotiation, the B2BUA unit may further include: a refresher negotiation module and a session update request module. Wherein, the refresher negotiation module is used to add refresher parameters in the session termination Session-Expires header field in the session establishment request message, and determine whether itself is a refresher according to the session establishment response message received; the session update request module After the session is established, if it is determined that it is the refresher, it is used to initiate a session update request to the network nodes through which the session is established on both sides; if it is determined that it is not the refresher, it is determined whether the received session update request contains The Supported header field of the timer tag, if yes, only send a session update request to the next network node passed by the session.

图4为以第一B2BUA单元收到会话更新请求为例,本发明实现资源释放的流程示意图。其中,第一B2BUA单元为在会话建立过程中第一个收到会话建立请求消息的B2BUA单元,其余B2BUA单元与第一B2BUA单元方法类似,不再举例。Fig. 4 is a schematic diagram of the process of realizing resource release in the present invention, taking the first B2BUA unit receiving a session update request as an example. Wherein, the first B2BUA unit is the first B2BUA unit that receives the session establishment request message during the session establishment process, and the rest of the B2BUA units are similar to the first B2BUA unit, and no more examples are given.

参见图4所示,本发明实现资源释放的方法包括:Referring to Fig. 4, the method for realizing resource release in the present invention includes:

步骤400、第一B2BUA单元收到会话建立请求消息后,判断消息中是否含有带timer标签的Supported头域,如果有,表明主叫终端是支持Session Timers协议,则执行步骤401;否则,直接将该会话请求向下一节点设备转发,直到被叫终端,执行步骤407。Step 400, after the first B2BUA unit receives the session establishment request message, it judges whether the message contains the Supported header field with the timer tag, if so, it indicates that the calling terminal supports the Session Timers protocol, and then executes step 401; otherwise, directly The session request is forwarded to the next node device until the called terminal, and step 407 is executed.

步骤401、第一B2BUA单元收到会话建立请求消息后,第一B2BUA单元的UAC端在会话建立请求消息中插入supported:timer头域,并将会话建立请求消息中的Session-Expires头域中refresher设置为uac。Step 401: After the first B2BUA unit receives the session establishment request message, the UAC end of the first B2BUA unit inserts the supported:timer header field into the session establishment request message, and refreshes the session establishment request message in the Session-Expires header field. Set to uac.

步骤402、第一B2BUA单元向下一B2BUA单元发送增加supported:timer头域会话建立请求消息。Step 402, the first B2BUA unit sends a session establishment request message adding the supported:timer header field to the next B2BUA unit.

步骤403、每个B2BUA单元收到会话建立请求消息后,直接将会话建立请求消息发送给下一节点设备,直到被叫终端。Step 403, after receiving the session establishment request message, each B2BUA unit directly sends the session establishment request message to the next node device until the called terminal.

步骤404、被叫终端收到会话建立请求消息后,向与其连接的B2BUA单元返回会话建立响应消息,每个B2BUA单元收到会话建立请求消息后,只启动会话超时释放定时器,并将会话建立响应消息向上一级B2BUA单元发送,直到第一B2BUA单元。Step 404: After receiving the session establishment request message, the called terminal returns a session establishment response message to the B2BUA unit connected to it. After each B2BUA unit receives the session establishment request message, it only starts the session timeout release timer and sets the session establishment The response message is sent to the upper-level B2BUA unit until the first B2BUA unit.

步骤405、第一B2BUA单元收到该会话建立响应消息后,如果确定自身为刷新者,则在会话建立响应消息中插入supported:timer头域,并将Session-Expires头域中的参数refresher设置为refresher=uas,并将该会话建立响应消息发送给主叫终端。Step 405, after the first B2BUA unit receives the session establishment response message, if it determines that it is the refresher, it inserts the supported:timer header field in the session establishment response message, and sets the parameter refresher in the Session-Expires header field to refresher=uas, and send the session establishment response message to the calling terminal.

步骤406、在呼叫建立后,第一B2BUA单元向两侧发起会话更新请求。Step 406: After the call is established, the first B2BUA unit initiates a session update request to both parties.

步骤407、每个B2BUA单元收到会话更新请求后,判断会话更新请求中是否含有带timer标签的Supported头域,如果有,并直接向下一节点设备转发该会话更新请求,这里不产生新的会话更新请求,执行步骤410。Step 407, after each B2BUA unit receives the session update request, it judges whether the session update request contains the Supported header field with the timer label, and if so, directly forwards the session update request to the next node device, and no new one is generated here For a session update request, go to step 410.

步骤408、被叫终端收到会话建立请求消息后,向与其连接的B2BUA单元返回会话建立响应消息,每个B2BUA单元收到会话建立请求消息后,只启动会话超时释放定时器,并将会话建立响应消息向上一级B2BUA单元发送,直到第一B2BUA单元。Step 408: After receiving the session establishment request message, the called terminal returns a session establishment response message to the B2BUA unit connected to it. After each B2BUA unit receives the session establishment request message, it only starts the session timeout release timer and sets the session establishment The response message is sent to the upper-level B2BUA unit until the first B2BUA unit.

步骤409、在呼叫建立后,由主叫终端或被叫终端向与其相连的B2BUA单元发送会话更新请求,执行步骤410。Step 409: After the call is established, the calling terminal or the called terminal sends a session update request to the connected B2BUA unit, and step 410 is executed.

步骤410、每个B2BUA单元确定会话为非活动状态时,释放掉自身为该会话分配的资源。Step 410, when each B2BUA unit determines that the session is inactive, it releases the resources allocated by itself for the session.

上述步骤401~405为刷新者协商的过程。The above steps 401-405 are the refresher negotiation process.

节点设备可以根据自身情况,进行刷新者协商,确定自身为刷起方。The node device can carry out refresher negotiation according to its own situation, and determine itself as the refresher.

例如:第一B2BUA单元与被叫终端进行刷新者协商过程可以通过以下两种方式实现。For example, the refresher negotiation process between the first B2BUA unit and the called terminal can be implemented in the following two ways.

第一种方式:The first way:

(1)B2BUA单元在向会话建立所途径的节点设备转发的该会话建立请求消息中的Session-Expires头域中添加刷新者参数,将刷新者refresher设置为用户代理客户端uac,用于表明本B2BUA单元负责向被叫终端发起会话更新请求;(1) The B2BUA unit adds the refresher parameter in the Session-Expires header field of the session establishment request message forwarded to the node device through which the session is established, and sets the refresher refresher as the user agent client uac, which is used to indicate the The B2BUA unit is responsible for initiating a session update request to the called terminal;

(2)被叫终端收到该会话建立请求消息后,确定自身不为刷新者,则通过节点设备向该B2BUA返回自身不为刷新者的会话建立响应消息;(2) After receiving the session establishment request message, the called terminal determines that it is not the refresher, and returns a session establishment response message that it is not the refresher to the B2BUA through the node device;

(3)该B2BUA单元收到该会话建立响应消息后,确定自身为刷新者,则在向主叫终端回复的会话建立响应消息中的Session-Expires头域中添加刷新者参数,将refresher设置为用户代理服务器端uas。(3) After the B2BUA unit receives the session establishment response message, it determines itself as the refresher, then adds the refresher parameter in the Session-Expires header field in the session establishment response message returned to the calling terminal, and refresher is set to User agent server side uas.

第二种方式:The second way:

(1)B2BUA单元向会话建立所途径的节点设备发送该会话建立请求消息,其中含有带timer标签的Supported头域,每个节点设备收到该会话建立请求消息后,向下一节点设备转发,直到被叫终端;(1) The B2BUA unit sends the session establishment request message to the node device through which the session is established, which contains the Supported header field with the timer label, and each node device forwards the session establishment request message to the next node device after receiving the session establishment request message, until the called terminal;

(2)被叫终端收到该会话建立请求消息后,如果确定自身为刷新者,则通过节点设备向该B2BUA返回会话建立响应消息,其中Session-Expires头域为uas,如果确定自身不为刷新者,则通过节点设备向该B2BUA返回自身不为刷新者的会话建立响应消息;(2) After the called terminal receives the session establishment request message, if it determines that it is the refresher, it returns a session establishment response message to the B2BUA through the node device, wherein the Session-Expires header field is uas, and if it determines that it is not the refresher Otherwise, the node device returns to the B2BUA a session establishment response message that it is not the refresher;

(3)该B2BUA单元收到会话建立响应消息后,判断被叫终端是否为刷新者,如果是,执行步骤(4),否则,将自身作为刷新者,执行步骤(4);(3) After receiving the session establishment response message, the B2BUA unit judges whether the called terminal is a refresher, if yes, execute step (4), otherwise, use itself as the refresher, and execute step (4);

(4)该B2BUA单元在向主叫终端回复的会话建立响应消息中Session-Expires头域中添加刷新者参数,将refresher设置为用户代理服务器端uas。(4) The B2BUA unit adds a refresher parameter in the Session-Expires header field in the session establishment response message returned to the calling terminal, and sets refresher as the uas of the user agent server.

为了便于理解本发明,以下举具体实例进一步说明本发明的技术方案。In order to facilitate the understanding of the present invention, the following specific examples are given to further illustrate the technical solutions of the present invention.

如图5A所示,本实施例一实现资源释放的处理流程如下:As shown in FIG. 5A, the processing flow for implementing resource release in Embodiment 1 is as follows:

本实施例刷新者为B2BUA1,由B2BUA1向主叫和被叫终端发起会话更新请求。In this embodiment, the refresher is B2BUA1, and B2BUA1 initiates a session update request to the calling and called terminals.

步骤500、主叫终端向B2BUA1单元发送会话建立请求消息。Step 500, the calling terminal sends a session establishment request message to the B2BUA1 unit.

步骤501、B2BUA1单元收到会话建立请求消息,B2BUA1单元的UAS端检查消息中是否含有带supported:timer头域。Step 501, when the B2BUA1 unit receives the session establishment request message, the UAS side of the B2BUA1 unit checks whether the message contains the supported:timer header field.

如果会话建立请求消息中有supported:timer头域,则跳出本流程,否则,对该消息进行Session Timers协议的处理。If there is a supported:timer header field in the session establishment request message, skip this process; otherwise, process the message with the Session Timers protocol.

对该消息进行Session Timers协议的处理的具体过程为:The specific process of processing the message with the Session Timers protocol is as follows:

如果Session-Expires头域的值小于本地Min_SE头域的值,在消息中存在Min_SE头域时,将消息中Min_SE头域的值增大到与本地Min_SE头域的值相等并作为Session-Expires头域的值,在消息中没有Min_SE头域时,在请求消息中插入Min_SE头域,其值为本地Min_SE头域的值,并将该值做为Session-Expires的值。If the value of the Session-Expires header field is smaller than the value of the local Min_SE header field, if there is a Min_SE header field in the message, increase the value of the Min_SE header field in the message to be equal to the value of the local Min_SE header field and use it as the Session-Expires header The value of the field, if there is no Min_SE header field in the message, insert the Min_SE header field in the request message, its value is the value of the local Min_SE header field, and use this value as the value of Session-Expires.

如果Session-Expires头域的值不小于本地Min_SE头域的值,则处理方法与现有技术相同。If the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the processing method is the same as that of the prior art.

B2BUA1单元的UAC端根据UAS端处理后的会话建立请求消息,在该消息中插入supported:timer头域,并将Session-Expires头域中的参数refresher设置为refersher=uac,构造出新的会话建立请求消息。The UAC side of the B2BUA1 unit inserts the supported:timer header field into the message according to the session establishment request message processed by the UAS side, and sets the parameter refresher in the Session-Expires header field to referher=uac to construct a new session establishment request message.

步骤502、B2BUA1单元将处理后的会话建立请求消息发送给PROXY单元。Step 502, the B2BUA1 unit sends the processed session establishment request message to the PROXY unit.

步骤503、PROXY单元将收到的会话建立请求消息发送给AS(B2BUA2)单元。Step 503, the PROXY unit sends the received session establishment request message to the AS (B2BUA2) unit.

步骤504、B2BUA2单元收到会话建立请求消息,B2BUA2单元的UAS端比较Session-Expires头域的值和本地Min_SE头域的值。如果Session-Expires头域的值小,则向B2BUA1单元回复表明会话更新间隔太短的响应并在响应中带上本地Min_SE头域的值,B2BUA1收到回复响应后将Session-Expires头域的值改成Min_SE头域的值,向B2BUA2单元发送。Step 504, the B2BUA2 unit receives the session establishment request message, and the UAS side of the B2BUA2 unit compares the value of the Session-Expires header field with the value of the local Min_SE header field. If the value of the Session-Expires header field is small, it will reply to the B2BUA1 unit with a response indicating that the session update interval is too short and include the value of the local Min_SE header field in the response, and B2BUA1 will send the value of the Session-Expires header field after receiving the response Change it to the value of the Min_SE header field and send it to the B2BUA2 unit.

如果Session-Expires头域的值不小于本地Min_SE头域的值,则处理方法与现有技术相同。If the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the processing method is the same as that of the prior art.

B2BUA2单元的UAC端根据UAS端处理后的会话建立请求消息构造新的请求消息。The UAC side of the B2BUA2 unit constructs a new request message according to the session establishment request message processed by the UAS side.

步骤505、B2BUA2单元将处理后的会话建立请求消息发送给被叫终端。Step 505, the B2BUA2 unit sends the processed session establishment request message to the called terminal.

步骤506、被叫终端向B2BUA2单元发送表示成功的200响应消息。Step 506, the called terminal sends a 200 response message indicating success to the B2BUA2 unit.

步骤507、B2BUA2单元收到200响应消息,B2BUA2单元的UAC端根据响应消息中Session-Expires头域的值和refresher参数,不启动会话超时释放定时器和会话更新定时器。Step 507, when unit B2BUA2 receives the 200 response message, the UAC side of unit B2BUA2 does not start the session timeout release timer and session update timer according to the value of the Session-Expires header field and the refresher parameter in the response message.

B2BUA2单元的UAS端根据Session-Expires头域的值启动会话超时释放定时器,不启动会话更新定时器。The UAS side of the B2BUA2 unit starts the session timeout release timer according to the value of the Session-Expires header field, and does not start the session update timer.

步骤508、B2BUA2单元将被叫终端发出的200响应消息发送给PROXY单元。Step 508, the B2BUA2 unit sends the 200 response message sent by the called terminal to the PROXY unit.

步骤509、PROXY单元将收到的200响应消息发送给AS(B2BUA1单元)。Step 509, the PROXY unit sends the received 200 response message to the AS (B2BUA1 unit).

步骤510、B2BUA1单元收到200响应消息,B2BUA1单元的UAC端根据响应消息中Session-Expires头域的值和refresher参数,启动会话超时释放定时器和会话更新定时器。Step 510, when unit B2BUA1 receives a 200 response message, the UAC side of unit B2BUA1 starts a session timeout release timer and a session update timer according to the value of the Session-Expires header field and the refresher parameter in the response message.

B2BUA1单元的UAS端根据Session-Expires头域的值启动会话超时释放定时器和会话更新定时器。The UAS side of the B2BUA1 unit starts the session timeout release timer and the session update timer according to the value of the Session-Expires header field.

B2BUA1单元的UAS端在200响应消息中插入supported:timer头域,并将Session-Expires头域中的参数refresher设置为refersher=uas。The UAS end of the B2BUA1 unit inserts the supported:timer header field into the 200 response message, and sets the parameter refresher in the Session-Expires header field to referher=uas.

步骤511、B2BUA1单元将200响应消息发送给主叫终端。主叫终端收到200响应消息后,会话成功建立,同时Session Timers协议也协商成功。Step 511, the B2BUA1 unit sends a 200 response message to the calling terminal. After the calling terminal receives the 200 response message, the session is successfully established, and the Session Timers protocol is also successfully negotiated.

步骤512、根据协商时确定的参数refresher=uas,B2BUA1单元UAS端的会话更新定时器过了(SessionExpires/2)秒通知B2BUA1单元向主叫终端发出会话更新请求。Step 512: According to the parameter refresher=uas determined during the negotiation, the B2BUA1 unit UAS end session update timer expires (SessionExpires/2) seconds to notify the B2BUA1 unit to send a session update request to the calling terminal.

步骤513、主叫终端收到会话更新请求,向B2BUA1回复200响应消息。Step 513, the calling terminal receives a session update request, and returns a 200 response message to B2BUA1.

步骤514、B2BUA1单元收到200响应消息,根据刷新者的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器和会话更新定时器进行刷新,等到下个(SessionExpires/2)秒再向主叫终端发出会话更新请求,直到整个会话正常结束,Session Timers保护终止;如果处于非活动状态,则主动发送结束指令,并释放掉自身为该会话分配的资源,结束连接。Step 514, unit B2BUA1 receives the 200 response message, and judges whether the session is active according to the rule of the refresher. If the session is active, refresh the session timeout release timer and session update timer, wait until the next (SessionExpires/2) seconds to send a session update request to the calling terminal, until the entire session ends normally, and the Session Timers protection terminates ; If it is in an inactive state, it will actively send an end command, release the resources allocated by itself for the session, and end the connection.

步骤515、根据协商时确定的参数refresher=uac,B2BUA1单元UAC端的会话更新定时器过了(SessionExpires/2)秒通知B2BUA1单元向PROXY单元发出会话更新请求。Step 515: According to the parameter refresher=uac determined during the negotiation, the session update timer on the UAC side of the B2BUA1 unit has expired (SessionExpires/2) seconds to notify the B2BUA1 unit to send a session update request to the PROXY unit.

步骤516、PROXY单元将收到的会话更新请求发送给AS(B2BUA2单元)。Step 516, the PROXY unit sends the received session update request to the AS (B2BUA2 unit).

步骤517、B2BUA2单元收到会话更新请求判断消息中含有supported:timer头域,对消息进行相关处理并将该消息发送给被叫终端。Step 517, the B2BUA2 unit receives the session update request and judges that the supported:timer header field is included in the message, performs related processing on the message and sends the message to the called terminal.

B2BUA2单元对会话更新消息的相关处理和现有技术中是一样的。The relevant processing of the session update message by the B2BUA2 unit is the same as in the prior art.

步骤518、被叫终端收到会话更新请求向B2BUA2单元回复200响应消息。Step 518, the called terminal returns a 200 response message to the B2BUA2 unit upon receipt of the session update request.

步骤519、B2BUA2单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 519, unit B2BUA2 receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤520、B2BUA2单元将收到的200响应消息发送给PROXY单元。Step 520, the B2BUA2 unit sends the received 200 response message to the PROXY unit.

步骤521、PROXY单元将收到的200响应消息发送给AS(B2BUA1单元)。Step 521, the PROXY unit sends the received 200 response message to the AS (B2BUA1 unit).

步骤522、B2BUA1单元的UAC端收到200响应消息,根据刷新者的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器和会话更新定时器进行刷新操作,等到下个(Session Expires/2)秒再向PROXY单元发出会话更新请求,直到整个会话正常结束,Session Timers保护终止;如果处于非活动状态,则主动向主叫终端和PROXY单元发送给会话释放请求,并释放掉自身为该会话分配的资源,结束连接,PROXY单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给B2BUA2单元,B2BUA2单元收到请求后释放掉自身为该会话分配的资源。Step 522, the UAC end of the B2BUA1 unit receives the 200 response message, and judges whether the session is in an active state according to the rules of the refresher. If the session is active, refresh the session timeout release timer and session update timer, wait until the next (Session Expires/2) seconds and then send a session update request to the PROXY unit, until the entire session ends normally, Session Timers protection Termination; if it is in an inactive state, it will actively send a session release request to the calling terminal and the PROXY unit, and release the resources allocated by itself for the session, and end the connection. After receiving the request, the PROXY unit releases the resources allocated for the session by itself resources and send the request to the B2BUA2 unit, and the B2BUA2 unit releases the resources allocated for the session after receiving the request.

如图5B所示,本实施例二实现资源释放的处理流程如下:As shown in FIG. 5B , the processing flow for implementing resource release in Embodiment 2 is as follows:

本实施例刷新者为被叫终端,由被叫终端发起会话更新请求。In this embodiment, the refresher is the called terminal, and the called terminal initiates a session update request.

步骤5000、主叫终端向B2BUA1单元发送会话建立请求消息。Step 5000, the calling terminal sends a session establishment request message to the B2BUA1 unit.

步骤5001、B2BUA1单元收到会话建立请求消息,B2BUA1单元的UAS端检查消息中是否含有带supported:timer头域。Step 5001, when the B2BUA1 unit receives the session establishment request message, the UAS side of the B2BUA1 unit checks whether the message contains the supported:timer header field.

如果会话建立请求消息中有supported:timer头域,则跳出本流程,否则对该消息进行Session Timers协议的处理。If there is a supported:timer header field in the session establishment request message, skip this process; otherwise, process the message with the Session Timers protocol.

进行Session Timers协议的处理的步骤包括:The steps for processing the Session Timers protocol include:

如果Session-Expires头域的值小于本地Min_SE头域的值,在消息中存在Min_SE头域时,将消息中Min_SE头域的值增大到与本地Min_SE头域的值相等并作为Session-Expires头域的值,在消息中没有Min_SE头域时,在请求消息中插入Min_SE头域,其值为本地Min_SE头域的值,并将该值做为Session-Expires的值。If the value of the Session-Expires header field is smaller than the value of the local Min_SE header field, if there is a Min_SE header field in the message, increase the value of the Min_SE header field in the message to be equal to the value of the local Min_SE header field and use it as the Session-Expires header The value of the field, if there is no Min_SE header field in the message, insert the Min_SE header field in the request message, its value is the value of the local Min_SE header field, and use this value as the value of Session-Expires.

如果Session-Expires头域的值不小于本地Min_SE头域的值,则处理方法与现有技术相同。If the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the processing method is the same as that of the prior art.

B2BUA1单元的UAC端根据UAS端处理后的会话建立请求消息,在该消息中插入supported:timer头域,构造出新的会话建立请求消息。The UAC end of the B2BUA1 unit inserts the supported:timer header field into the message according to the session establishment request message processed by the UAS end, and constructs a new session establishment request message.

步骤5002、B2BUA1单元将处理后的会话建立请求消息发送给PROXY单元。Step 5002, the B2BUA1 unit sends the processed session establishment request message to the PROXY unit.

步骤5003、PROXY单元将收到的会话建立请求消息发送给AS(B2BUA2单元)。Step 5003, the PROXY unit sends the received session establishment request message to the AS (B2BUA2 unit).

步骤5004、B2BUA2单元收到会话建立请求消息,B2BUA2单元的UAS端比较Session-Expires头域的值和本地Min_SE头域的值。如果Session-Expires头域的值小,则向B2BUA1单元回复表明会话更新间隔太短的响应并在响应中带上本地Min_SE头域的值,B2BUA1收到回复响应后将Session-Expires头域的值改成Min_SE头域的值,向B2BUA2单元发送。Step 5004, when the B2BUA2 unit receives the session establishment request message, the UAS side of the B2BUA2 unit compares the value of the Session-Expires header field with the value of the local Min_SE header field. If the value of the Session-Expires header field is small, it will reply to the B2BUA1 unit with a response indicating that the session update interval is too short and include the value of the local Min_SE header field in the response, and B2BUA1 will send the value of the Session-Expires header field after receiving the response Change it to the value of the Min_SE header field and send it to the B2BUA2 unit.

如果Session-Expires头域的值不小于本地Min_SE头域的值,则处理方法与现有技术相同。If the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the processing method is the same as that of the prior art.

B2BUA2单元的UAC端根据UAS端处理后的会话建立请求消息构造新的会话建立请求消息。The UAC side of the B2BUA2 unit constructs a new session establishment request message according to the session establishment request message processed by the UAS side.

步骤5005、B2BUA2单元将处理后的会话建立请求消息发送给被叫终端。Step 5005, the B2BUA2 unit sends the processed session establishment request message to the called terminal.

步骤5006、被叫终端向B2BUA2单元发送表示成功的200响应消息,并在响应消息中插入supported:timer头域,将Session-Expires头域中的参数refresher设置为refresher=uas。Step 5006, the called terminal sends a 200 response message indicating success to the B2BUA2 unit, and inserts the supported:timer header field into the response message, and sets the parameter refresher in the Session-Expires header field as refresher=uas.

步骤5007、B2BUA2单元收到200响应消息,B2BUA2单元的UAC端根据响应消息中Session-Expires头域的值和refresher参数,启动会话超时释放定时器,不会话更新定时器。Step 5007, when unit B2BUA2 receives the 200 response message, the UAC side of unit B2BUA2 starts the session timeout release timer and does not update the session timer according to the value of the Session-Expires header field and the refresher parameter in the response message.

B2BUA2单元的UAS端根据Session-Expires头域的值不启动会话超时释放定时器和会话更新定时器。The UAS side of the B2BUA2 unit does not start the session timeout release timer and session update timer according to the value of the Session-Expires header field.

步骤5008、B2BUA2单元将被叫终端发出的200响应消息发送给PROXY单元。Step 5008, the B2BUA2 unit sends the 200 response message sent by the called terminal to the PROXY unit.

步骤5009、PROXY单元将收到的200响应消息发送给AS(B2BUA1单元)。Step 5009, the PROXY unit sends the received 200 response message to the AS (B2BUA1 unit).

步骤5010、B2BUA1单元收到200响应消息,B2BUA1单元的UAC端根据响应消息中Session-Expires头域的值和refresher参数,启动会话超时释放定时器,不启动会话更新定时器。Step 5010, when the B2BUA1 unit receives the 200 response message, the UAC side of the B2BUA1 unit starts the session timeout release timer according to the value of the Session-Expires header field and the refresher parameter in the response message, but does not start the session update timer.

B2BUA1单元的UAS端根据Session-Expires头域的值不启动会话超时释放定时器和会话更新定时器.The UAS side of the B2BUA1 unit does not start the session timeout release timer and session update timer according to the value of the Session-Expires header field.

步骤5011、B2BUA1单元将200响应消息发送给主叫终端。主叫终端收到200响应消息后,会话成功建立,同时Session Timers协议也协商成功。Step 5011, the B2BUA1 unit sends a 200 response message to the calling terminal. After the calling terminal receives the 200 response message, the session is successfully established, and the Session Timers protocol is also successfully negotiated.

步骤5012、根据刷新者协商设定的参数refresher=uas,被叫终端的会话更新定时器过了(SessionExpires/2)秒通知被叫终端向B2BUA2单元发出会话更新请求。Step 5012, according to the parameter refresher=uas set by the refresher through negotiation, the called terminal notifies the called terminal to send a session update request to the B2BUA2 unit after the session update timer of the called terminal expires (SessionExpires/2) seconds.

步骤5013、B2BUA2单元收到会话更新请求后判断消息中含有support:timer头域,对消息进行相关处理并将该消息发送给PROXY单元。Step 5013: After receiving the session update request, the B2BUA2 unit judges that the message contains the support:timer header field, performs related processing on the message, and sends the message to the PROXY unit.

B2BUA2单元对会话更新请求的相关处理和现有技术中是一样的。The relevant processing of the session update request by the B2BUA2 unit is the same as in the prior art.

步骤5014、PROXY单元将收到的会话更新请求发送给AS(B2BUA1单元)。Step 5014, the PROXY unit sends the received session update request to the AS (B2BUA1 unit).

步骤5015、B2BUA1单元收到会话更新请求后判断消息中含有support:timer头域,对消息进行相关处理并将该消息发送给主叫终端。Step 5015, after receiving the session update request, the B2BUA1 unit judges that the message contains the support:timer header field, performs related processing on the message, and sends the message to the calling terminal.

B2BUA1单元对会话更新请求的相关处理和现有技术中是一样的。The relevant processing of the session update request by the B2BUA1 unit is the same as that in the prior art.

步骤5016、主叫终端收到会话更新消息向B2BUA1单元回复200响应消息。Step 5016, the calling terminal returns a 200 response message to the B2BUA1 unit after receiving the session update message.

步骤5017、B2BUA1单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 5017, the B2BUA1 unit receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤5018、B2BUA1单元将收到的200响应消息发送给PROXY单元。Step 5018, the B2BUA1 unit sends the received 200 response message to the PROXY unit.

步骤5019、PROXY单元将收到的200响应消息发送给AS(B2BUA2单元)。Step 5019, the PROXY unit sends the received 200 response message to the AS (B2BUA2 unit).

步骤5020、B2BUA2单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 5020, unit B2BUA2 receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤5021、B2BUA2单元将收到的200响应消息发送给被叫终端。Step 5021, the B2BUA2 unit sends the received 200 response message to the called terminal.

被叫终端收到200响应消息后根据刷新者的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新,Session Timers完成会话更新,等到(SessionExpires/2)秒后再向B2BUA2单元发送会话更新请求,直到整个会话正常结束,Session Timers保护终止;如果处于非活动状态,则主动向B2BUA2单元发送给会话释放请求,并释放掉自身为该会话分配的资源,结束连接,B2BUA2单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给PROXY单元,PROXY单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给B2BUA1单元,B2BUA1单元收到请求后释放掉自身为该会话分配的资源。After receiving the 200 response message, the called terminal judges whether the session is active according to the rules of the refresher. If the session is in an active state, the session timeout release timer is refreshed, and the Session Timers complete the session update, and then send a session update request to the B2BUA2 unit after (SessionExpires/2) seconds until the entire session ends normally, and the Session Timers protection terminates; If it is in an inactive state, it will actively send a session release request to the B2BUA2 unit, and release the resources allocated by itself for the session, and end the connection. Send it to the PROXY unit. After receiving the request, the PROXY unit releases the resources allocated by itself for the session and sends the request to the B2BUA1 unit. After receiving the request, the B2BUA1 unit releases the resources allocated by itself for the session.

如图6所示,本实施例三的处理流程如下:As shown in Figure 6, the processing flow of the third embodiment is as follows:

步骤600、主叫终端向B2BUA1发送会话建立请求消息。Step 600, the calling terminal sends a session establishment request message to the B2BUA1.

步骤601、B2BUA1单元收到会话建立请求消息,B2BUA1单元的UAS端检查消息中是否含有带supported:timer头域。Step 601, when the B2BUA1 unit receives the session establishment request message, the UAS side of the B2BUA1 unit checks whether the message contains the supported:timer header field.

如果会话建立请求消息中没有supported:timer头域,则跳出本流程,否则对该消息进行Session Timers协议的处理。If there is no supported:timer header field in the session establishment request message, skip this process; otherwise, process the message with the Session Timers protocol.

进行Session Timers协议的处理的步骤包括:The steps for processing the Session Timers protocol include:

如果Session-Expires头域的值小于本地Min_SE头域的值,则向主叫终端回复表明会话更新间隔太短的响应并在响应中带上本地允许的Min_SE头域的值,主叫终端收到回复响应后将Session-Expires头域的值改成Min_SE头域的值,重新向B2BUA1单元发送.If the value of the Session-Expires header field is less than the value of the local Min_SE header field, a response indicating that the session update interval is too short is sent to the calling terminal and the value of the locally allowed Min_SE header field is included in the response, and the calling terminal receives After replying the response, change the value of the Session-Expires header field to the value of the Min_SE header field, and send it to the B2BUA1 unit again.

如果Session-Expires头域的值不小于本地Min_SE头域的值,则处理方法与现有技术相同。If the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the processing method is the same as that of the prior art.

B2BUA1单元的UAC端根据UAS端处理后的会话建立请求消息构造新的会话建立请求消息。The UAC side of the B2BUA1 unit constructs a new session establishment request message according to the session establishment request message processed by the UAS side.

步骤602、B2BUA1单元将处理后的会话建立请求消息发送给PROXY单元。Step 602, the B2BUA1 unit sends the processed session establishment request message to the PROXY unit.

步骤603、PROXY单元将收到的会话建立请求消息发送给AS(B2BUA2单元)。Step 603, the PROXY unit sends the received session establishment request message to the AS (B2BUA2 unit).

步骤604、B2BUA2单元收到会话建立请求消息B2BUA2单元的UAS端查看Session-Expires头域的值。如果Session-Expires头域的值小于本地Min_SE头域的值,则通过B2BUA1向主叫终端回复表明会话更新间隔太短的响应并在响应中带上本地允许的Min_SE头域的值,主叫终端收到回复响应后将Session-Expires头域的值改成Min_SE头域的值,重新发送。Step 604, the UAS end of the B2BUA2 unit receives the session establishment request message and checks the value of the Session-Expires header field. If the value of the Session-Expires header field is less than the value of the local Min_SE header field, the B2BUA1 will reply to the calling terminal with a response indicating that the session update interval is too short and include the value of the locally allowed Min_SE header field in the response, and the calling terminal After receiving the response, change the value of the Session-Expires header field to the value of the Min_SE header field and send it again.

如果Session-Expires头域的值不小于本地Min_SE头域的值,则处理方法与现有技术相同。If the value of the Session-Expires header field is not less than the value of the local Min_SE header field, the processing method is the same as that of the prior art.

B2BUA2单元的UAC端根据UAS端处理后的会话建立请求消息构造新的会话建立请求消息。The UAC side of the B2BUA2 unit constructs a new session establishment request message according to the session establishment request message processed by the UAS side.

步骤605、B2BUA2单元将会话建立请求消息发送给被叫终端。Step 605, the B2BUA2 unit sends the session establishment request message to the called terminal.

步骤606、被叫终端同意B2BUA2单元发送的请求消息发出的,向B2BUA2单元发送表示成功的200响应消息。Step 606: If the called terminal agrees to send the request message sent by the B2BUA2 unit, it sends a 200 response message indicating success to the B2BUA2 unit.

步骤607、B2BUA2单元收到200响应消息,B2BUA2单元的UAC端根据响应消息中Session-Expires头域的值和refresher参数,不启动会话超时释放定时器和会话更新定时器。Step 607, when unit B2BUA2 receives a 200 response message, the UAC side of unit B2BUA2 does not start the session timeout release timer and session update timer according to the value of the Session-Expires header field and the refresher parameter in the response message.

B2BUA2单元的UAS端根据Session-Expires头域的值启动会话超时释放定时器,不启动会话更新定时器。The UAS side of the B2BUA2 unit starts the session timeout release timer according to the value of the Session-Expires header field, and does not start the session update timer.

步骤608、B2BUA2单元将被叫终端发送的200响应消息发送给PROXY单元。Step 608, the B2BUA2 unit sends the 200 response message sent by the called terminal to the PROXY unit.

步骤609、PROXY单元将收到200响应消息发送给AS(B2BUA1单元)。Step 609, the PROXY unit sends a 200 response message to the AS (B2BUA1 unit).

步骤610、B2BUA1单元收到200响应消息,B2BUA1单元的UAC端根据响应消息中Session-Expires头域的值和refresher参数,不启动会话超时释放定时器和会话更新定时器。Step 610, when the B2BUA1 unit receives the 200 response message, the UAC side of the B2BUA1 unit does not start the session timeout release timer and the session update timer according to the value of the Session-Expires header field and the refresher parameter in the response message.

B2BUA1单元的UAS端根据Session-Expires头域的值启动会话超时释放定时器,不启动会话更新定时器。The UAS side of the B2BUA1 unit starts the session timeout release timer according to the value of the Session-Expires header field, and does not start the session update timer.

步骤611、B2BUA1单元将PROXY单元发送的200响应消息发送给主叫终端。主叫终端收到200响应消息后,会话成功建立,同时Session Timers也协商成功。Step 611, the B2BUA1 unit sends the 200 response message sent by the PROXY unit to the calling terminal. After the calling terminal receives the 200 response message, the session is successfully established, and the session timers are also successfully negotiated.

步骤612、根据会话协商设定的参数refresher=uac,主叫终端的会话更新定时器过了(SessionExpires/2)秒通知主叫终端向B2BUA1单元发出会话更新请求。Step 612 , according to the parameter refresher=uac set in session negotiation, the calling terminal's session update timer expires (SessionExpires/2) seconds to notify the calling terminal to send a session update request to the B2BUA1 unit.

步骤613、B2BUA1单元收到会话更新请求后判断消息中含有support:timer头域,对消息进行相关处理并将该消息发送给PROXY单元。Step 613: After receiving the session update request, the B2BUA1 unit judges that the message contains the support:timer header field, performs related processing on the message, and sends the message to the PROXY unit.

B2BUA1单元对会话更新请求的相关处理和现有技术中是一样的。The relevant processing of the session update request by the B2BUA1 unit is the same as that in the prior art.

步骤614、PROXY单元将收到的会话更新请求发送给AS(B2BUA2单元)。Step 614, the PROXY unit sends the received session update request to the AS (B2BUA2 unit).

步骤615、B2BUA2单元收到会话更新请求后判断消息中含有support:timer头域,对消息进行相关处理并将该消息发送给被叫终端。Step 615: After receiving the session update request, the B2BUA2 unit judges that the message contains the support:timer header field, performs related processing on the message, and sends the message to the called terminal.

B2BUA2单元对会话更新请求的相关处理和现有技术中是一样的。The relevant processing of the session update request by the B2BUA2 unit is the same as in the prior art.

步骤616、被叫终端收到会话更新消息向B2BUA2单元回复200响应消息。Step 616, the called terminal returns a 200 response message to the B2BUA2 unit after receiving the session update message.

步骤617、B2BUA2单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 617, unit B2BUA2 receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤618、B2BUA2单元将收到的200响应消息发送给PROXY单元。Step 618, the B2BUA2 unit sends the received 200 response message to the PROXY unit.

步骤619、PROXY单元将收到的200响应消息发送给AS(B2BUA1单元)。Step 619, the PROXY unit sends the received 200 response message to the AS (B2BUA1 unit).

步骤620、B2BUA1单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 620, the B2BUA1 unit receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤621、B2BUA1单元将收到的200响应消息发送给主叫终端。Step 621, the B2BUA1 unit sends the received 200 response message to the calling terminal.

主叫终端收到200响应消息后根据刷新者的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新,Session Timers完成会话更新,等到(SessionExpires/2)秒后再向B2BUA1单元发送会话更新请求,直到整个会话正常结束,Session Timers保护终止;如果处于非活动状态,则主动向B2BUA1单元发送给会话释放请求,并释放掉自身为该会话分配的资源,结束连接,B2BUA1单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给PROXY单元,PROXY单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给B2BUA2单元,B2BUA2单元收到请求后释放掉自身为该会话分配的资源。After receiving the 200 response message, the calling terminal judges whether the session is active according to the rules of the refresher. If the session is in an active state, the session timeout release timer is refreshed, and the Session Timers complete the session update, and then send a session update request to the B2BUA1 unit after (SessionExpires/2) seconds until the entire session ends normally, and the Session Timers protection terminates; If it is in an inactive state, it will actively send a session release request to the B2BUA1 unit, and release the resources allocated by itself for the session, and end the connection. After receiving the request, the B2BUA1 unit releases the resources allocated for the session by itself and sends the request Send it to the PROXY unit. After receiving the request, the PROXY unit releases the resources allocated by itself for the session and sends the request to the B2BUA2 unit. After receiving the request, the B2BUA2 unit releases the resources allocated by itself for the session.

图6所示的实施例是由主叫终端发出会话更新请求,在协商时refresher的参数是uac,每个B2BUA单元不会启动会话更新请求定时器,在收到会话更新请求后不会生成新的会话更新请求,从而避免了图1A和图1B中转发多余的会话更新请求,同时解决了图1B中消息碰撞的问题。In the embodiment shown in Figure 6, the calling terminal sends a session update request, and the refresher parameter is uac during negotiation, and each B2BUA unit will not start the session update request timer, and will not generate a new session update request after receiving the session update request. session update request, thereby avoiding the forwarding of redundant session update requests in FIG. 1A and FIG. 1B , and solving the problem of message collision in FIG. 1B at the same time.

图7所示的实施例是由被叫终端发出会话更新请求,在协商时refresher的参数是uas,只是与图6在发送请求消息的方向上发生了变化。In the embodiment shown in FIG. 7 , the called terminal sends a session update request, and the refresher parameter is uas during negotiation, but the direction of sending the request message is changed from that in FIG. 6 .

如图7所示,本实施例四的处理流程如下:As shown in Figure 7, the processing flow of the fourth embodiment is as follows:

步骤700至步骤711与步骤600至步骤611除了在会话协商中设定的参数refresher=uas,由被叫终端发出会话更新请求,B2BUA1单元和B2BUA2单元的UAS端启动会话超时释放定时器,其他步骤相同。In steps 700 to 711 and steps 600 to 611, except the parameter refresher=uas set in the session negotiation, the called terminal sends a session update request, and the UAS ends of the B2BUA1 and B2BUA2 units start the session timeout release timer, and other steps same.

步骤712、根据会话协商设定的参数refresher=uas,被叫终端的会话更新定时器过了(SessionExpires/2)秒通知被叫终端向B2BUA2单元发出会话更新请求。Step 712: According to the parameter refresher=uas set in the session negotiation, the called terminal notifies the called terminal to send a session update request to the B2BUA2 unit after the session update timer of the called terminal expires (SessionExpires/2) seconds.

步骤713、B2BUA2单元收到会话更新请求后判断消息中含有support:timer头域,对消息进行相关处理并将该消息发送给PROXY单元。Step 713: After receiving the session update request, the B2BUA2 unit judges that the message contains the support:timer header field, performs related processing on the message, and sends the message to the PROXY unit.

B2BUA2单元对会话更新请求的相关处理和现有技术中是一样的。The relevant processing of the session update request by the B2BUA2 unit is the same as in the prior art.

步骤714、PROXY单元将收到的会话更新请求发送给AS(B2BUA1单元)。Step 714, the PROXY unit sends the received session update request to the AS (B2BUA1 unit).

步骤715、B2BUA1单元收到会话更新请求后判断消息中含有support:timer头域,对消息进行相关处理并将该消息发送给主叫终端。Step 715: After receiving the session update request, the B2BUA1 unit judges that the message contains the support:timer header field, performs related processing on the message, and sends the message to the calling terminal.

B2BUA1单元对会话更新请求的相关处理和现有技术中是一样的。The relevant processing of the session update request by the B2BUA1 unit is the same as that in the prior art.

步骤716、主叫终端收到会话更新消息向B2BUA1单元回复200响应消息。Step 716, the calling terminal returns a 200 response message to the B2BUA1 unit after receiving the session update message.

步骤717、B2BUA1单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 717, the B2BUA1 unit receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤718、B2BUA1单元将收到的200响应消息发送给PROXY单元。Step 718, the B2BUA1 unit sends the received 200 response message to the PROXY unit.

步骤719、PROXY单元将收到的200响应消息发送给AS(B2BUA2单元)。Step 719, the PROXY unit sends the received 200 response message to the AS (B2BUA2 unit).

步骤720、B2BUA2单元收到200响应消息,根据代理服务器的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新;如果处于非活动状态,则直接释放掉自身为该会话分配的资源,结束连接。Step 720, unit B2BUA2 receives the 200 response message, and judges whether the session is active according to the rules of the proxy server. If the session is active, refresh the session timeout release timer; if it is inactive, directly release the resources allocated by itself for the session, and end the connection.

步骤721、B2BUA2单元将收到的200响应消息发送给被叫终端。Step 721, the B2BUA2 unit sends the received 200 response message to the called terminal.

被叫终端收到200响应消息后根据刷新者的规则判断会话是否处于活动状态。如果会话处于活动状态,则对会话超时释放定时器进行刷新,Session Timers完成会话更新,等到(SessionExpires/2)秒后再向B2BUA2单元发送会话更新请求,直到整个会话正常结束,Session Timers保护终止;如果处于非活动状态,则主动向B2BUA2单元发送给会话释放请求,并释放掉自身为该会话分配的资源,结束连接,B2BUA2单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给PROXY单元,PROXY单元收到请求后释放掉自身为该会话分配的资源并将该请求发送给B2BUA1单元,B2BUA1单元收到请求后释放掉自身为该会话分配的资源。After receiving the 200 response message, the called terminal judges whether the session is active according to the rules of the refresher. If the session is in an active state, the session timeout release timer is refreshed, and the Session Timers complete the session update, and then send a session update request to the B2BUA2 unit after (SessionExpires/2) seconds until the entire session ends normally, and the Session Timers protection terminates; If it is in an inactive state, it will actively send a session release request to the B2BUA2 unit, and release the resources allocated by itself for the session, and end the connection. Send it to the PROXY unit. After receiving the request, the PROXY unit releases the resources allocated by itself for the session and sends the request to the B2BUA1 unit. After receiving the request, the B2BUA1 unit releases the resources allocated by itself for the session.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (7)

1. A method for implementing resource release, the method comprising:
after receiving the request message for establishing the session, judging whether the request message contains a Supported head domain with a time timer label, if so, forwarding the request message for establishing the session, otherwise, adding the Supported head domain with the time timer label in the message, and forwarding the request message for establishing the session;
in the session establishment process, carrying out refresher negotiation between node devices, and determining one node device as a refresher;
after the session is established, the node device determined by the negotiation to be the refresher sends a session update request to the other network node.
2. The method of claim 1, wherein after the session is established, the method further comprises:
after each node device receives the session updating request, whether the session updating request contains a Supported head field with a timer label is judged, and if yes, the session updating request is sent to the next node device where the session is routed according to the received session updating request.
3. The method of claim 1, wherein a refresher negotiation is performed between the node devices, and wherein the step of determining a node device as a refresher comprises:
a11, back-to-back user agent device B2BUA unit adds refresher parameter in Session termination Session-Expires header field in the Session establishment request message forwarded to the node equipment where the Session is established, and sets refresher as user agent client uac for indicating that the B2BUA unit is responsible for initiating Session update request to the called terminal;
a12, after receiving the request message, the called terminal determines that it is not a refresher, and returns a response message for establishing the session to the B2BUA through the node device;
after the a13 and the B2BUA unit receive the Session establishment response message, determine that the self is a refresher, add a refresher parameter in the Session-Expires header field in the Session establishment response message replied to the calling terminal, and set refresher as the uas of the user agent server.
4. The method of claim 1, wherein a refresher negotiation is performed between the node devices, and wherein the step of determining a node device as a refresher comprises:
the A21, B2BUA unit sends the request message of establishing conversation to the node equipment that the conversation establishes the way, contain the Supported head field with timer label, after every node equipment receives the request message of establishing conversation, forward to the next node equipment, until the called terminal;
a22, after the called terminal receives the request message for establishing the conversation, if the called terminal determines itself to be a refresher, a response message for establishing the conversation is returned to the B2BUA through the node device, wherein the Session-Expires header field is uas, if the called terminal determines itself not to be a refresher, the response message for establishing the conversation which itself is not a refresher is returned to the B2BUA through the node device;
a23, after receiving the response message of session establishment, the B2BUA unit judges whether the called terminal is refresher, if yes, the step A24 is executed, otherwise, the B2BUA unit takes itself as refresher and executes the step A24;
the A24, the B2BUA unit adds refresh parameter in Session-Expires header field in Session establishment response message replied to the calling terminal, and sets refresh as user agent server end uas.
5. The method according to claim 4, wherein the session setup response message that is not itself a refresher in step A22 is a session setup response message that does not contain a Supported header field with a timer label;
the Session establishment response message that is not itself a refresher in step a22 is a Session establishment response message containing a Supported header field with a timer label, where refresh of the Session-Expires header field is uas.
6. A system for implementing resource release, the system comprising: one or more back-to-back user agent device B2BUA units;
each B2BUA unit comprises a session protocol judging module, a resource releasing module, a refresher negotiation module and a session updating request module; wherein,
a session protocol judging module, configured to judge whether a received session establishment request message contains a Supported head domain with a timer label, and if so, directly forward the session establishment request message, otherwise, add the Supported head domain with the timer label to the session establishment request message, and forward the session establishment request message;
the resource releasing module is used for judging whether the session state is normal according to the received session updating response message, and releasing the resources which are distributed for the session when the session is in the inactive state;
a refresher negotiation module, configured to add a refresher parameter to a Session-Expires header field in the Session establishment request message, and determine whether the refresher parameter is a refresher according to the received Session establishment response message;
the session updating request module is used for respectively initiating session updating requests to network nodes where the session is established at two sides if the session is established and the session is determined to be a refresher; if the network node is determined not to be a refresher, judging whether the received session updating request contains a Supported head field with a timer label, if so, only sending the session updating request to the next network node where the session is routed.
7. A back-to-back user agent apparatus, comprising:
a session protocol judging module, configured to judge whether a received session establishment request message contains a Supported head domain with a timer label, and if so, directly forward the session establishment request message, otherwise, add the Supported head domain with the timer label to the session establishment request message, and forward the session establishment request message;
the resource releasing module is used for judging whether the session state is normal according to the received session updating response message, and releasing the resources which are distributed for the session when the session is in the inactive state;
a refresher negotiation module, configured to add a refresher parameter to a Session-Expires header field in the Session establishment request message, and determine whether the refresher parameter is a refresher according to the received Session establishment response message;
the session updating request module is used for respectively initiating session updating requests to network nodes where the session is established at two sides if the session is established and the session is determined to be a refresher; if the network node is determined not to be a refresher, judging whether the received session updating request contains a Supported head field with a timer label, if so, only sending the session updating request to the next network node where the session is routed.
CN200610111582A 2006-08-28 2006-08-28 A method and system for realizing resource release Expired - Fee Related CN101137104B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200610111582A CN101137104B (en) 2006-08-28 2006-08-28 A method and system for realizing resource release
PCT/CN2007/002314 WO2008025216A1 (en) 2006-08-28 2007-08-01 Method and system for realizing release of resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200610111582A CN101137104B (en) 2006-08-28 2006-08-28 A method and system for realizing resource release

Publications (2)

Publication Number Publication Date
CN101137104A CN101137104A (en) 2008-03-05
CN101137104B true CN101137104B (en) 2010-05-12

Family

ID=39135494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200610111582A Expired - Fee Related CN101137104B (en) 2006-08-28 2006-08-28 A method and system for realizing resource release

Country Status (2)

Country Link
CN (1) CN101137104B (en)
WO (1) WO2008025216A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102131285B (en) * 2010-12-28 2013-09-11 华为技术有限公司 Registering method and network equipment
CN103002593B (en) * 2011-09-16 2016-04-20 普天信息技术有限公司 A kind of method and system being realized relaying between base station by terminal back-to-back
CN103812762B (en) * 2013-11-27 2017-12-01 大唐移动通信设备有限公司 A kind of method and system for sending instant message
CN103685286A (en) * 2013-12-18 2014-03-26 大唐移动通信设备有限公司 Method and device for releasing session resources
CN104168283B (en) * 2014-08-22 2017-10-31 中国联合网络通信集团有限公司 Update the method and device of SIP session status
CN105429812A (en) * 2014-09-12 2016-03-23 中兴通讯股份有限公司 Node state detection method and device
CN104468506A (en) * 2014-10-28 2015-03-25 大唐移动通信设备有限公司 Session state detection method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1528745A1 (en) * 2003-10-30 2005-05-04 Hewlett-Packard Development Company, L.P. Communication method and apparatus
GB2421156A (en) * 2004-12-10 2006-06-14 Ericsson Telefon Ab L M Maintaining session across network address/port translation firewall in the event of an address change with a session manager

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8254552B2 (en) * 2005-01-06 2012-08-28 Cisco Technology, Inc. System and method for providing a recovery mode in a session initiation protocol (SIP) environment
US7688804B2 (en) * 2005-02-08 2010-03-30 Aspect Software, Inc. Method of providing fault tolerance in a SIP based contact handling environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1528745A1 (en) * 2003-10-30 2005-05-04 Hewlett-Packard Development Company, L.P. Communication method and apparatus
GB2421156A (en) * 2004-12-10 2006-06-14 Ericsson Telefon Ab L M Maintaining session across network address/port translation firewall in the event of an address change with a session manager

Also Published As

Publication number Publication date
CN101137104A (en) 2008-03-05
WO2008025216A1 (en) 2008-03-06

Similar Documents

Publication Publication Date Title
EP2590376B1 (en) Method, apparatus and system for cross-platform conference convergence
US10044553B2 (en) Media resource reservation request failure handling for voice over mobile wireless network
CA2605475C (en) Session initiation from application servers in an ip multimedia subsystem
US7730127B2 (en) Method, system and apparatus for video sharing
US20110032931A1 (en) Method, system, and device for providing service
CN101137104B (en) A method and system for realizing resource release
KR20090092823A (en) Dynamic service triggers in communication networks
CN107431698A (en) Service support between IMS in telecommunication system
CN100495973C (en) Method and system for push-to-talk service
CN100574474C (en) Set up the method that communication traffic connects in a kind of communication system
US8213373B2 (en) Supporting method for REFER message expansion parameter
CN103119906A (en) Network entity and method for managing session initiation protocol communications towards a user entity in a communication network
JP4078381B2 (en) Method and apparatus for push-to-talk
CN105072121B (en) A kind of method and device of IMS terminal ad hoc network
EP1709777B1 (en) Session initiation protocol signalling
EP2200254B1 (en) Mobile network system and guidance message providing method
CN100550884C (en) Based in the business procedure of retry mechanism to Session Initiation Protocol processing of request method
CN101031139B (en) Method for call control entity to release session
EP2077041B1 (en) Method and application server for routing combinational services to a single endpoint
US8346269B2 (en) Mobile network system and guidance message providing method
CN101014190A (en) Call forwarding method, system and apparatus
CN111800406B (en) Terminal ad hoc network calling method
KR20050103048A (en) Internet protocal multimedia subsystem and method for establishing session in internet protocal multimedia subsystem
CN104284450A (en) Conference release method, device and system
KR20110043272A (en) How to Provide Instant Messages on Multimedia Systems

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100512

Termination date: 20120828