技术领域technical field
本发明涉及通信技术领域,具体涉及一种WebRTC通信方法、相关设备及系统。The present invention relates to the field of communication technology, in particular to a WebRTC communication method, related equipment and system.
背景技术Background technique
WebRTC(Web Real-Time Communication,Web实时通信)是一项在浏览器内部进行实时视频和音频通信的技术,例如WebRTC可以实现基于网页的视频会议。这样WebRTC技术使得不同终端浏览器之间的直接web通信成为可能,从而改变了终端浏览器只能通过服务器拉取信息的网络结构模式,是对WEB技术的一大变革。WebRTC (Web Real-Time Communication, Web real-time communication) is a technology for real-time video and audio communication inside the browser. For example, WebRTC can realize web-based video conferencing. In this way, WebRTC technology makes direct web communication between different terminal browsers possible, thereby changing the network structure mode in which terminal browsers can only pull information through the server, which is a major change in WEB technology.
在现有技术中,由于WebRTC是实时通信,需要通信双方同时在线才能进行,因此需要通信的双方必须一直保持与WebRTC服务器的连接才能及时收到WebRTC呼叫请求,以建立通信双方的WebRTC通信。而WebRTC作为HTML5标准的一部分,可能会被各种网站使用,因此,用户终端需要保持与各个WebRTC服务器的连接,才能收到WebRTC呼叫请求,这将耗费用户终端的大量使用资源,从而无法保证WebRTC的实时通信。In the prior art, since WebRTC is real-time communication, both communication parties need to be online at the same time. Therefore, the two parties needing to communicate must always maintain a connection with the WebRTC server in order to receive the WebRTC call request in time to establish WebRTC communication between the two parties. As a part of the HTML5 standard, WebRTC may be used by various websites. Therefore, the user terminal needs to maintain a connection with each WebRTC server in order to receive a WebRTC call request. real-time communication.
发明内容Contents of the invention
有鉴于此,本发明实施例的主要目的是提供一种WebRTC通信方法、相关设备及系统,以保证WebRTC通信的实时性。In view of this, the main purpose of the embodiments of the present invention is to provide a WebRTC communication method, related equipment and system, so as to ensure the real-time performance of WebRTC communication.
为解决上述问题,本发明提供的技术方案如下:In order to solve the above problems, the technical solutions provided by the present invention are as follows:
第一方面,本发明提供了一种WebRTC通信方法,包括:In a first aspect, the present invention provides a WebRTC communication method, including:
WebRTC服务器接收主叫终端发送的呼叫请求,所述呼叫请求为Web信令;The WebRTC server receives the call request sent by the calling terminal, and the call request is Web signaling;
根据所述呼叫请求获得被叫终端的电信账号信息,并根据所述呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在所述WebRTC服务器上建立所述主叫终端与被叫终端连接的会话资源;Obtain the telecommunications account information of the called terminal according to the call request, and establish the connection between the calling terminal and the calling terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request. The session resource connected by the called terminal;
生成WebRTC连接请求,所述WebRTC连接请求包括所述WebRTC服务器地址以及所述会话资源的会话资源参数;Generate a WebRTC connection request, the WebRTC connection request includes the WebRTC server address and the session resource parameters of the session resource;
向电信网关发送所述WebRTC连接请求以及所述被叫终端的电信账号信息,以使所述电信网关向所述被叫终端转发所述WebRTC连接请求;Sending the WebRTC connection request and the telecommunications account information of the called terminal to the telecommunications gateway, so that the telecommunications gateway forwards the WebRTC connection request to the called terminal;
建立所述被叫终端到所述会话资源的连接,从而建立所述主叫终端与所述被叫终端的连接,其中所述被叫终端到所述会话资源的连接是所述被叫终端根据所述WebRTC连接请求发起的。Establishing a connection between the called terminal and the session resource, thereby establishing a connection between the calling terminal and the called terminal, wherein the connection between the called terminal and the session resource is established by the called terminal according to The WebRTC connection request was initiated.
在第一方面的第一种可能的实现方式中,所述根据所述呼叫请求获得被叫终端的电信账号信息,包括:In a first possible implementation manner of the first aspect, the obtaining the telecommunications account information of the called terminal according to the call request includes:
如果所述呼叫请求包含所述被叫终端的电信账号信息,直接获得所述被叫终端的电信账号信息;If the call request includes the telecommunications account information of the called terminal, directly obtain the telecommunications account information of the called terminal;
或者,如果所述呼叫请求包含所述被叫终端的WebRTC账号信息,查找所述被叫终端的WebRTC账号信息与所述被叫终端的电信账号信息的映射关系,获得所述被叫终端的电信账号信息。Or, if the call request includes the WebRTC account information of the called terminal, search for the mapping relationship between the WebRTC account information of the called terminal and the telecommunications account information of the called terminal, and obtain the telecommunications account information of the called terminal. account information.
结合第一方面或者第一方面的第一种可能的实现方式,在第二种可能的实现方式中,生成WebRTC连接请求,所述WebRTC连接请求包括所述WebRTC服务器地址以及所述会话资源的会话资源参数,包括:In combination with the first aspect or the first possible implementation of the first aspect, in a second possible implementation, a WebRTC connection request is generated, and the WebRTC connection request includes the address of the WebRTC server and the session resource of the session Resource parameters, including:
生成包括统一资源定位符URL地址的WebRTC连接请求,所述URL地址代表所述WebRTC服务器地址以及所述会话资源的会话资源参数。A WebRTC connection request including a Uniform Resource Locator URL address is generated, and the URL address represents the WebRTC server address and session resource parameters of the session resource.
结合第一方面或者第一方面的第一种可能的实现方式或者第一方面的第二种可能的实现方式,在第三种可能的实现方式中,还包括:In combination with the first aspect or the first possible implementation of the first aspect or the second possible implementation of the first aspect, the third possible implementation further includes:
接收所述主叫终端的WebRTC初始化信息并发送给所述被叫终端,接收所述被叫终端的WebRTC初始化信息并发送给所述主叫终端,以使所述主叫终端与所述被叫终端根据所述WebRTC初始化信息完成WebRTC通信。receiving the WebRTC initialization information of the calling terminal and sending it to the called terminal, receiving the WebRTC initialization information of the called terminal and sending it to the calling terminal, so that the calling terminal and the called terminal The terminal completes the WebRTC communication according to the WebRTC initialization information.
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,在所述被叫终端选择通过电信网络建立连接时,所述接收所述主叫终端的WebRTC初始化信息并发送给所述被叫终端,接收所述被叫终端的WebRTC初始化信息并发送给所述主叫终端,以使所述主叫终端与所述被叫终端根据所述WebRTC初始化信息完成WebRTC通信,具体为:With reference to the third possible implementation of the first aspect, in a fourth possible implementation, when the called terminal chooses to establish a connection through the telecommunications network, the receiving of the WebRTC initialization information of the calling terminal and sending to the called terminal, receiving the WebRTC initialization information of the called terminal and sending it to the calling terminal, so that the calling terminal and the called terminal complete WebRTC communication according to the WebRTC initialization information, Specifically:
接收所述主叫终端的WebRTC初始化信息并通过所述电信网关发送给所述被叫终端,通过所述电信网关接收所述被叫终端的WebRTC初始化信息并发送给所述主叫终端,以使所述主叫终端与所述被叫终端根据所述WebRTC初始化信息通过所述电信网关完成WebRTC通信。receiving the WebRTC initialization information of the calling terminal and sending it to the called terminal through the telecommunications gateway, receiving the WebRTC initialization information of the called terminal through the telecommunications gateway and sending it to the calling terminal, so that The calling terminal and the called terminal complete WebRTC communication through the telecommunications gateway according to the WebRTC initialization information.
第二方面,本发明提供了一种WebRTC通信方法,包括:In a second aspect, the present invention provides a WebRTC communication method, including:
被叫终端接收电信网关发送的WebRTC连接请求;所述WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成并发送给所述电信网关的,包括所述WebRTC服务器地址以及会话资源参数;The called terminal receives the WebRTC connection request sent by the telecommunications gateway; the WebRTC connection request is generated by the WebRTC server according to the call request in the form of Web signaling sent by the calling terminal and sent to the telecommunications gateway, including the address of the WebRTC server and Session resource parameters;
根据所述WebRTC连接请求连接到所述WebRTC服务器中的会话资源,建立与所述主叫终端的连接;所述会话资源是所述WebRTC服务器根据所述主叫终端发送的呼叫请求为所述主叫终端与所述被叫终端分配的。Connect to the session resource in the WebRTC server according to the WebRTC connection request, and establish a connection with the calling terminal; the session resource is provided by the WebRTC server according to the call request sent by the calling terminal The calling terminal is allocated with the called terminal.
在第二方面的第一种可能的实现方式中,所述WebRTC连接请求包括统一资源定位符URL地址,所述URL地址代表所述WebRTC服务器地址以及所述会话资源的会话资源参数,或者,所述WebRTC连接请求包括电话号码,所述电话号码是所述电信网关对所述URL地址编码获得的。In the first possible implementation of the second aspect, the WebRTC connection request includes a Uniform Resource Locator URL address, where the URL address represents the WebRTC server address and session resource parameters of the session resource, or, the The WebRTC connection request includes a phone number, and the phone number is obtained by encoding the URL address by the telecommunications gateway.
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,还包括:In combination with the first possible implementation of the second aspect, the second possible implementation also includes:
当所述WebRTC连接请求包括电话号码,对所述电话号码进行解码,获得包括URL地址的WebRTC连接请求,所述URL地址代表所述WebRTC服务器地址以及所述会话资源的会话资源参数。When the WebRTC connection request includes a phone number, the phone number is decoded to obtain a WebRTC connection request including a URL address, where the URL address represents the address of the WebRTC server and session resource parameters of the session resource.
结合第二方面的第一种可能的实现方式或者第二方面的第二种可能的实现方式,在第三种可能的实现方式中,根据所述WebRTC连接请求连接到所述WebRTC服务器中的会话资源,建立与主叫终端的连接,包括:In combination with the first possible implementation of the second aspect or the second possible implementation of the second aspect, in a third possible implementation, connect to the session in the WebRTC server according to the WebRTC connection request Resources to establish a connection with the calling terminal, including:
选择通过WebRTC连接时,打开所述URL地址,连接到所述WebRTC服务器中的会话资源,建立与主叫终端的连接。When choosing to connect via WebRTC, open the URL address, connect to the session resource in the WebRTC server, and establish a connection with the calling terminal.
结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,根据所述WebRTC连接请求连接到所述WebRTC服务器中的会话资源,建立与所述主叫终端的连接,包括:With reference to the third possible implementation of the second aspect, in a fourth possible implementation, according to the WebRTC connection request to connect to the session resource in the WebRTC server, establish a connection with the calling terminal, include:
选择通过电信网络建立连接时,建立与所述电信网关的连接,以使所述电信网关根据所述WebRTC连接请求连接到所述WebRTC服务器中的会话资源;通过所述电信网关,建立与主叫终端的连接。When selecting to establish a connection through a telecommunication network, establish a connection with the telecommunication gateway, so that the telecommunication gateway is connected to the session resource in the WebRTC server according to the WebRTC connection request; through the telecommunication gateway, establish a connection with the calling Terminal connections.
结合第二方面或者第二方面的第一种可能的实现方式或者第二方面的第二种可能的实现方式或者第二方面的第三种可能的实现方式或者第二方面的第四种可能的实现方式,在第五种可能的实现方式中,还包括:In combination with the second aspect or the first possible implementation of the second aspect or the second possible implementation of the second aspect or the third possible implementation of the second aspect or the fourth possible implementation of the second aspect The implementation manner, in the fifth possible implementation manner, also includes:
选择通过WebRTC建立连接时,向所述WebRTC服务器发送WebRTC初始化信息,接收所述WebRTC服务器发送的主叫终端的WebRTC初始化信息,与所述主叫终端完成WebRTC通信;When choosing to establish a connection through WebRTC, send WebRTC initialization information to the WebRTC server, receive the WebRTC initialization information of the calling terminal sent by the WebRTC server, and complete WebRTC communication with the calling terminal;
或者,选择通过电信网络建立连接时,向所述电信网关发送WebRTC初始化信息,接收所述电信网关发送的主叫终端的WebRTC初始化信息,与所述主叫终端完成WebRTC通信。Or, when choosing to establish a connection through a telecommunication network, send WebRTC initialization information to the telecommunication gateway, receive the WebRTC initialization information of the calling terminal sent by the telecommunication gateway, and complete WebRTC communication with the calling terminal.
第三方面,本发明提供了一种WebRTC服务器,包括:In a third aspect, the present invention provides a WebRTC server, including:
接收单元,用于接收主叫终端发送的呼叫请求,所述呼叫请求为Web信令;a receiving unit, configured to receive a call request sent by the calling terminal, where the call request is Web signaling;
建立单元,用于根据所述接收单元接收的所述呼叫请求获得被叫终端的电信账号信息,并根据所述接收单元接收的所述呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在所述WebRTC服务器上建立所述主叫终端与被叫终端连接的会话资源;An establishing unit, configured to obtain the telecommunications account information of the called terminal according to the call request received by the receiving unit, and according to the calling terminal information, calling routing information, Call type information, establishing a session resource connecting the calling terminal and the called terminal on the WebRTC server;
生成单元,生成WebRTC连接请求,所述WebRTC连接请求包括WebRTC服务器地址以及所述建立单元建立的所述会话资源的会话资源参数;a generating unit, generating a WebRTC connection request, the WebRTC connection request including the WebRTC server address and the session resource parameter of the session resource established by the establishment unit;
发送单元,用于向电信网关发送所述生成单元生成的所述WebRTC连接请求以及所述建立单元建立的所述被叫终端的电信账号信息,以使所述电信网关向被叫终端转发所述WebRTC连接请求;a sending unit, configured to send the WebRTC connection request generated by the generation unit and the telecommunication account information of the called terminal established by the establishing unit to a telecommunications gateway, so that the telecommunications gateway forwards the called terminal to the called terminal WebRTC connection request;
连接单元,建立所述被叫终端到所述会话资源的连接,从而建立所述主叫终端与所述被叫终端的连接,其中所述被叫终端到所述会话资源的连接是所述被叫终端根据所述发送单元发送的所述WebRTC连接请求发起的。A connection unit, configured to establish a connection between the called terminal and the session resource, thereby establishing a connection between the calling terminal and the called terminal, wherein the connection between the called terminal and the session resource is the called terminal It is initiated by the calling terminal according to the WebRTC connection request sent by the sending unit.
在第三方面的第一种可能的实现方式中,所述建立单元具体用于:In a first possible implementation manner of the third aspect, the establishing unit is specifically configured to:
如果所述接收单元接收的所述呼叫请求包含所述被叫终端的电信账号信息,直接获得所述被叫终端的电信账号信息,建立所述主叫终端与被叫终端连接的会话资源;If the call request received by the receiving unit includes the telecommunications account information of the called terminal, directly obtain the telecommunications account information of the called terminal, and establish a session resource connecting the calling terminal and the called terminal;
或者,如果所述接收单元接收的所述呼叫请求包含所述被叫终端的WebRTC账号信息,查找所述被叫终端的WebRTC账号信息与所述被叫终端的电信账号信息的映射关系,获得所述被叫终端的电信账号信息,建立所述主叫终端与被叫终端连接的会话资源。Or, if the call request received by the receiving unit includes the WebRTC account information of the called terminal, search for a mapping relationship between the WebRTC account information of the called terminal and the telecommunications account information of the called terminal, and obtain the The telecommunications account information of the called terminal is established, and the session resource for connecting the calling terminal and the called terminal is established.
结合第三方面或者第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述生成单元具体用于:With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner, the generation unit is specifically configured to:
生成包括统一资源定位符URL地址的WebRTC连接请求,所述URL地址代表所述WebRTC服务器地址以及所述建立单元建立的所述会话资源的会话资源参数。generating a WebRTC connection request including a Uniform Resource Locator URL address, where the URL address represents the address of the WebRTC server and the session resource parameters of the session resource established by the establishment unit.
结合第三方面或者第三方面的第一种可能的实现方式或者第三方面的第二种可能的实现方式,在第三种可能的实现方式中,还包括:In combination with the third aspect or the first possible implementation of the third aspect or the second possible implementation of the third aspect, the third possible implementation further includes:
初始化单元,接收所述主叫终端的WebRTC初始化信息并发送给所述被叫终端,接收所述被叫终端的WebRTC初始化信息并发送给所述主叫终端,以使所述主叫终端与所述被叫终端根据所述WebRTC初始化信息完成WebRTC通信。The initialization unit receives the WebRTC initialization information of the calling terminal and sends it to the called terminal, receives the WebRTC initialization information of the called terminal and sends it to the calling terminal, so that the calling terminal and the called terminal The called terminal completes the WebRTC communication according to the WebRTC initialization information.
结合第三方面的第三种可能的实现方式,在第四种可能的实现方式中,在所述被叫终端选择通过电信网络建立连接时,所述初始化单元具体用于:With reference to the third possible implementation of the third aspect, in a fourth possible implementation, when the called terminal chooses to establish a connection through a telecommunications network, the initialization unit is specifically configured to:
接收所述主叫终端的WebRTC初始化信息并通过所述电信网关发送给所述被叫终端,通过所述电信网关接收所述被叫终端的WebRTC初始化信息并发送给所述主叫终端,以使所述主叫终端与所述被叫终端根据所述WebRTC初始化信息通过所述电信网关完成WebRTC通信。receiving the WebRTC initialization information of the calling terminal and sending it to the called terminal through the telecommunications gateway, receiving the WebRTC initialization information of the called terminal through the telecommunications gateway and sending it to the calling terminal, so that The calling terminal and the called terminal complete WebRTC communication through the telecommunications gateway according to the WebRTC initialization information.
第四方面,本发明提供了一种终端,包括:In a fourth aspect, the present invention provides a terminal, including:
接收单元,用于接收电信网关发送的WebRTC连接请求;所述WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成并发送给所述电信网关的,包括所述WebRTC服务器地址以及会话资源参数;The receiving unit is used to receive the WebRTC connection request sent by the telecommunications gateway; the WebRTC connection request is generated by the WebRTC server according to the call request in the form of Web signaling sent by the calling terminal and sent to the telecommunications gateway, including the WebRTC server address and session resource parameters;
连接单元,用于根据所述接收单元接收的所述WebRTC连接请求连接到所述WebRTC服务器中的会话资源,建立与所述主叫终端的连接;所述会话资源是所述WebRTC服务器根据所述主叫终端发送的呼叫请求为所述主叫终端与所述被叫终端分配的。A connection unit, configured to connect to a session resource in the WebRTC server according to the WebRTC connection request received by the receiving unit, and establish a connection with the calling terminal; the session resource is the WebRTC server according to the The call request sent by the calling terminal is allocated between the calling terminal and the called terminal.
在第四方面的第一种可能的实现方式中,所述WebRTC连接请求包括统一资源定位符URL地址,所述URL地址代表所述WebRTC服务器地址以及所述会话资源的会话资源参数,或者,所述WebRTC连接请求包括电话号码,所述电话号码是所述电信网关对所述URL地址编码获得的。In a first possible implementation manner of the fourth aspect, the WebRTC connection request includes a URL address of a Uniform Resource Locator, and the URL address represents the address of the WebRTC server and the session resource parameter of the session resource, or, the The WebRTC connection request includes a phone number, and the phone number is obtained by encoding the URL address by the telecommunications gateway.
结合第四方面的第一种可能的实现方式,在第二种可能的实现方式中,还包括:In combination with the first possible implementation of the fourth aspect, the second possible implementation also includes:
解码单元,用于当所述WebRTC连接请求包括电话号码,对所述电话号码进行解码,获得包括URL地址的WebRTC连接请求,所述URL地址代表所述WebRTC服务器地址以及所述会话资源的会话资源参数。A decoding unit, configured to decode the phone number when the WebRTC connection request includes a phone number, and obtain a WebRTC connection request including a URL address, where the URL address represents the address of the WebRTC server and the session resource of the session resource parameter.
结合第四方面的第一种可能的实现方式或者第四方面的第二种可能的实现方式,在第三种可能的实现方式中,所述连接单元具体用于:With reference to the first possible implementation of the fourth aspect or the second possible implementation of the fourth aspect, in a third possible implementation, the connecting unit is specifically configured to:
选择通过WebRTC连接时,打开所述接收单元接收的或所述解码单元解码的所述URL地址,连接到所述WebRTC服务器中的会话资源,建立与主叫终端的连接。When choosing to connect via WebRTC, open the URL address received by the receiving unit or decoded by the decoding unit, connect to the session resource in the WebRTC server, and establish a connection with the calling terminal.
结合第四方面的第三种可能的实现方式,在第四种可能的实现方式中,所述连接单元具体用于:With reference to the third possible implementation manner of the fourth aspect, in a fourth possible implementation manner, the connecting unit is specifically configured to:
选择通过电信网络建立连接时,建立与所述电信网关的连接,以使所述电信网关根据所述WebRTC连接请求连接到所述WebRTC服务器中的会话资源;通过所述电信网关,建立与主叫终端的连接。When selecting to establish a connection through a telecommunication network, establish a connection with the telecommunication gateway, so that the telecommunication gateway is connected to the session resource in the WebRTC server according to the WebRTC connection request; through the telecommunication gateway, establish a connection with the calling Terminal connections.
结合第四方面或者第四方面的第一种可能的实现方式或者第四方面的第二种可能的实现方式或者第四方面的第三种可能的实现方式或者第四方面的第四种可能的实现方式,在第五种可能的实现方式中,还包括:In combination with the fourth aspect or the first possible implementation of the fourth aspect or the second possible implementation of the fourth aspect or the third possible implementation of the fourth aspect or the fourth possible implementation of the fourth aspect The implementation manner, in the fifth possible implementation manner, also includes:
初始化单元,用于选择通过WebRTC建立连接时,向所述WebRTC服务器发送WebRTC初始化信息,接收所述WebRTC服务器发送的主叫终端的WebRTC初始化信息,与所述主叫终端完成WebRTC通信;或者,选择通过电信网络建立连接时,向所述电信网关发送WebRTC初始化信息,接收所述电信网关发送的主叫终端的WebRTC初始化信息,与所述主叫终端完成WebRTC通信。The initialization unit is configured to send WebRTC initialization information to the WebRTC server when establishing a connection through WebRTC, receive the WebRTC initialization information of the calling terminal sent by the WebRTC server, and complete the WebRTC communication with the calling terminal; or, select When establishing a connection through the telecommunication network, send WebRTC initialization information to the telecommunication gateway, receive the WebRTC initialization information of the calling terminal sent by the telecommunication gateway, and complete WebRTC communication with the calling terminal.
第五方面,本发明提供了一种WebRTC通信系统,包括:In a fifth aspect, the present invention provides a WebRTC communication system, including:
主叫终端、WebRTC服务器、电信网关以及被叫终端;Calling terminal, WebRTC server, telecom gateway and called terminal;
所述WebRTC服务器是上述本发明提供的一种WebRTC服务器;The WebRTC server is the above-mentioned WebRTC server provided by the present invention;
所述被叫终端是上述本发明提供的一种终端;The called terminal is a terminal provided by the present invention;
所述电信网关,用于接收所述WebRTC服务器发送的WebRTC连接请求以及所述被叫终端的电信账号信息,向所述被叫终端转发所述WebRTC连接请求。The telecommunications gateway is configured to receive the WebRTC connection request sent by the WebRTC server and the telecommunications account information of the called terminal, and forward the WebRTC connection request to the called terminal.
由此可见,本发明实施例具有如下有益效果:It can be seen that the embodiments of the present invention have the following beneficial effects:
本发明实施例通过WebRTC与电信网络的融合通信,将WebRTC连接请求通过电信网关发送给被叫终端,利用电信网关实现信息推送,使用户终端不用一直保持与WebRTC服务器的连接也能收到WebRTC连接请求,以建立WebRTC通信,从而保证了WebRTC通信的实时性。The embodiment of the present invention sends the WebRTC connection request to the called terminal through the telecommunication gateway through the integrated communication of WebRTC and the telecommunication network, and uses the telecommunication gateway to realize information push, so that the user terminal can receive the WebRTC connection without always maintaining the connection with the WebRTC server Request to establish WebRTC communication, thus ensuring the real-time performance of WebRTC communication.
附图说明Description of drawings
图1为本发明实施例WebRTC通信方法实施例1的流程图;FIG. 1 is a flowchart of Embodiment 1 of a WebRTC communication method according to an embodiment of the present invention;
图2为本发明实施例WebRTC通信方法实施例2的流程图;FIG. 2 is a flow chart of Embodiment 2 of the WebRTC communication method of the embodiment of the present invention;
图3为本发明实施例WebRTC通信方法实施例3的流程图;3 is a flow chart of Embodiment 3 of the WebRTC communication method of the embodiment of the present invention;
图4为本发明实施例WebRTC通信方法实施例4的流程图;4 is a flow chart of Embodiment 4 of the WebRTC communication method of the embodiment of the present invention;
图5为本发明实施例WebRTC通信方法实施例5的流程图;5 is a flow chart of Embodiment 5 of the WebRTC communication method according to the embodiment of the present invention;
图6为本发明实施例WebRTC通信方法实施例6的流程图;FIG. 6 is a flow chart of Embodiment 6 of the WebRTC communication method according to the embodiment of the present invention;
图7为本发明实施例WebRTC通信系统实施例的示意图;FIG. 7 is a schematic diagram of an embodiment of a WebRTC communication system according to an embodiment of the present invention;
图8为本发明实施例WebRTC通信方法实施例的信令交互示意图;FIG. 8 is a schematic diagram of signaling interaction of an embodiment of a WebRTC communication method according to an embodiment of the present invention;
图9为本发明实施例WebRTC服务器实施例的示意图;FIG. 9 is a schematic diagram of an embodiment of a WebRTC server according to an embodiment of the present invention;
图10为本发明实施例电信网关实施例的示意图;FIG. 10 is a schematic diagram of an embodiment of a telecommunications gateway according to an embodiment of the present invention;
图11为本发明实施例终端实施例的示意图;FIG. 11 is a schematic diagram of a terminal embodiment according to an embodiment of the present invention;
图12为本发明实施例WebRTC服务器实施例的硬件构成示意图;FIG. 12 is a schematic diagram of the hardware configuration of the WebRTC server embodiment of the embodiment of the present invention;
图13为本发明实施例电信网关实施例的硬件构成示意图;FIG. 13 is a schematic diagram of the hardware configuration of the telecom gateway embodiment of the embodiment of the present invention;
图14为本发明实施例终端实施例的硬件构成示意图。FIG. 14 is a schematic diagram of a hardware configuration of a terminal embodiment according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明实施例作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
本发明实施例的WebRTC通信方法、相关设备及系统可以用于WebRTC通信。WebRTC是HTML5标准中的一项新技术,WebRTC变革的核心在于媒体标准化,信令去标准化。即在WebRTC标准中,详细定义了在两个客户端浏览器建立连接后,传输的业务数据的格式,以及处理业务数据的方法。但WebRTC中没有定义两个客户端浏览器建立起连接的信令格式。The WebRTC communication method, related equipment and system of the embodiments of the present invention can be used for WebRTC communication. WebRTC is a new technology in the HTML5 standard. The core of WebRTC reform lies in media standardization and signaling de-standardization. That is, in the WebRTC standard, the format of the business data transmitted and the method of processing the business data are defined in detail after the connection between the two client browsers is established. However, WebRTC does not define the signaling format for two client browsers to establish a connection.
WebRTC关注客户端到客户端的音视频媒体流的传输,实时性使得WebRTC对信令的要求很高,而WebRTC业务形态上和传统的电信业务高度重合。WebRTC与电话信令结合,形成完整的业务,在技术上是一个很好的选择。因此,WebRTC和电信网络有融合的需求,而如何实现WebRTC和电信网络互通,以保证WebRTC的实时通信,为此本发明实施例提供了如下的WebRTC通信方法。WebRTC focuses on the transmission of audio and video media streams from client to client. The real-time nature makes WebRTC have high requirements for signaling, and the WebRTC business form highly overlaps with traditional telecom services. The combination of WebRTC and telephone signaling forms a complete service, which is a good choice technically. Therefore, WebRTC and the telecommunications network have a need for integration, and how to realize the intercommunication between WebRTC and the telecommunications network to ensure the real-time communication of WebRTC, for this reason, the embodiment of the present invention provides the following WebRTC communication method.
参见图1所示,是本发明实施例中WebRTC通信方法实施例1的流程图,本实施例可以由WebRTC服务器实现该方法,可以包括以下步骤:Referring to Fig. 1, it is a flowchart of Embodiment 1 of the WebRTC communication method in the embodiment of the present invention. This embodiment can implement the method by a WebRTC server, and may include the following steps:
步骤101:WebRTC服务器接收主叫终端发送的呼叫请求,该呼叫请求为Web信令。Step 101: the WebRTC server receives the call request sent by the calling terminal, and the call request is a Web signaling.
主叫终端即发起主叫的WebRTC客户端可以发起WebRTC连接呼叫,可以通过互联网将呼叫请求发送给WebRTC服务器。主叫终端可以是手机、电脑或其他安装有支持WebRTC的浏览器的终端设备。The calling terminal, that is, the WebRTC client that initiates the call, can initiate a WebRTC connection call, and can send the call request to the WebRTC server through the Internet. The calling terminal can be a mobile phone, a computer or other terminal equipment installed with a browser supporting WebRTC.
WebRTC服务器接收主叫终端发送的呼叫请求,该呼叫请求为web信令。这样,主叫终端可以与WebRTC服务器建立一种长期保持的双向通信连接,例如websocket连接,用于信令的传输。同时,WebRTC服务器接收到的呼叫请求中可以携带呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,主叫终端信息如主叫终端的相关身份信息,例如,主叫终端的WebRTC账号信息,主叫路由信息如主叫终端的相关网络信息,呼叫类型信息例如本次呼叫代表WebRTC呼叫请求;呼叫请求中还可以包括被叫终端的相关身份信息,例如被叫终端的电信账号信息或者被叫终端的WebRTC账号信息。The WebRTC server receives the call request sent by the calling terminal, and the call request is web signaling. In this way, the calling terminal can establish a long-term two-way communication connection with the WebRTC server, such as a websocket connection, for signaling transmission. At the same time, the call request received by the WebRTC server can carry the calling terminal information, calling routing information, and call type information carried in the call request. The calling terminal information includes the relevant identity information of the calling terminal, for example, the calling terminal WebRTC account information, calling routing information such as the relevant network information of the calling terminal, call type information such as this call represents a WebRTC call request; the call request can also include the relevant identity information of the called terminal, such as the telecommunications account of the called terminal information or the WebRTC account information of the called terminal.
主叫终端的WebRTC账号信息、被叫终端的WebRTC账号信息均可以在WebRTC服务器预先进行注册,以使WebRTC服务器可以获知需要进行WebRTC通信的双方的身份信息。Both the WebRTC account information of the calling terminal and the WebRTC account information of the called terminal can be pre-registered with the WebRTC server, so that the WebRTC server can learn the identity information of both parties that need to communicate with WebRTC.
步骤102:根据呼叫请求获得被叫终端的电信账号信息,并根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上建立主叫终端与被叫终端连接的会话资源。Step 102: Obtain the telecommunications account information of the called terminal according to the call request, and establish a connection between the calling terminal and the called terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request. Session resource.
WebRTC服务器根据呼叫请求可以获得被叫终端的电信账号信息用于将被叫终端的电信账号信息通知电信网关,以使电信网关可以呼叫被叫终端。The WebRTC server can obtain the telecommunications account information of the called terminal according to the call request, and use it to notify the telecommunications gateway of the telecommunications account information of the called terminal, so that the telecommunications gateway can call the called terminal.
具体的,在本发明的一些实施例中,根据呼叫请求获得被叫终端的电信账号信息的实现过程可以包括:Specifically, in some embodiments of the present invention, the implementation process of obtaining the telecommunications account information of the called terminal according to the call request may include:
如果呼叫请求包含被叫终端的电信账号信息,直接获得被叫终端的电信账号信息;或者,如果呼叫请求包含被叫终端的WebRTC账号信息,查找被叫终端的WebRTC账号信息与被叫终端的电信账号信息的映射关系,获得被叫终端的电信账号信息。If the call request contains the telecommunications account information of the called terminal, obtain the telecommunications account information of the called terminal directly; or, if the call request contains the WebRTC account information of the called terminal, search for the WebRTC account information of the called terminal and the telecommunications account information of the called terminal. The mapping relationship of the account information is used to obtain the telecommunications account information of the called terminal.
即WebRTC服务器根据呼叫请求判断其中是否直接包含了被叫终端的电信账号信息,如果否,则需要通过预先保存WebRTC账号信息与电信账号信息映射关系,查找得到被叫终端的电信账号信息。例如,WebRTC服务器可以通过企业通讯录或其他通信管理模块进行不同账号信息间的映射。That is, the WebRTC server judges according to the call request whether it directly contains the telecommunications account information of the called terminal. If not, it needs to search for the telecommunications account information of the called terminal by pre-saving the mapping relationship between the WebRTC account information and the telecommunications account information. For example, the WebRTC server can perform mapping between different account information through the enterprise address book or other communication management modules.
需要注意的是,WebRTC服务器中不同账号信息的映射模块是一个可选模块,当WebRTC服务器不支持查找被叫终端的WebRTC账号信息与被叫终端的电信账号信息的映射关系时,则呼叫请求中需要直接包含被叫终端的电信账号信息。It should be noted that the mapping module of different account information in the WebRTC server is an optional module. When the WebRTC server does not support the search for the mapping relationship between the WebRTC account information of the called terminal and the telecom account information of the called terminal, the call request It is necessary to directly include the telecommunications account information of the called terminal.
WebRTC服务器可以根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上为主叫终端与被叫终端的连接分配会话资源,即在WebRTC服务器上建立一个用于主叫终端与被叫终端连接的会话资源。该会话资源可以包括会话资源的会话资源参数,例如该会话资源是该WebRTC服务器中的第5个会话资源,以使主叫终端与被叫终端能够连接到为其分配的会话资源中。The WebRTC server can allocate session resources for the connection between the calling terminal and the called terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request, that is, establish a session on the WebRTC server for The session resources for the connection between the calling terminal and the called terminal. The session resource may include a session resource parameter of the session resource, for example, the session resource is the fifth session resource in the WebRTC server, so that the calling terminal and the called terminal can connect to the allocated session resource.
步骤103:生成WebRTC连接请求,WebRTC连接请求包括WebRTC服务器地址以及会话资源的会话资源参数。Step 103: Generate a WebRTC connection request, the WebRTC connection request includes a WebRTC server address and a session resource parameter of the session resource.
在本发明的一些实施例中,生成WebRTC连接请求,WebRTC连接请求包括WebRTC服务器地址以及会话资源的会话资源参数的实现过程可以包括:生成包括URL地址的WebRTC连接请求,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数。In some embodiments of the present invention, generating a WebRTC connection request, where the WebRTC connection request includes a WebRTC server address and a session resource parameter implementation process of a session resource may include: generating a WebRTC connection request including a URL address, where the URL address represents the WebRTC server address and The session resource parameter for the session resource.
即WebRTC服务器可以为代表主叫终端与被叫终端连接分配的会话资源指定URL(Uniform Resource Locator,统一资源定位符)地址,其中包含了WebRTC服务器地址以及会话资源的会话资源参数,这样WebRTC服务器可以将该URL地址放到WebRTC连接请求中。That is, the WebRTC server can specify a URL (Uniform Resource Locator, Uniform Resource Locator) address for the session resource allocated on behalf of the connection between the calling terminal and the called terminal, which contains the address of the WebRTC server and the session resource parameters of the session resource, so that the WebRTC server can Put this URL address in the WebRTC connection request.
步骤104:向电信网关发送WebRTC连接请求以及被叫终端的电信账号信息,以使电信网关向被叫终端转发WebRTC连接请求。Step 104: Send the WebRTC connection request and the telecommunication account information of the called terminal to the telecommunications gateway, so that the telecommunications gateway forwards the WebRTC connection request to the called terminal.
WebRTC服务器调用电信网关,将WebRTC连接请求发送给被叫终端,即WebRTC服务器调用电信网关将WebRTC服务器地址以及会话资源的会话资源参数作为主叫方信息转发给被叫终端。The WebRTC server invokes the telecom gateway to send the WebRTC connection request to the called terminal, that is, the WebRTC server invokes the telecom gateway to forward the WebRTC server address and the session resource parameters of the session resource as the calling party information to the called terminal.
需要注意的是,WebRTC服务器调用电信网关向被叫终端发送的WebRTC连接请求是电信信令,电信信令具有实时性强的特点,被叫终端无需实时与WebRTC服务器相连,也可以通过WebRTC服务器调用电信网关实时收到WebRTC连接请求,从而实现与主叫终端的连接,保证了WebRTC通信的实时性。It should be noted that the WebRTC connection request sent by the WebRTC server to the called terminal by invoking the telecom gateway is a telecom signaling, and the telecom signaling has strong real-time characteristics. The telecommunications gateway receives the WebRTC connection request in real time, so as to realize the connection with the calling terminal and ensure the real-time performance of WebRTC communication.
步骤105:建立被叫终端到会话资源的连接,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据WebRTC连接请求发起的。Step 105: Establish a connection between the called terminal and the session resource, thereby establishing a connection between the calling terminal and the called terminal, wherein the connection between the called terminal and the session resource is initiated by the called terminal according to the WebRTC connection request.
被叫终端如果同意建立通信,则可以根据WebRTC连接请求获得WebRTC服务器地址以及会话资源的会话资源参数,可以通过打开本机浏览器的方式,连接的WebRTC服务器中相应的会话资源中,从而主叫终端与被叫终端可以建立连接。If the called terminal agrees to establish communication, it can obtain the WebRTC server address and the session resource parameters of the session resource according to the WebRTC connection request, and can open the local browser to the corresponding session resource in the connected WebRTC server, so that the calling terminal The terminal can establish a connection with the called terminal.
本方法实施例通过WebRTC与电信网络的融合通信,将WebRTC服务器调用电信网关将WebRTC连接请求发送给被叫终端,使被叫终端不用一直保持与WebRTC服务器的连接也能收到WebRTC连接请求,以建立主叫终端与被叫终端的连接,从而保证了WebRTC通信的实时性。In this embodiment of the method, the WebRTC server calls the telecom gateway to send the WebRTC connection request to the called terminal through the integrated communication between WebRTC and the telecommunication network, so that the called terminal can receive the WebRTC connection request without maintaining the connection with the WebRTC server all the time. The connection between the calling terminal and the called terminal is established, thus ensuring the real-time performance of WebRTC communication.
在本发明的一些实施例中,本发明实施例WebRTC通信方法可以进一步包括:接收主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。In some embodiments of the present invention, the WebRTC communication method of the embodiment of the present invention may further include: receiving the WebRTC initialization information of the calling terminal and sending it to the called terminal, receiving the WebRTC initialization information of the called terminal and sending it to the calling terminal, In order to enable the calling terminal and the called terminal to complete the WebRTC communication according to the WebRTC initialization information.
在本发明的一些实施例中,接收主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信可以具体为:在被叫终端选择通过电信网络建立连接时,接收主叫终端的WebRTC初始化信息并通过电信网关发送给被叫终端,通过电信网关接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息通过电信网关完成WebRTC通信。In some embodiments of the present invention, the WebRTC initialization information of the calling terminal is received and sent to the called terminal, and the WebRTC initialization information of the called terminal is received and sent to the calling terminal, so that the calling terminal and the called terminal can communicate according to WebRTC The completion of WebRTC communication by initialization information can be specifically: when the called terminal chooses to establish a connection through the telecommunication network, receive the WebRTC initialization information of the calling terminal and send it to the called terminal through the telecommunication gateway, and receive the WebRTC initialization information of the called terminal through the telecommunication gateway And send it to the calling terminal, so that the calling terminal and the called terminal complete the WebRTC communication through the telecommunications gateway according to the WebRTC initialization information.
即在被叫终端选择通过WebRTC建立连接时,WebRTC服务器可以直接接收及转发主叫终端与被叫终端的WebRTC初始化信息;而在被叫终端选择通过电信网络建立连接时,WebRTC服务器可以通过电信网关接收及转发主叫终端与被叫终端的WebRTC初始化信息。That is, when the called terminal chooses to establish a connection through WebRTC, the WebRTC server can directly receive and forward the WebRTC initialization information between the calling terminal and the called terminal; Receive and forward the WebRTC initialization information of the calling terminal and the called terminal.
参见图2所示,是本发明实施例中WebRTC通信方法实施例2的流程图,本实施例可以由WebRTC服务器实现该方法,可以包括以下步骤:Referring to Fig. 2, it is a flow chart of Embodiment 2 of the WebRTC communication method in the embodiment of the present invention. In this embodiment, the method can be implemented by a WebRTC server, which may include the following steps:
步骤201:WebRTC服务器接收主叫终端发送的呼叫请求,该呼叫请求为Web信令。Step 201: the WebRTC server receives a call request sent by a calling terminal, and the call request is a Web signaling.
步骤202:判断呼叫请求中是否包含被叫终端的电信账号信息,如果是,进入步骤203,如果否,进入步骤204。Step 202: Determine whether the call request includes the telecommunication account information of the called terminal, if yes, go to step 203, if not, go to step 204.
步骤203:直接获得被叫终端的电信账号信息。Step 203: directly obtain the telecommunications account information of the called terminal.
步骤204:查找被叫终端的WebRTC账号信息与被叫终端的电信账号信息的映射关系,获得被叫终端的电信账号信息。Step 204: Find the mapping relationship between the WebRTC account information of the called terminal and the telecommunications account information of the called terminal, and obtain the telecommunications account information of the called terminal.
步骤205:根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上建立主叫终端与被叫终端连接的会话资源。Step 205: According to the calling terminal information, calling routing information, and call type information carried in the call request, establish a session resource connecting the calling terminal and the called terminal on the WebRTC server.
步骤206:生成WebRTC连接请求,WebRTC连接请求包括WebRTC服务器地址以及会话资源的会话资源参数。Step 206: Generate a WebRTC connection request, the WebRTC connection request includes the WebRTC server address and session resource parameters of the session resource.
步骤207:向电信网关发送WebRTC连接请求以及被叫终端的电信账号信息,以使电信网关向被叫终端转发WebRTC连接请求。Step 207: Send the WebRTC connection request and the telecommunication account information of the called terminal to the telecommunications gateway, so that the telecommunications gateway forwards the WebRTC connection request to the called terminal.
步骤208:建立被叫终端到会话资源的连接,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据WebRTC连接请求发起的。Step 208: Establish a connection between the called terminal and the session resource, thereby establishing a connection between the calling terminal and the called terminal, wherein the connection between the called terminal and the session resource is initiated by the called terminal according to the WebRTC connection request.
步骤209:在被叫终端选择通过WebRTC建立连接时,接收主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。Step 209: When the called terminal chooses to establish a connection through WebRTC, receive the WebRTC initialization information of the calling terminal and send it to the called terminal, receive the WebRTC initialization information of the called terminal and send it to the calling terminal, so that the calling terminal and The called terminal completes the WebRTC communication according to the WebRTC initialization information.
主叫终端与被叫终端可以通过WebRTC服务器完成WebRTC连接所需的初始化流程和信息交换,可以包括交换主叫终端与被叫终端的SDP(SessionDescription Protocol,会话描述协议)许可(或其他类似信令)、主叫终端与被叫终端的ip地址、参与通信的设备列表(如视频、音频)、媒体格式、网络穿透协议(如ice)和网络穿透服务器信息(如google-ice)等信息。主叫终端与被叫终端的通过交换的SDP信息,可以完成WebRTC音视频或数据的通信。The calling terminal and the called terminal can complete the initialization process and information exchange required for the WebRTC connection through the WebRTC server, which may include exchanging the SDP (Session Description Protocol, Session Description Protocol) license (or other similar signaling) between the calling terminal and the called terminal ), the ip address of the calling terminal and the called terminal, the list of devices participating in the communication (such as video, audio), media format, network penetration protocol (such as ice), and network penetration server information (such as google-ice) and other information . The SDP information exchanged between the calling terminal and the called terminal can complete the communication of WebRTC audio, video or data.
在通话期间,WebRTC服务器还可以控制通话,如重新协定媒体信息,或挂机等。即在WebRTC服务器在主叫终端与被叫终端在建立连接时,以及在通话过程中,可以协助通信双方传输信令信息,如双方的连接许可、协定媒体信息、挂机等信令,这些信令均可以由WebRTC服务器帮助传输。During the call, the WebRTC server can also control the call, such as renegotiating media information, or hanging up. That is, when the calling terminal and the called terminal establish a connection, and during the call, the WebRTC server can assist the communication parties to transmit signaling information, such as the connection permission of both parties, agreed media information, hang-up and other signaling, these signaling Both can be transmitted with the help of WebRTC server.
步骤210:在被叫终端选择通过电信网络建立连接时,接收主叫终端的WebRTC初始化信息并通过电信网关发送给被叫终端,通过电信网关接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息通过电信网关完成WebRTC通信。Step 210: When the called terminal chooses to establish a connection through the telecommunication network, receive the WebRTC initialization information of the calling terminal and send it to the called terminal through the telecommunication gateway, receive the WebRTC initialization information of the called terminal through the telecommunication gateway and send it to the calling terminal , so that the calling terminal and the called terminal complete the WebRTC communication through the telecommunications gateway according to the WebRTC initialization information.
当被叫终端不支持WebRTC功能时,电信网关可以设置WebRTC客户端代理模块,WebRTC服务器依然完成的是WebRTC连接所需的初始化流程和信息交换功能,不同之处在于WebRTC服务器不与被叫终端直接进行信息交换,而是经过电信网关中的WebRTC客户端代理模块转发与被叫终端直接进行信息交换。从而使主叫终端与被叫终端通过电信网关完成WebRTC通信。When the called terminal does not support the WebRTC function, the telecommunications gateway can set the WebRTC client proxy module, and the WebRTC server still completes the initialization process and information exchange functions required for the WebRTC connection. The difference is that the WebRTC server does not communicate directly with the called terminal. For information exchange, the WebRTC client proxy module in the telecom gateway directly exchanges information with the called terminal. Thus, the calling terminal and the called terminal complete the WebRTC communication through the telecommunications gateway.
本方法实施例与方法实施例1相比,进一步包括了WebRTC服务器进行WebRTC初始化信息交换的过程,以使主叫终端与被叫终端完成WebRTC通信,即完成主叫终端与被叫终端之间的音视频或数据的传输。Compared with method embodiment 1, this method embodiment further includes the process of WebRTC initialization information exchange by the WebRTC server, so that the calling terminal and the called terminal complete the WebRTC communication, that is, complete the communication between the calling terminal and the called terminal. Audio, video or data transmission.
参见图3所示,是本发明实施例中WebRTC通信方法实施例3的流程图,本实施例可以由电信网关实现该方法,可以包括以下步骤:Referring to Fig. 3, it is a flow chart of Embodiment 3 of the WebRTC communication method in the embodiment of the present invention. In this embodiment, the method can be implemented by a telecommunications gateway, which may include the following steps:
步骤301:电信网关接收WebRTC服务器发送的WebRTC连接请求以及被叫终端的电信账号信息,被叫终端的电信账号信息是WebRTC服务器根据主叫终端发送的呼叫请求获得的,WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成的,包括WebRTC服务器地址以及会话资源参数。Step 301: The telecommunications gateway receives the WebRTC connection request sent by the WebRTC server and the telecommunications account information of the called terminal. The telecommunications account information of the called terminal is obtained by the WebRTC server according to the call request sent by the calling terminal, and the WebRTC connection request is obtained by the WebRTC server according to the call request sent by the calling terminal. Generated by the call request in the form of Web signaling sent by the calling terminal, including the WebRTC server address and session resource parameters.
WebRTC服务器通过电信网关的开放接口(如SIP接口)可以调用电信网关,电信网关可以接收WebRTC服务器发送的WebRTC连接请求以及被叫终端的电信账号信息。The WebRTC server can call the telecom gateway through the open interface (such as the SIP interface) of the telecom gateway, and the telecom gateway can receive the WebRTC connection request sent by the WebRTC server and the telecom account information of the called terminal.
在本发明的一些实施例中,WebRTC连接请求包括代表WebRTC服务器地址以及会话资源的会话资源参数的统一资源定位符URL地址。WebRTC连接请求的生成可以由WebRTC服务器完成,可以参见本发明WebRTC通信方法实施例1的相应部分,此处不再赘述。In some embodiments of the present invention, the WebRTC connection request includes a Uniform Resource Locator URL address representing the WebRTC server address and session resource parameters of the session resource. The generation of the WebRTC connection request can be completed by the WebRTC server, and reference can be made to the corresponding part of Embodiment 1 of the WebRTC communication method of the present invention, which will not be repeated here.
步骤302:向被叫终端发送WebRTC连接请求,以使被叫终端连接到WebRTC服务器中的会话资源,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据WebRTC连接请求发起的,会话资源是WebRTC服务器根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上为主叫终端与被叫终端连接分配的。Step 302: Send a WebRTC connection request to the called terminal, so that the called terminal connects to the session resource in the WebRTC server, thereby establishing a connection between the calling terminal and the called terminal, wherein the connection between the called terminal and the session resource is the called The terminal initiates according to the WebRTC connection request, and the session resource is allocated by the WebRTC server for the connection between the calling terminal and the called terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request.
电信网关可以完成认证、鉴权,通过电信网络中的信令管理通道将WebRTC连接请求推送给被叫终端,即WebRTC连接请求为电信信令。The telecommunications gateway can complete authentication and authentication, and push the WebRTC connection request to the called terminal through the signaling management channel in the telecommunications network, that is, the WebRTC connection request is a telecommunications signaling.
本方法实施例通过WebRTC与电信网络的融合通信,利用电信网关将WebRTC连接请求发送给被叫终端,使被叫终端不用一直保持与WebRTC服务器的连接也能收到WebRTC连接请求,以建立主叫终端与被叫终端的连接,从而保证了WebRTC通信的实时性。In this embodiment of the method, through the integrated communication between WebRTC and the telecommunication network, the telecommunication gateway is used to send the WebRTC connection request to the called terminal, so that the called terminal can receive the WebRTC connection request without always maintaining the connection with the WebRTC server, so as to establish the calling terminal. The connection between the terminal and the called terminal ensures the real-time performance of WebRTC communication.
电信网关具有类似来电显示的功能,可以将包括URL地址的WebRTC连接请求(WebRTC服务器的WebRTC服务器地址以及会话资源参数)通过信令管理通道发送给被叫终端。来电显示功能泛指所有在信令通道中传输主叫方信息的方法,如BELL202标准,允许传输255个字符以内的主叫方信息。The telecom gateway has a function similar to the caller ID, and can send the WebRTC connection request including the URL address (WebRTC server address of the WebRTC server and session resource parameters) to the called terminal through the signaling management channel. The caller ID function generally refers to all methods of transmitting calling party information in the signaling channel, such as the BELL202 standard, which allows the transmission of calling party information within 255 characters.
但是,在一些情况下电信网关的来电显示功能只能传输代表主叫方信息的电话号码,而不能传输多个字符(如包括URL地址的WebRTC连接请求),因此,电信网关可以使用编码的方式将电话号码与包括URL地址的WebRTC连接请求进行映射。However, in some cases, the caller ID function of the telecom gateway can only transmit the phone number representing the calling party information, but cannot transmit multiple characters (such as a WebRTC connection request including a URL address), so the telecom gateway can use the encoding method Map phone numbers to WebRTC connection requests including URL addresses.
这样,在本发明的一些实施例中,本发明实施例WebRTC通信方法可以进一步包括:将URL地址编码为电话号码;则向被叫终端发送WebRTC连接请求,包括:向被叫终端发送包括电话号码的WebRTC连接请求。即电信网关可以向被叫终端推送WebRTC连接请求,WebRTC连接请求可以有两种不同形式,一种为包括URL地址的WebRTC连接请求,另一种为包括电话号码的WebRTC连接请求。In this way, in some embodiments of the present invention, the WebRTC communication method of the embodiment of the present invention may further include: encoding the URL address into a phone number; then sending a WebRTC connection request to the called terminal, including: sending The WebRTC connection request. That is, the telecommunications gateway can push a WebRTC connection request to the called terminal. The WebRTC connection request can have two different forms, one is a WebRTC connection request including a URL address, and the other is a WebRTC connection request including a phone number.
另外,由于被叫终端可能不支持WebRTC功能,则可以在电信网关设置WebRTC客户端代理模块。这样,在本发明的一些实施例中,本发明实施例WebRTC通信方法可以进一步包括:在被叫终端选择通过电信网络完成WebRTC通信时,建立与被叫终端的连接,并根据WebRTC连接请求连接到WebRTC服务器中的会话资源,以使被叫终端连接到WebRTC服务器中的会话资源;接收WebRTC服务器发送的主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并通过WebRTC服务器发送给主叫终端;对主叫终端与被叫终端之间发送的数据进行协议转换,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。In addition, since the called terminal may not support the WebRTC function, a WebRTC client proxy module can be set on the telecommunications gateway. In this way, in some embodiments of the present invention, the WebRTC communication method of the embodiment of the present invention may further include: when the called terminal chooses to complete WebRTC communication through the telecommunications network, establish a connection with the called terminal, and connect to the WebRTC connection request according to the WebRTC connection request. The session resource in the WebRTC server, so that the called terminal connects to the session resource in the WebRTC server; receive the WebRTC initialization information of the calling terminal sent by the WebRTC server and send it to the called terminal, receive the WebRTC initialization information of the called terminal and pass The WebRTC server sends it to the calling terminal; performs protocol conversion on the data sent between the calling terminal and the called terminal, so that the calling terminal and the called terminal complete the WebRTC communication according to the WebRTC initialization information.
即电信网关启动一个模拟WebRTC客户端,完成与主叫终端的WebRTC客户端的连接,启动一个模拟电信客户端,完成与被叫终端的电信客户端的连接。主叫终端发送给被叫终端的数据由电信网关的模拟WebRTC客户端接收,经过协议转换后,由电信网关的模拟电信网关发送给被叫终端。同样的,被叫终端发送给主叫终端的数据也通过电信网关进行转发,电信网关可以完成WebRTC协议和电信协议的转换。That is, the telecom gateway starts a simulated WebRTC client to complete the connection with the WebRTC client of the calling terminal, and starts a simulated telecom client to complete the connection with the telecom client of the called terminal. The data sent by the calling terminal to the called terminal is received by the simulated WebRTC client of the telecommunications gateway, and after protocol conversion, the data is sent to the called terminal by the simulated telecommunications gateway of the telecommunications gateway. Similarly, the data sent by the called terminal to the calling terminal is also forwarded through the telecommunication gateway, and the telecommunication gateway can complete the conversion between the WebRTC protocol and the telecommunication protocol.
参见图4所示,是本发明实施例中WebRTC通信方法实施例4的流程图,本实施例可以由电信网关实现该方法,可以包括以下步骤:Referring to Figure 4, it is a flow chart of Embodiment 4 of the WebRTC communication method in the embodiment of the present invention. In this embodiment, the method can be implemented by a telecommunications gateway, which may include the following steps:
步骤401:电信网关接收WebRTC服务器发送的WebRTC连接请求以及被叫终端的电信账号信息。Step 401: The telecommunications gateway receives the WebRTC connection request sent by the WebRTC server and the telecommunications account information of the called terminal.
步骤402:向被叫终端发送WebRTC连接请求。Step 402: Send a WebRTC connection request to the called terminal.
步骤403:当被叫终端通过电信网络完成WebRTC通信时,建立与被叫终端的连接,并根据WebRTC连接请求连接到WebRTC服务器中的会话资源。Step 403: When the called terminal completes the WebRTC communication through the telecommunication network, establish a connection with the called terminal, and connect to the session resource in the WebRTC server according to the WebRTC connection request.
步骤404:接收WebRTC服务器发送的主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并通过WebRTC服务器发送给主叫终端。Step 404: Receive the WebRTC initialization information of the calling terminal sent by the WebRTC server and send it to the called terminal, receive the WebRTC initialization information of the called terminal and send it to the calling terminal through the WebRTC server.
步骤405:对主叫终端与被叫终端之间发送的数据进行协议转换,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。Step 405: Perform protocol conversion on the data sent between the calling terminal and the called terminal, so that the calling terminal and the called terminal complete the WebRTC communication according to the WebRTC initialization information.
本方法实施例与方法实施例3相比,进一步包括了WebRTC初始化信息交换的过程,特别是被叫终端选择通过电信网络完成WebRTC通信时,需要电信网关将被叫终端与WebRTC服务器之间的数据、信息进行转发,以使主叫终端与被叫终端完成WebRTC通信,从而完成主叫终端与被叫终端之间的音视频或数据的传输。Compared with method embodiment 3, this method embodiment further includes the process of WebRTC initialization information exchange, especially when the called terminal chooses to complete WebRTC communication through the telecommunications network, the telecommunications gateway needs to transfer the data between the called terminal and the WebRTC server , The information is forwarded, so that the calling terminal and the called terminal complete the WebRTC communication, thereby completing the transmission of audio, video or data between the calling terminal and the called terminal.
参见图5所示,是本发明实施例中WebRTC通信方法实施例5的流程图,本实施例可以由被叫终端实现该方法,可以包括以下步骤:Referring to Figure 5, it is a flow chart of Embodiment 5 of the WebRTC communication method in the embodiment of the present invention. This embodiment can implement the method by the called terminal, and may include the following steps:
步骤501:被叫终端接收电信网关发送的WebRTC连接请求;WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成并发送给电信网关的,包括WebRTC服务器地址以及会话资源参数。Step 501: The called terminal receives the WebRTC connection request sent by the telecommunications gateway; the WebRTC connection request is generated by the WebRTC server according to the call request in the form of Web signaling sent by the calling terminal and sent to the telecommunications gateway, including the WebRTC server address and session resource parameters .
在本发明的一些实施例中,WebRTC连接请求包括统一资源定位符URL地址,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数,或者,WebRTC连接请求包括电话号码,电话号码是电信网关对URL地址编码获得的。In some embodiments of the present invention, the WebRTC connection request includes a Uniform Resource Locator URL address, and the URL address represents the WebRTC server address and session resource parameters of the session resource, or, the WebRTC connection request includes a phone number, and the phone number is the communication gateway to the URL The address code is obtained.
当WebRTC连接请求包括电话号码,代表电信网关对WebRTC连接请求进行了编码,需要对该电话号码进行解码,被叫终端中可以保存有电话号码与URL地址的对应关系,该对应关系可以由被叫终端的电信客户端自带,也可以由用户手动更新。When the WebRTC connection request includes a phone number, it means that the telecommunications gateway has encoded the WebRTC connection request, and the phone number needs to be decoded. The called terminal can store the corresponding relationship between the phone number and the URL address, and the corresponding relationship can be determined by the called terminal. The terminal's telecom client comes with it, or it can be manually updated by the user.
这样,在本发明的一些实施例中,本发明实施例WebRTC通信方法进一步可以包括:当WebRTC连接请求包括电话号码,对电话号码进行解码,获得包括URL地址的WebRTC连接请求,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数。In this way, in some embodiments of the present invention, the WebRTC communication method of the embodiment of the present invention may further include: when the WebRTC connection request includes a phone number, decode the phone number to obtain a WebRTC connection request including a URL address, and the URL address represents the WebRTC server Address and session resource parameters of the session resource.
步骤502:根据WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接;会话资源是WebRTC服务器根据主叫终端发送的呼叫请求为主叫终端与被叫终端分配的。Step 502: Connect to the session resource in the WebRTC server according to the WebRTC connection request, and establish a connection with the calling terminal; the session resource is allocated by the WebRTC server to the calling terminal and the called terminal according to the call request sent by the calling terminal.
本发明实施例通过WebRTC与电信网络的融合通信,将WebRTC连接请求通过电信网关发送给被叫终端,利用电信网关实现信息推送,使用户终端不用一直保持与WebRTC服务器的连接也能收到WebRTC连接请求,以建立WebRTC通信,从而保证了WebRTC通信的实时性。The embodiment of the present invention sends the WebRTC connection request to the called terminal through the telecommunication gateway through the integrated communication of WebRTC and the telecommunication network, and uses the telecommunication gateway to realize information push, so that the user terminal can receive the WebRTC connection without always maintaining the connection with the WebRTC server Request to establish WebRTC communication, thus ensuring the real-time performance of WebRTC communication.
在本发明的一些实施例中,根据WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接的实现过程可以包括:选择通过WebRTC连接时,打开URL地址,连接到WebRTC服务器中的会话资源,建立与主叫终端的连接。In some embodiments of the present invention, according to the WebRTC connection request to connect to the session resource in the WebRTC server, the implementation process of establishing a connection with the calling terminal may include: when selecting to connect through WebRTC, open the URL address, and connect to the WebRTC server session resource, and establish a connection with the calling terminal.
在本发明的一些实施例中,根据WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接的实现过程也可以包括:选择通过电信网络建立连接时,建立与电信网关的连接,以使电信网关根据WebRTC连接请求连接到WebRTC服务器中的会话资源,连接到WebRTC服务器中的会话资源;通过电信网关,建立与主叫终端的连接。In some embodiments of the present invention, according to the WebRTC connection request to connect to the session resource in the WebRTC server, the implementation process of establishing a connection with the calling terminal may also include: when selecting to establish a connection through the telecommunication network, establishing a connection with the telecommunication gateway , so that the telecommunications gateway connects to the session resource in the WebRTC server according to the WebRTC connection request, and connects to the session resource in the WebRTC server; establishes a connection with the calling terminal through the telecommunications gateway.
在本发明的一些实施例中,本发明实施例WebRTC通信方法进一步可以包括:选择通过WebRTC建立连接时,向WebRTC服务器发送WebRTC初始化信息,接收WebRTC服务器发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信;或者,选择通过电信网络建立连接时,向电信网关发送WebRTC初始化信息,接收电信网关发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信。In some embodiments of the present invention, the WebRTC communication method of the embodiment of the present invention may further include: when selecting to establish a connection through WebRTC, sending WebRTC initialization information to the WebRTC server, receiving the WebRTC initialization information of the calling terminal sent by the WebRTC server, and communicating with the calling terminal Call the terminal to complete WebRTC communication; or, when choosing to establish a connection through the telecommunications network, send WebRTC initialization information to the telecommunications gateway, receive the WebRTC initialization information of the calling terminal sent by the telecommunications gateway, and complete WebRTC communication with the calling terminal.
即被叫终端中的通话管理软件在收到WebRTC连接请求时,能够通过主叫方信息判断出这是一个WebRTC连接请求或者普通电话呼叫请求。如果是WebRTC连接请求时,用户可以选择是否直接与主叫终端进行连接,如果是,则可以通过打开浏览器,打开URL地址,连接到WebRTC服务器中的会话资源,建立与主叫终端的连接,并可以直接通过WebRTC服务器与主叫终端进行初始化信息的交换,完成与主叫终端的WebRTC通信;如果否,则可以与电信网关连接,通过电信网关连接到WebRTC服务器中的会话资源,通过电信网关,建立与主叫终端的连接,通过电信网关与WebRTC服务器进行主叫终端与被叫终端的初始化信息交换,通过电信网关完成与主叫终端的WebRTC通信。That is, when the call management software in the called terminal receives the WebRTC connection request, it can judge that it is a WebRTC connection request or an ordinary phone call request based on the calling party information. If it is a WebRTC connection request, the user can choose whether to directly connect to the calling terminal. If so, the user can open the browser, open the URL address, connect to the session resource in the WebRTC server, and establish a connection with the calling terminal. And can directly exchange initialization information with the calling terminal through the WebRTC server to complete the WebRTC communication with the calling terminal; , establish a connection with the calling terminal, exchange initialization information between the calling terminal and the called terminal through the telecommunication gateway and the WebRTC server, and complete the WebRTC communication with the calling terminal through the telecommunication gateway.
也就是说,被叫终端选择直接与主叫终端进行连接时,在WebRTC初始化信息交换后,被叫终端选择与主叫终端直接通信,是真正的端到端的通信方式;而被叫终端选择不直接与主叫终端进行连接时,在WebRTC初始化信息交换后,被叫终端选择与主叫终端通过电信网关的转发进行通信,不属于严格意义上的端到端通信。这样,本发明实施例在被叫终端没有安装有支持WebRTC的浏览器时,也可以与主叫终端完成实时通信。That is to say, when the called terminal chooses to connect directly with the calling terminal, after WebRTC initializes the information exchange, the called terminal chooses to communicate directly with the calling terminal, which is a real end-to-end communication method; while the called terminal chooses not to When connecting directly with the calling terminal, after WebRTC initializes the information exchange, the called terminal chooses to communicate with the calling terminal through the forwarding of the telecommunications gateway, which does not belong to the end-to-end communication in the strict sense. In this way, in the embodiment of the present invention, when the called terminal is not installed with a browser supporting WebRTC, real-time communication with the calling terminal can also be completed.
参见图6所示,是本发明实施例中WebRTC通信方法实施例6的流程图,本实施例可以由被叫终端实现该方法,可以包括以下步骤:Referring to FIG. 6, it is a flowchart of Embodiment 6 of the WebRTC communication method in the embodiment of the present invention. This embodiment can implement the method by the called terminal, and may include the following steps:
步骤601:被叫终端接收电信网关发送的WebRTC连接请求。Step 601: The called terminal receives the WebRTC connection request sent by the telecommunications gateway.
步骤602:识别WebRTC连接请求内容。Step 602: Identify the content of the WebRTC connection request.
步骤603:当WebRTC连接请求内容包括代表WebRTC服务器地址以及会话资源参数的URL地址,获得该URL地址。Step 603: When the content of the WebRTC connection request includes a URL address representing the WebRTC server address and session resource parameters, obtain the URL address.
步骤604:当WebRTC连接请求包括电话号码,对电话号码进行解码,获得包括代表WebRTC服务器地址以及会话资源参数的URL地址。Step 604: When the WebRTC connection request includes a phone number, decode the phone number to obtain a URL address including a representative WebRTC server address and session resource parameters.
步骤605:判断是否直接与主叫终端进行连接,如果是,进入步骤606,如果否,进入步骤608。Step 605: Determine whether to connect directly with the calling terminal, if yes, go to step 606, if not, go to step 608.
步骤606:通过浏览器打开URL地址,连接到WebRTC服务器中的会话资源,建立与主叫终端的连接。Step 606: Open the URL address through the browser, connect to the session resource in the WebRTC server, and establish a connection with the calling terminal.
步骤607:向WebRTC服务器发送WebRTC初始化信息,接收WebRTC服务器发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信。Step 607: Send WebRTC initialization information to the WebRTC server, receive the WebRTC initialization information of the calling terminal sent by the WebRTC server, and complete WebRTC communication with the calling terminal.
步骤608:建立与电信网关的连接,以使电信网关根据WebRTC连接请求连接到WebRTC服务器中的会话资源;通过电信网关,建立与主叫终端的连接。Step 608: Establish a connection with the telecommunications gateway, so that the telecommunications gateway connects to the session resource in the WebRTC server according to the WebRTC connection request; establish a connection with the calling terminal through the telecommunications gateway.
步骤609:向电信网关发送WebRTC初始化信息,接收电信网关发送的主叫终端的WebRTC初始化信息,通过电信网关与主叫终端完成WebRTC通信。Step 609: Send WebRTC initialization information to the telecommunication gateway, receive the WebRTC initialization information of the calling terminal sent by the telecommunication gateway, and complete the WebRTC communication with the calling terminal through the telecommunication gateway.
本方法实施例与方法实施例5相比,进一步包括了被叫终端直接或通过解码的方式获得WebRTC连接请求中包括代表WebRTC服务器地址以及会话资源参数的URL地址的过程以及选择通过WebRTC连接或选择通过电信网络建立连接并与主叫终端交换WebRTC初始化信息,完成WebRTC通信的过程。本方法实施例从被叫终端的角度说明了被叫终端与主叫终端建立实时WebRTC通信的过程。Compared with method embodiment 5, this method embodiment further includes the process that the called terminal obtains the WebRTC connection request including the URL address representing the WebRTC server address and session resource parameters directly or through decoding, and chooses to connect or select Establish a connection through the telecommunication network and exchange WebRTC initialization information with the calling terminal to complete the process of WebRTC communication. This embodiment of the method describes the process of establishing real-time WebRTC communication between the called terminal and the calling terminal from the perspective of the called terminal.
与上述各个WebRTC通信方法实施例相对应的,参见图7所示,本发明实施例还提供一种WebRTC通信系统实施例,包括主叫终端701、WebRTC服务器702、电信网关703以及被叫终端704。Corresponding to the above-mentioned WebRTC communication method embodiments, as shown in FIG. 7, the embodiment of the present invention also provides a WebRTC communication system embodiment, including a calling terminal 701, a WebRTC server 702, a telecommunications gateway 703, and a called terminal 704 .
主叫终端701,用于向WebRTC服务器发送呼叫请求,呼叫请求中可以包含被叫终端的电信账号信息;连接到WebRTC为主叫终端与被叫终端连接建立的会话资源中,以建立与被叫终端的连接。The calling terminal 701 is used to send a call request to the WebRTC server. The call request may include the telecommunications account information of the called terminal; it is connected to the session resource established by WebRTC for the connection between the calling terminal and the called terminal to establish a connection with the called terminal. Terminal connections.
在本发明的一些实施例中,主叫终端还用于:向WebRTC服务器发送主叫终端的WebRTC初始化信息,接收WebRTC服务器发送的被叫终端的WebRTC初始化信息,完成与被叫终端的WebRTC通信。In some embodiments of the present invention, the calling terminal is also used to: send the WebRTC initialization information of the calling terminal to the WebRTC server, receive the WebRTC initialization information of the called terminal sent by the WebRTC server, and complete the WebRTC communication with the called terminal.
WebRTC服务器702,用于接收主叫终端发送的呼叫请求,呼叫请求为Web信令;根据呼叫请求获得被叫终端的电信账号信息,并根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上建立主叫终端与被叫终端连接的会话资源;生成WebRTC连接请求,WebRTC连接请求包括WebRTC服务器地址以及会话资源的会话资源参数;向电信网关发送WebRTC连接请求以及被叫终端的电信账号信息,以使电信网关向被叫终端转发WebRTC连接请求;建立被叫终端到会话资源的连接,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据WebRTC连接请求发起的。The WebRTC server 702 is used to receive the call request sent by the calling terminal, and the call request is Web signaling; obtain the telecommunications account information of the called terminal according to the call request, and obtain the calling terminal information and calling routing information carried in the call request , call type information, establish a session resource connecting the calling terminal and the called terminal on the WebRTC server; generate a WebRTC connection request, and the WebRTC connection request includes the WebRTC server address and session resource parameters of the session resource; send the WebRTC connection request to the telecom gateway and The telecommunications account information of the called terminal, so that the telecommunications gateway forwards the WebRTC connection request to the called terminal; establishes the connection between the called terminal and the session resource, thereby establishing the connection between the calling terminal and the called terminal, wherein the called terminal connects to the session resource The connection is initiated by the called terminal according to the WebRTC connection request.
在本发明的一些实施例中,根据呼叫请求获得被叫终端的电信账号信息,包括:如果呼叫请求包含被叫终端的电信账号信息,直接获得被叫终端的电信账号信息;或者,如果呼叫请求包含被叫终端的WebRTC账号信息,查找被叫终端的WebRTC账号信息与被叫终端的电信账号信息的映射关系,获得被叫终端的电信账号信息。In some embodiments of the present invention, obtaining the telecommunications account information of the called terminal according to the call request includes: if the call request contains the telecommunications account information of the called terminal, directly obtaining the telecommunications account information of the called terminal; or, if the call request Contains the WebRTC account information of the called terminal, searches for the mapping relationship between the WebRTC account information of the called terminal and the telecommunications account information of the called terminal, and obtains the telecommunications account information of the called terminal.
在本发明的一些实施例中,生成WebRTC连接请求,WebRTC连接请求包括WebRTC服务器地址以及会话资源的会话资源参数,包括:生成包括统一资源定位符URL地址的WebRTC连接请求,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数。In some embodiments of the present invention, a WebRTC connection request is generated, and the WebRTC connection request includes a WebRTC server address and a session resource parameter of a session resource, including: generating a WebRTC connection request including a Uniform Resource Locator URL address, where the URL address represents the WebRTC server address and the session resource parameter for the session resource.
在本发明的一些实施例中,WebRTC服务器还用于:接收主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信,In some embodiments of the present invention, the WebRTC server is also used to: receive the WebRTC initialization information of the calling terminal and send it to the called terminal, receive the WebRTC initialization information of the called terminal and send it to the calling terminal, so that the calling terminal Complete WebRTC communication with the called terminal according to the WebRTC initialization information,
在本发明的一些实施例中,在被叫终端选择通过电信网络建立连接时,接收主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信具体为:接收主叫终端的WebRTC初始化信息并通过电信网关发送给被叫终端,通过电信网关接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息通过电信网关完成WebRTC通信。In some embodiments of the present invention, when the called terminal chooses to establish a connection through the telecommunication network, the WebRTC initialization information of the calling terminal is received and sent to the called terminal, and the WebRTC initialization information of the called terminal is received and sent to the calling terminal so that the calling terminal and the called terminal complete the WebRTC communication according to the WebRTC initialization information, specifically: receiving the WebRTC initialization information of the calling terminal and sending it to the called terminal through the telecommunications gateway, receiving the WebRTC initialization information of the called terminal through the telecommunications gateway and Send to the calling terminal, so that the calling terminal and the called terminal complete the WebRTC communication through the telecommunications gateway according to the WebRTC initialization information.
电信网关703,用于接收WebRTC服务器发送的WebRTC连接请求以及被叫终端的电信账号信息,被叫终端的电信账号信息是WebRTC服务器根据主叫终端发送的呼叫请求获得的,WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成的,包括WebRTC服务器地址以及会话资源参数;向被叫终端发送WebRTC连接请求,以使被叫终端连接到WebRTC服务器中的会话资源,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据WebRTC连接请求发起的,会话资源是WebRTC服务器根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上为主叫终端与被叫终端连接分配的。The telecommunications gateway 703 is used to receive the WebRTC connection request sent by the WebRTC server and the telecommunications account information of the called terminal. The telecommunications account information of the called terminal is obtained by the WebRTC server according to the call request sent by the calling terminal, and the WebRTC connection request is obtained by the WebRTC server. Generated according to the call request in the form of Web signaling sent by the calling terminal, including the WebRTC server address and session resource parameters; send a WebRTC connection request to the called terminal, so that the called terminal connects to the session resource in the WebRTC server, thereby establishing The connection between the calling terminal and the called terminal. The connection between the called terminal and the session resource is initiated by the called terminal according to the WebRTC connection request, and the session resource is obtained by the WebRTC server according to the calling terminal information and calling routing information carried in the call request , Call type information, allocated on the WebRTC server for the connection between the calling terminal and the called terminal.
在本发明的一些实时例中,WebRTC连接请求包括代表WebRTC服务器地址以及会话资源的会话资源参数的统一资源定位符URL地址。In some real-time examples of the invention, the WebRTC connection request includes a Uniform Resource Locator URL address representing the WebRTC server address and session resource parameters of the session resource.
在本发明的一些实施例中,电信网关还用于:将URL地址编码为电话号码;向被叫终端发送WebRTC连接请求,包括:向被叫终端发送包括电话号码的WebRTC连接请求。In some embodiments of the present invention, the telecommunications gateway is further used to: encode the URL address into a phone number; and send the WebRTC connection request to the called terminal, including: sending the WebRTC connection request including the phone number to the called terminal.
在本发明的一些实施例中,电信网关还用于:在被叫终端选择通过电信网络完成WebRTC通信时,建立与被叫终端的连接,并根据WebRTC连接请求连接到WebRTC服务器中的会话资源,以使被叫终端连接到WebRTC服务器中的会话资源;接收WebRTC服务器发送的主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并通过WebRTC服务器发送给主叫终端;对主叫终端与被叫终端之间发送的数据进行协议转换,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。In some embodiments of the present invention, the telecommunications gateway is also used to: establish a connection with the called terminal when the called terminal chooses to complete the WebRTC communication through the telecommunications network, and connect to the session resource in the WebRTC server according to the WebRTC connection request, Make the called terminal connect to the session resource in the WebRTC server; receive the WebRTC initialization information of the calling terminal sent by the WebRTC server and send it to the called terminal, receive the WebRTC initialization information of the called terminal and send it to the calling terminal through the WebRTC server ; Perform protocol conversion on the data sent between the calling terminal and the called terminal, so that the calling terminal and the called terminal complete the WebRTC communication according to the WebRTC initialization information.
被叫终端704,用于接收电信网关发送的WebRTC连接请求;WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成并发送给电信网关的,包括WebRTC服务器地址以及会话资源参数;根据WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接;会话资源是WebRTC服务器根据主叫终端发送的呼叫请求为主叫终端与被叫终端分配的。The called terminal 704 is used to receive the WebRTC connection request sent by the telecommunications gateway; the WebRTC connection request is generated by the WebRTC server according to the call request in the form of Web signaling sent by the calling terminal and sent to the telecommunications gateway, including the WebRTC server address and session resources Parameters; connect to the session resource in the WebRTC server according to the WebRTC connection request, and establish a connection with the calling terminal; the session resource is allocated by the WebRTC server to the calling terminal and the called terminal according to the call request sent by the calling terminal.
在本发明的一些实施例中,WebRTC连接请求包括统一资源定位符URL地址,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数,或者,WebRTC连接请求包括电话号码,电话号码是电信网关对URL地址编码获得的。In some embodiments of the present invention, the WebRTC connection request includes a Uniform Resource Locator URL address, and the URL address represents the WebRTC server address and session resource parameters of the session resource, or, the WebRTC connection request includes a phone number, and the phone number is the communication gateway to the URL The address code is obtained.
在本发明的一些实施例中,被叫终端还用于:当WebRTC连接请求包括电话号码,对电话号码进行解码,获得包括URL地址的WebRTC连接请求,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数。In some embodiments of the present invention, the called terminal is also used to: when the WebRTC connection request includes a phone number, decode the phone number to obtain a WebRTC connection request including a URL address, where the URL address represents the address of the WebRTC server and the session of the session resource resource parameters.
在本发明的一些实施例中,根据WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接,包括:选择通过WebRTC连接时,打开URL地址,连接到WebRTC服务器中的会话资源,建立与主叫终端的连接。In some embodiments of the present invention, according to the WebRTC connection request, connect to the session resource in the WebRTC server, and establish a connection with the calling terminal, including: when selecting to connect via WebRTC, open the URL address, and connect to the session resource in the WebRTC server , to establish a connection with the calling terminal.
在本发明的一些实施例中,根据WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接,包括:选择通过电信网络建立连接时,建立与电信网关的连接,以使电信网关根据WebRTC连接请求连接到WebRTC服务器中的会话资源;通过电信网关,建立与主叫终端的连接。In some embodiments of the present invention, the connection to the session resource in the WebRTC server is established according to the WebRTC connection request, and the connection with the calling terminal is established. The gateway connects to the session resource in the WebRTC server according to the WebRTC connection request; establishes a connection with the calling terminal through the telecommunications gateway.
在本发明的一些实施例中,被叫终端还用于:选择通过WebRTC建立连接时,向WebRTC服务器发送WebRTC初始化信息,接收WebRTC服务器发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信;或者,选择通过电信网络建立连接时,向电信网关发送WebRTC初始化信息,接收电信网关发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信。In some embodiments of the present invention, the called terminal is also used to: when selecting to establish a connection through WebRTC, send WebRTC initialization information to the WebRTC server, receive the WebRTC initialization information of the calling terminal sent by the WebRTC server, and complete the WebRTC connection with the calling terminal. Communication; or, when choosing to establish a connection through the telecommunication network, send WebRTC initialization information to the telecommunication gateway, receive the WebRTC initialization information of the calling terminal sent by the telecommunication gateway, and complete the WebRTC communication with the calling terminal.
结合图8所示的信令交互示意图,对上述各个部分所起作用以及各部分间的信息交互过程进行简单介绍。Combining with the schematic diagram of signaling interaction shown in FIG. 8 , the functions of the above-mentioned parts and the information interaction process between the parts are briefly introduced.
步骤801:主叫终端向WebRTC服务器发送呼叫请求,该呼叫请求为Web信令。Step 801: the calling terminal sends a call request to the WebRTC server, and the call request is a Web signaling.
步骤802:WebRTC服务器根据呼叫请求获得被叫终端的电信账号信息。Step 802: The WebRTC server obtains the telecommunications account information of the called terminal according to the call request.
步骤803:WebRTC服务器根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上建立主叫终端与被叫终端连接的会话资源。Step 803: The WebRTC server establishes a session resource connecting the calling terminal and the called terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request.
步骤804:WebRTC服务器生成WebRTC连接请求,调用电信网关,向电信网关发送WebRTC连接请求以及被叫终端的电信账号信息。Step 804: the WebRTC server generates a WebRTC connection request, invokes the telecommunications gateway, and sends the WebRTC connection request and the telecommunications account information of the called terminal to the telecommunications gateway.
步骤805:电信网关通过认证、鉴权,准备呼叫被叫终端,通过信令通道将WebRTC连接请求推送给被叫终端。Step 805: The telecommunication gateway prepares to call the called terminal through authentication and authorization, and pushes the WebRTC connection request to the called terminal through the signaling channel.
步骤806:被叫终端接收WebRTC连接请求,根据WebRTC连接请求,判断是否直接与主叫终端进行连接,如果是,即选择通过WebRTC建立连接,进入步骤807,如果否,即选择通过电信网络建立连接,进入步骤809。Step 806: The called terminal receives the WebRTC connection request, and judges whether to connect directly with the calling terminal according to the WebRTC connection request. If yes, choose to establish a connection through WebRTC, and go to step 807. If not, choose to establish a connection through a telecommunications network , go to step 809.
步骤807:被叫终端通过浏览器打开URL地址,连接到WebRTC服务器中的会话资源,建立与主叫终端的连接。Step 807: The called terminal opens the URL address through the browser, connects to the session resource in the WebRTC server, and establishes a connection with the calling terminal.
步骤808:WebRTC服务器交换主叫终端与被叫终端的WebRTC初始化信息,完成主叫终端与被叫终端的WebRTC通信。Step 808: the WebRTC server exchanges the WebRTC initialization information of the calling terminal and the called terminal, and completes the WebRTC communication between the calling terminal and the called terminal.
步骤809:被叫终端建立与电信网关的连接,电信网关根据WebRTC连接请求连接到WebRTC服务器中的会话资源;通过电信网关建立被叫终端与主叫终端的连接。Step 809: The called terminal establishes a connection with the telecommunication gateway, and the telecommunication gateway connects to the session resource in the WebRTC server according to the WebRTC connection request; establishes the connection between the called terminal and the calling terminal through the telecommunication gateway.
步骤810:WebRTC服务器通过电信网关交换主叫终端与被叫终端的WebRTC初始化信息,通过电信网关完成主叫终端与被叫终端的WebRTC通信。Step 810: the WebRTC server exchanges the WebRTC initialization information of the calling terminal and the called terminal through the telecommunication gateway, and completes the WebRTC communication between the calling terminal and the called terminal through the telecommunication gateway.
参见图9所示,是本发明实施例中WebRTC服务器实施例的示意图,可以包括:Referring to Figure 9, it is a schematic diagram of a WebRTC server embodiment in the embodiment of the present invention, which may include:
接收单元901,用于WebRTC服务器接收主叫终端发送的呼叫请求,呼叫请求为Web信令;The receiving unit 901 is used for the WebRTC server to receive the call request sent by the calling terminal, and the call request is Web signaling;
建立单元902,用于根据呼叫请求获得被叫终端的电信账号信息,并根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上建立主叫终端与被叫终端连接的会话资源;The establishment unit 902 is configured to obtain the telecommunications account information of the called terminal according to the call request, and establish the calling terminal and the called terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request. session resources for terminal connections;
生成单元903,用于生成WebRTC连接请求,WebRTC连接请求包括WebRTC服务器地址以及会话资源的会话资源参数;A generating unit 903, configured to generate a WebRTC connection request, where the WebRTC connection request includes a WebRTC server address and session resource parameters of the session resource;
发送单元904,用于向电信网关发送生成单元生成的WebRTC连接请求以及建立单元建立的被叫终端的电信账号信息,以使电信网关向被叫终端转发WebRTC连接请求;The sending unit 904 is configured to send to the telecommunications gateway the WebRTC connection request generated by the generation unit and the telecommunications account information of the called terminal established by the establishment unit, so that the telecommunications gateway forwards the WebRTC connection request to the called terminal;
连接单元905,建立被叫终端到会话资源的连接,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据发送单元发送的WebRTC连接请求发起的。The connection unit 905 establishes a connection between the called terminal and the session resource, thereby establishing a connection between the calling terminal and the called terminal, wherein the connection between the called terminal and the session resource is initiated by the called terminal according to the WebRTC connection request sent by the sending unit.
在本发明的一些实施例中,建立单元可以具体用于:In some embodiments of the present invention, the establishment unit can be specifically used for:
如果接收单元接收的呼叫请求包含被叫终端的电信账号信息,直接获得被叫终端的电信账号信息,建立主叫终端与被叫终端连接的会话资源;If the call request received by the receiving unit includes the telecommunications account information of the called terminal, directly obtain the telecommunications account information of the called terminal, and establish a session resource for connecting the calling terminal and the called terminal;
或者,如果接收单元接收的呼叫请求包含被叫终端的WebRTC账号信息,查找被叫终端的WebRTC账号信息与被叫终端的电信账号信息的映射关系,获得被叫终端的电信账号信息,建立主叫终端与被叫终端连接的会话资源。Or, if the call request received by the receiving unit includes the WebRTC account information of the called terminal, look up the mapping relationship between the WebRTC account information of the called terminal and the telecommunications account information of the called terminal, obtain the telecommunications account information of the called terminal, and establish the calling The session resource used by the terminal to connect with the called terminal.
在本发明的一些实施例中,生成单元可以具体用于:In some embodiments of the present invention, the generating unit may be specifically used for:
生成包括统一资源定位符URL地址的WebRTC连接请求,URL地址代表WebRTC服务器地址以及建立单元建立的会话资源的会话资源参数。Generate a WebRTC connection request including a Uniform Resource Locator URL address, where the URL address represents the WebRTC server address and the session resource parameters of the session resource established by the establishment unit.
在本发明的一些实施例中,本发明实施例WebRTC服务器还可以包括:In some embodiments of the present invention, the WebRTC server of the embodiment of the present invention may also include:
初始化单元,接收主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。The initialization unit receives the WebRTC initialization information of the calling terminal and sends it to the called terminal, receives the WebRTC initialization information of the called terminal and sends it to the calling terminal, so that the calling terminal and the called terminal complete WebRTC communication according to the WebRTC initialization information.
在本发明的一些实施例中,在被叫终端选择通过电信网络建立连接时,初始化单元具体用于:在被叫终端选择通过电信网络建立连接时,接收主叫终端的WebRTC初始化信息并通过电信网关发送给被叫终端,通过电信网关接收被叫终端的WebRTC初始化信息并发送给主叫终端,以使主叫终端与被叫终端根据WebRTC初始化信息通过电信网关完成WebRTC通信。In some embodiments of the present invention, when the called terminal chooses to establish a connection through the telecommunication network, the initialization unit is specifically configured to: when the called terminal chooses to establish a connection through the telecommunication network, receive the WebRTC initialization information of the calling terminal and transmit The gateway sends to the called terminal, receives the WebRTC initialization information of the called terminal through the telecommunication gateway and sends it to the calling terminal, so that the calling terminal and the called terminal complete WebRTC communication through the telecommunication gateway according to the WebRTC initialization information.
参见图10所示,是本发明实施例中电信网关实施例的示意图,可以包括:Referring to Figure 10, it is a schematic diagram of an embodiment of a telecommunications gateway in an embodiment of the present invention, which may include:
接收单元1001,用于接收WebRTC服务器发送的WebRTC连接请求以及被叫终端的电信账号信息,被叫终端的电信账号信息是WebRTC服务器根据主叫终端发送的呼叫请求获得的,WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成的,包括WebRTC服务器地址以及会话资源参数;The receiving unit 1001 is configured to receive the WebRTC connection request sent by the WebRTC server and the telecommunications account information of the called terminal. The telecommunications account information of the called terminal is obtained by the WebRTC server according to the call request sent by the calling terminal, and the WebRTC connection request is obtained by the WebRTC server. Generated according to the call request in the form of Web signaling sent by the calling terminal, including the WebRTC server address and session resource parameters;
发送单元1002,用于向被叫终端发送接收单元接收的WebRTC连接请求,以使被叫终端连接到WebRTC服务器中的会话资源,从而建立主叫终端与被叫终端的连接,其中被叫终端到会话资源的连接是被叫终端根据WebRTC连接请求发起的,会话资源是WebRTC服务器根据呼叫请求中携带的主叫终端信息、主叫路由信息、呼叫类型信息,在WebRTC服务器上为主叫终端与被叫终端连接分配的。The sending unit 1002 is configured to send the WebRTC connection request received by the receiving unit to the called terminal, so that the called terminal connects to the session resource in the WebRTC server, thereby establishing a connection between the calling terminal and the called terminal, wherein the called terminal arrives at The connection of the session resource is initiated by the called terminal according to the WebRTC connection request. The session resource is created by the WebRTC server between the calling terminal and the called terminal on the WebRTC server according to the calling terminal information, calling routing information, and call type information carried in the call request. Called terminal connection allocation.
在本发明的一些实施例中,WebRTC连接请求可以包括代表WebRTC服务器地址以及会话资源参数的统一资源定位符URL地址。In some embodiments of the present invention, the WebRTC connection request may include a Uniform Resource Locator URL address representing a WebRTC server address and session resource parameters.
在本发明的一些实施例中,本发明实施例中电信网关还可以包括:In some embodiments of the present invention, the telecommunications gateway in the embodiment of the present invention may also include:
编码单元,用于将URL地址编码为电话号码;An encoding unit for encoding a URL address into a phone number;
发送单元可以具体用于:向被叫终端发送编码单元编码的包括电话号码的WebRTC连接请求。The sending unit may be specifically configured to: send the WebRTC connection request encoded by the encoding unit and including the phone number to the called terminal.
在本发明的一些实施例中,本发明实施例中电信网关还可以包括:In some embodiments of the present invention, the telecommunications gateway in the embodiment of the present invention may also include:
代理单元,用于在被叫终端选择通过电信网络完成WebRTC通信时,建立与被叫终端的连接,并根据WebRTC连接请求连接到WebRTC服务器中的会话资源,以使被叫终端连接到WebRTC服务器中的会话资源;The proxy unit is used to establish a connection with the called terminal when the called terminal chooses to complete WebRTC communication through the telecommunications network, and connect to the session resource in the WebRTC server according to the WebRTC connection request, so that the called terminal connects to the WebRTC server session resource;
初始化单元,用于接收WebRTC服务器发送的主叫终端的WebRTC初始化信息并发送给被叫终端,接收被叫终端的WebRTC初始化信息并通过WebRTC服务器发送给主叫终端;The initialization unit is used to receive the WebRTC initialization information of the calling terminal sent by the WebRTC server and send it to the called terminal, receive the WebRTC initialization information of the called terminal and send it to the calling terminal through the WebRTC server;
代理单元,还可以用于对主叫终端与被叫终端之间发送的数据进行协议转换,以使主叫终端与被叫终端根据WebRTC初始化信息完成WebRTC通信。The proxy unit can also be used to perform protocol conversion on the data sent between the calling terminal and the called terminal, so that the calling terminal and the called terminal complete the WebRTC communication according to the WebRTC initialization information.
参见图11所示,是本发明实施例中终端实施例的示意图,该终端可以为被叫终端,可以包括:Referring to FIG. 11 , it is a schematic diagram of a terminal embodiment in an embodiment of the present invention. The terminal may be a called terminal, and may include:
接收单元1101,用于接收电信网关发送的WebRTC连接请求;WebRTC连接请求是WebRTC服务器根据主叫终端发送的Web信令形式的呼叫请求生成并发送给电信网关的,包括WebRTC服务器地址以及会话资源参数;The receiving unit 1101 is used to receive the WebRTC connection request sent by the telecommunications gateway; the WebRTC connection request is generated by the WebRTC server according to the call request in the form of Web signaling sent by the calling terminal and sent to the telecommunications gateway, including the WebRTC server address and session resource parameters ;
连接单元1102,用于根据接收单元接收的WebRTC连接请求连接到WebRTC服务器中的会话资源,建立与主叫终端的连接;会话资源是WebRTC服务器根据主叫终端发送的呼叫请求为主叫终端与被叫终端分配的。The connection unit 1102 is used to connect to the session resource in the WebRTC server according to the WebRTC connection request received by the receiving unit, and establish a connection with the calling terminal; the session resource is the calling terminal and the called terminal according to the call request sent by the calling terminal. Called terminal distribution.
在本发明的一些实施例中,WebRTC连接请求可以包括统一资源定位符URL地址,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数,或者,WebRTC连接请求包括电话号码,电话号码是电信网关对URL地址编码获得的。In some embodiments of the present invention, the WebRTC connection request may include a Uniform Resource Locator URL address, and the URL address represents the WebRTC server address and the session resource parameters of the session resource, or the WebRTC connection request includes a phone number, and the phone number is the communication gateway pair Obtained by URL address encoding.
在本发明的一些实施例中,本发明实施例中终端还可以包括:In some embodiments of the present invention, the terminal in the embodiment of the present invention may also include:
解码单元,用于当WebRTC连接请求包括电话号码,对电话号码进行解码,获得包括URL地址的WebRTC连接请求,URL地址代表WebRTC服务器地址以及会话资源的会话资源参数。The decoding unit is used to decode the phone number when the WebRTC connection request includes a phone number, and obtain the WebRTC connection request including a URL address, where the URL address represents the WebRTC server address and session resource parameters of the session resource.
在本发明的一些实施例中,连接单元可以具体用于:In some embodiments of the present invention, the connection unit can be specifically used for:
选择通过WebRTC连接时,打开接收单元接收的或解码单元解码的URL地址,连接到WebRTC服务器中的会话资源,建立与主叫终端的连接。When choosing to connect via WebRTC, open the URL address received by the receiving unit or decoded by the decoding unit, connect to the session resource in the WebRTC server, and establish a connection with the calling terminal.
在本发明的一些实施例中,连接单元可以具体用于:In some embodiments of the present invention, the connection unit can be specifically used for:
选择通过电信网络建立连接时,建立与电信网关的连接,以使电信网关根据WebRTC连接请求连接到WebRTC服务器中的会话资源;通过电信网关,建立与主叫终端的连接。When choosing to establish a connection through the telecommunication network, establish a connection with the telecommunication gateway, so that the telecommunication gateway can connect to the session resource in the WebRTC server according to the WebRTC connection request; through the telecommunication gateway, establish a connection with the calling terminal.
在本发明的一些实施例中,本发明实施例中终端还可以包括:In some embodiments of the present invention, the terminal in the embodiment of the present invention may also include:
初始化单元,用于选择通过WebRTC建立连接时,向WebRTC服务器发送WebRTC初始化信息,接收WebRTC服务器发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信;或者,选择通过电信网络建立连接时,向电信网关发送WebRTC初始化信息,接收电信网关发送的主叫终端的WebRTC初始化信息,与主叫终端完成WebRTC通信。The initialization unit is used to send WebRTC initialization information to the WebRTC server when establishing a connection through WebRTC, receive the WebRTC initialization information of the calling terminal sent by the WebRTC server, and complete the WebRTC communication with the calling terminal; or, when choosing to establish a connection through a telecommunications network , sending WebRTC initialization information to the telecommunications gateway, receiving the WebRTC initialization information of the calling terminal sent by the telecommunications gateway, and completing WebRTC communication with the calling terminal.
进一步地,本发明实施例还分别提供了WebRTC服务器、电信网关和终端的硬件构成。可包括至少一个处理器(例如CPU),至少一个网络接口或者其他通信接口,存储器,和至少一个通信总线,用于实现这些装置之间的连接通信。处理器用于执行存储器中存储的可执行模块,例如计算机程序。存储器可能包含高速随机存取存储器(RAM:Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个网络接口(可以是有线或者无线)实现该系统网关与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。Furthermore, the embodiment of the present invention also provides hardware configurations of the WebRTC server, the telecommunication gateway and the terminal respectively. It may include at least one processor (such as a CPU), at least one network interface or other communication interface, memory, and at least one communication bus for realizing connection and communication between these devices. The processor is used to execute executable modules, such as computer programs, stored in the memory. The memory may include high-speed random access memory (RAM: Random Access Memory), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system gateway and at least one other network element is realized through at least one network interface (which may be wired or wireless), and the Internet, wide area network, local network, metropolitan area network, etc. can be used.
对于WebRTC服务器来说,参见图12所示,在一些实施方式中,存储器中存储了程序指令,程序指令可以被处理器执行,其中,程序指令可包括接收单元901、建立单元902、生成单元903、发送单元904、连接单元905,或者程序指令还可以包括初始化单元。各单元的具体实现可参见图9所揭示的相应单元,这里不再赘述。For the WebRTC server, as shown in FIG. 12 , in some implementations, program instructions are stored in the memory, and the program instructions can be executed by the processor, wherein the program instructions can include a receiving unit 901, a building unit 902, and a generating unit 903 , the sending unit 904, the connecting unit 905, or the program instructions may further include an initialization unit. For the specific implementation of each unit, reference may be made to the corresponding units disclosed in FIG. 9 , which will not be repeated here.
对于电信网关来说,参见图13所示,在一些实施方式中,存储器中存储了程序指令,程序指令可以被处理器执行,其中,程序指令可包括接收单元1001、发送单元1002,或者程序指令还可以包括编码单元、代理单元、初始化单元。各单元的具体实现可参见图10所揭示的相应单元,这里不再赘述。For the telecommunications gateway, as shown in FIG. 13 , in some implementations, program instructions are stored in the memory, and the program instructions can be executed by the processor, wherein the program instructions can include a receiving unit 1001, a sending unit 1002, or a program instruction It may also include an encoding unit, a proxy unit, and an initialization unit. For the specific implementation of each unit, reference may be made to the corresponding units disclosed in FIG. 10 , which will not be repeated here.
对于终端来说,参见图14所示,在一些实施方式中,存储器中存储了程序指令,程序指令可以被处理器执行,其中,程序指令可包括接收单元1101、连接单元1102,或者程序指令还可以包括解码单元、初始化单元。各单元的具体实现可参见图11所揭示的相应单元,这里不再赘述。For the terminal, referring to FIG. 14 , in some implementations, program instructions are stored in the memory, and the program instructions can be executed by the processor, where the program instructions can include a receiving unit 1101, a connection unit 1102, or the program instructions can also It may include a decoding unit and an initialization unit. For the specific implementation of each unit, reference may be made to the corresponding units disclosed in FIG. 11 , which will not be repeated here.
需要说明的是,本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统或装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。It should be noted that each embodiment in this specification is described in a progressive manner, each embodiment focuses on the differences from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for relevant details, please refer to the description of the method part.
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this article, relational terms such as first and second etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations Any such actual relationship or order exists between. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310279433.0ACN104283760B (en) | 2013-07-04 | 2013-07-04 | A kind of WebRTC communication means, relevant device and system |
| PCT/CN2014/079869WO2015000356A1 (en) | 2013-07-04 | 2014-06-13 | Webrtc communication method, related device and system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310279433.0ACN104283760B (en) | 2013-07-04 | 2013-07-04 | A kind of WebRTC communication means, relevant device and system |
| Publication Number | Publication Date |
|---|---|
| CN104283760Atrue CN104283760A (en) | 2015-01-14 |
| CN104283760B CN104283760B (en) | 2018-05-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310279433.0AActiveCN104283760B (en) | 2013-07-04 | 2013-07-04 | A kind of WebRTC communication means, relevant device and system |
| Country | Link |
|---|---|
| CN (1) | CN104283760B (en) |
| WO (1) | WO2015000356A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105516176A (en)* | 2015-12-25 | 2016-04-20 | 北京京东尚科信息技术有限公司 | Call center system, communication connection method and device of call center system |
| CN105516112A (en)* | 2015-12-01 | 2016-04-20 | 深圳联友科技有限公司 | Method and system for realizing voice call through browser based on WebRTC (Web Real-Time Communication) |
| CN105991570A (en)* | 2015-02-09 | 2016-10-05 | 中国移动通信集团公司 | VoLTE (Voice over Long Term Evolution) service processing method, device and system |
| CN106161571A (en)* | 2015-04-27 | 2016-11-23 | Tcl集团股份有限公司 | The remote operation method of a kind of sing on web RTC and system |
| CN106851037A (en)* | 2016-11-28 | 2017-06-13 | 深圳市潮流网络技术有限公司 | The method for routing and system of a kind of WebRTC calls |
| CN106850399A (en)* | 2016-12-30 | 2017-06-13 | 深圳市潮流网络技术有限公司 | A kind of communication means based on WebRTC technology instant messages |
| CN107172719A (en)* | 2017-06-27 | 2017-09-15 | 青岛海信移动通信技术股份有限公司 | The method for setting up communication connection |
| CN109688364A (en)* | 2018-08-21 | 2019-04-26 | 平安科技(深圳)有限公司 | Video-meeting method, device, server and storage medium |
| CN111083295A (en)* | 2019-12-31 | 2020-04-28 | 北京讯鸟软件有限公司 | Telephone communication method and equipment based on browser |
| CN112104649A (en)* | 2020-09-15 | 2020-12-18 | 百度在线网络技术(北京)有限公司 | Multimedia interaction method and device, electronic equipment, server and storage medium |
| CN113630424A (en)* | 2021-09-15 | 2021-11-09 | 上海哔哩哔哩科技有限公司 | WebRTC communication method and system |
| CN113905023A (en)* | 2021-08-25 | 2022-01-07 | 北京房江湖科技有限公司 | Outbound system and method based on webpage instant messaging technology |
| WO2022033278A1 (en)* | 2020-08-11 | 2022-02-17 | 华为技术有限公司 | Ims data channel-based communication method and device |
| CN114285829A (en)* | 2021-12-14 | 2022-04-05 | 上海哔哩哔哩科技有限公司 | WebRTC (Web real-time communication) connection method and system |
| CN115622981B (en)* | 2022-10-21 | 2023-11-10 | 南京北路智控科技股份有限公司 | WebRTC communication method, device, equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104994116A (en)* | 2015-08-06 | 2015-10-21 | 北京奇艺世纪科技有限公司 | Method, device and system for multi-screen unified communication |
| US10686618B2 (en)* | 2017-08-13 | 2020-06-16 | Carbyne Ltd. | Method for streaming real-time data from a user device to a dispatch unit terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101668032A (en)* | 2008-09-05 | 2010-03-10 | 华为技术有限公司 | Method, system and equipment for WEB service communication |
| CN102299967A (en)* | 2011-09-08 | 2011-12-28 | 中兴通讯股份有限公司 | Mobile position system, gateway, mobile terminal and method for realizing mobile position |
| CN102347950A (en)* | 2011-09-29 | 2012-02-08 | 中兴通讯股份有限公司 | Method and system for telecommunication network to provide session services for internet |
| WO2012123001A1 (en)* | 2011-03-16 | 2012-09-20 | Siemens Enterprise Communications Gmbh & Co. Kg | Method for setting up a communication link |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102088460B (en)* | 2010-12-29 | 2013-07-17 | 北京新媒传信科技有限公司 | Method, device and system for transmitting streaming media data in restricted networks |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101668032A (en)* | 2008-09-05 | 2010-03-10 | 华为技术有限公司 | Method, system and equipment for WEB service communication |
| WO2012123001A1 (en)* | 2011-03-16 | 2012-09-20 | Siemens Enterprise Communications Gmbh & Co. Kg | Method for setting up a communication link |
| CN102299967A (en)* | 2011-09-08 | 2011-12-28 | 中兴通讯股份有限公司 | Mobile position system, gateway, mobile terminal and method for realizing mobile position |
| CN102347950A (en)* | 2011-09-29 | 2012-02-08 | 中兴通讯股份有限公司 | Method and system for telecommunication network to provide session services for internet |
| Title |
|---|
| 乐利等: "RTCWeb及其与IMS的融合研究", 《电信科学》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105991570A (en)* | 2015-02-09 | 2016-10-05 | 中国移动通信集团公司 | VoLTE (Voice over Long Term Evolution) service processing method, device and system |
| CN106161571A (en)* | 2015-04-27 | 2016-11-23 | Tcl集团股份有限公司 | The remote operation method of a kind of sing on web RTC and system |
| CN106161571B (en)* | 2015-04-27 | 2021-01-12 | Tcl科技集团股份有限公司 | WebRTC-based remote operation method and system |
| CN105516112A (en)* | 2015-12-01 | 2016-04-20 | 深圳联友科技有限公司 | Method and system for realizing voice call through browser based on WebRTC (Web Real-Time Communication) |
| CN105516176A (en)* | 2015-12-25 | 2016-04-20 | 北京京东尚科信息技术有限公司 | Call center system, communication connection method and device of call center system |
| CN105516176B (en)* | 2015-12-25 | 2018-09-14 | 北京京东尚科信息技术有限公司 | A kind of call center system and its communication connecting method and device |
| CN106851037A (en)* | 2016-11-28 | 2017-06-13 | 深圳市潮流网络技术有限公司 | The method for routing and system of a kind of WebRTC calls |
| CN106851037B (en)* | 2016-11-28 | 2021-05-18 | 深圳市潮流网络技术有限公司 | WebRTC call routing method and system |
| CN106850399A (en)* | 2016-12-30 | 2017-06-13 | 深圳市潮流网络技术有限公司 | A kind of communication means based on WebRTC technology instant messages |
| CN106850399B (en)* | 2016-12-30 | 2022-04-26 | 深圳市潮流网络技术有限公司 | Communication method based on WebRTC technology instant message |
| CN107172719B (en)* | 2017-06-27 | 2020-06-09 | 青岛海信移动通信技术股份有限公司 | Method for establishing a communication connection |
| CN107172719A (en)* | 2017-06-27 | 2017-09-15 | 青岛海信移动通信技术股份有限公司 | The method for setting up communication connection |
| CN109688364A (en)* | 2018-08-21 | 2019-04-26 | 平安科技(深圳)有限公司 | Video-meeting method, device, server and storage medium |
| CN111083295A (en)* | 2019-12-31 | 2020-04-28 | 北京讯鸟软件有限公司 | Telephone communication method and equipment based on browser |
| WO2022033278A1 (en)* | 2020-08-11 | 2022-02-17 | 华为技术有限公司 | Ims data channel-based communication method and device |
| CN112104649A (en)* | 2020-09-15 | 2020-12-18 | 百度在线网络技术(北京)有限公司 | Multimedia interaction method and device, electronic equipment, server and storage medium |
| CN113905023A (en)* | 2021-08-25 | 2022-01-07 | 北京房江湖科技有限公司 | Outbound system and method based on webpage instant messaging technology |
| CN113905023B (en)* | 2021-08-25 | 2024-02-27 | 贝壳找房(北京)科技有限公司 | Outbound system and method based on webpage instant messaging technology |
| CN113630424A (en)* | 2021-09-15 | 2021-11-09 | 上海哔哩哔哩科技有限公司 | WebRTC communication method and system |
| WO2023040380A1 (en)* | 2021-09-15 | 2023-03-23 | 上海哔哩哔哩科技有限公司 | Webrtc communication method and system |
| CN113630424B (en)* | 2021-09-15 | 2023-04-28 | 上海哔哩哔哩科技有限公司 | WebRTC communication method and system |
| CN114285829A (en)* | 2021-12-14 | 2022-04-05 | 上海哔哩哔哩科技有限公司 | WebRTC (Web real-time communication) connection method and system |
| CN115622981B (en)* | 2022-10-21 | 2023-11-10 | 南京北路智控科技股份有限公司 | WebRTC communication method, device, equipment and storage medium |
| Publication number | Publication date |
|---|---|
| WO2015000356A1 (en) | 2015-01-08 |
| CN104283760B (en) | 2018-05-04 |
| Publication | Publication Date | Title |
|---|---|---|
| CN104283760B (en) | A kind of WebRTC communication means, relevant device and system | |
| US10819757B2 (en) | System and method for real-time communication by using a client application communication protocol | |
| US10536490B2 (en) | Apparatus and method for communications involving a legacy device | |
| US10250646B2 (en) | Method and device for establishing channel | |
| TWI357749B (en) | ||
| CN102308560B (en) | Transmission method and device of media stream data in cloud calculative system | |
| CN102546559B (en) | The method, apparatus and system of end-to-end transmission data in limited network | |
| CN103297445B (en) | A kind of web terminal communication method and system based on IP multi-media networks | |
| CN109495599B (en) | Data transmission method and system, electronic device and computer-readable storage medium | |
| US20130035079A1 (en) | Method and system for establishing data commuication channels | |
| US20230291706A1 (en) | Method for accessing network, media gateway, electronic device and storage medium | |
| CN106464697A (en) | Method for establishing a communication connection which is suitable for transmitting media streams between a first RTC client and a second RTC client | |
| WO2013127163A1 (en) | Call terminal enrollment method and device | |
| CN101668032B (en) | Method, system and equipment for WEB service communication | |
| KR20160026631A (en) | Hybrid cloud media architecture for media communications | |
| CN108306986A (en) | Polymorphic type media data network address commutation traversing method, terminal and system | |
| JP2010516131A (en) | Method for discovering a telephone-based web server, and electronic equipment and computer program related to the method | |
| CN104052732B (en) | Method and system for managing identity provider identifiers for web real-time communication interaction flows | |
| WO2012052707A1 (en) | Data communication | |
| JP5775034B2 (en) | Communication destination solving apparatus, gateway apparatus, communication destination solving method, and program | |
| CN102130917B (en) | Methods for registering session initiation protocol (SIP) terminal and processing service and related equipment | |
| CN102474427B (en) | A method and system for reversing the direction of the flow of a call | |
| CN103997491A (en) | Quantum secret communication telephone subscriber terminal extension gateway system | |
| CN101383881B (en) | Speech and webpage transmitting cooperation method, apparatus and system | |
| CN118158202A (en) | SIP session processing method, device, system, medium and program product |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right | Effective date of registration:20201021 Address after:No.8, Xiaoping Avenue, Badu Economic Development Zone, Zhenze Town, Wujiang District, Suzhou City, Jiangsu Province Patentee after:TONGDING INTERCONNECTION INFORMATION Co.,Ltd. Address before:625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District Patentee before:SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd. Effective date of registration:20201021 Address after:625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District Patentee after:SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd. Address before:518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before:HUAWEI TECHNOLOGIES Co.,Ltd. |