JP5169921B2 - Communication system, SIP server, SIP terminal, and security communication method - Google Patents

Communication system, SIP server, SIP terminal, and security communication method Download PDF

Info

Publication number
JP5169921B2
JP5169921B2 JP2009054436A JP2009054436A JP5169921B2 JP 5169921 B2 JP5169921 B2 JP 5169921B2 JP 2009054436 A JP2009054436 A JP 2009054436A JP 2009054436 A JP2009054436 A JP 2009054436A JP 5169921 B2 JP5169921 B2 JP 5169921B2
Authority
JP
Japan
Prior art keywords
sip
server
tls
terminal
terminals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009054436A
Other languages
Japanese (ja)
Other versions
JP2010212825A (en
Inventor
貴司 水上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2009054436A priority Critical patent/JP5169921B2/en
Publication of JP2010212825A publication Critical patent/JP2010212825A/en
Application granted granted Critical
Publication of JP5169921B2 publication Critical patent/JP5169921B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、IETF RFC3261で定義されているSIP(Session Initiation Protocol)を利用して通信を行う、通信システム、SIPサーバ、SIP端末、及びセキュリティ通信方法に関する。   The present invention relates to a communication system, a SIP server, a SIP terminal, and a security communication method for performing communication using SIP (Session Initiation Protocol) defined in IETF RFC3261.

例えば、図7に示す通信システム100において、IPネットワーク103を経由したSIPサーバ101とSIP端末102A〜102N(以下、断りのない限り単にSIP端末102という)との間の通信は、IETF RFC2246で定義されるTLS(Transport Layer Security)上でSIP通信を行う場合に適用できる。SIPについては非特許文献1に詳述されている。   For example, in the communication system 100 shown in FIG. 7, communication between the SIP server 101 and the SIP terminals 102A to 102N (hereinafter, simply referred to as the SIP terminal 102 unless otherwise specified) via the IP network 103 is defined by IETF RFC2246. It can be applied to the case where SIP communication is performed on TLS (Transport Layer Security). SIP is described in detail in Non-Patent Document 1.

図7において、SIPサーバ101は、RFC3261で定義されるプロキシサーバとレジストラサーバとの双方の機能を有している。
SIP端末102は、SIP端末102自身のIPアドレスや使用するポート番号をRFC3261で定義されるレジストラ(REGISTER)メッセージとしてSIPサーバ101に送信する。SIPサーバ101は、REGISTERメッセージを受信するとレジストラサーバとして振る舞い、REGISTERメッセージからSIP端末102のIPアドレスやポート番号を認識する。
In FIG. 7, the SIP server 101 has both functions of a proxy server and a registrar server defined by RFC3261.
The SIP terminal 102 transmits the IP address of the SIP terminal 102 itself and the port number to be used to the SIP server 101 as a registrar message defined by RFC3261. When the SIP server 101 receives the REGISTER message, the SIP server 101 behaves as a registrar server and recognizes the IP address and port number of the SIP terminal 102 from the REGISTER message.

また、SIP端末102は、他のSIP102端末と通信を行うために、RFC3261で定義されるINVITEメッセージをSIPサーバ101へ送信する。
SIPサーバ101は、INVITEメッセージを受信するとプロキシサーバとして振る舞い、INVITEメッセージに含まれるRequest−URIから、着信先のSIP端末102を決定し、INVITEメッセージを転送する。
Also, the SIP terminal 102 transmits an INVITE message defined by RFC3261 to the SIP server 101 in order to communicate with other SIP 102 terminals.
When receiving the INVITE message, the SIP server 101 behaves as a proxy server, determines the destination SIP terminal 102 from the Request-URI included in the INVITE message, and transfers the INVITE message.

前記したようにSIP端末102間の通信を実現するが、SIPサーバ101とSIP端末102との間のSIP通信をセキュリティ面で保護する観点から、SIPサーバ101とSIP端末102との間のSIP通信はTLS上で行うものとする。TLSについては、非特許文献2に詳述されている。   As described above, the communication between the SIP terminals 102 is realized. From the viewpoint of protecting the SIP communication between the SIP server 101 and the SIP terminal 102 in terms of security, the SIP communication between the SIP server 101 and the SIP terminal 102 is performed. Shall be performed on TLS. TLS is described in detail in Non-Patent Document 2.

ところで、非特許文献1には、TLSを利用したSIP端末・SIPサーバ間の通信に関する記述として、プロキシサーバ・リダイレクトサーバ・レジストラサーバは、TLSを実装しなければならず、さらに1方向・双方向の認証を両方ともサポートしなければならないとあり、また、UA(User Agent:図10のIP端末102に相当)は、TLSを最初に接続してTLSクライアントとして振る舞うことが強く推奨されるとある。なお、UAはTLSサーバとして振る舞う機能を持ってもよい。   By the way, in Non-Patent Document 1, as a description regarding communication between SIP terminals and SIP servers using TLS, the proxy server, the redirect server, and the registrar server must implement TLS, and further, unidirectional / bidirectional It is strongly recommended that UA (User Agent: equivalent to IP terminal 102 in FIG. 10) be connected to TLS first and behave as a TLS client. . Note that the UA may have a function of acting as a TLS server.

前記したように、RFC3261では、SIP端末102がTLSクライアントになることを強く推奨している。その理由を以下に説明する。
すなわち、RFC3261では、TLSの暗号化スイートとして、公開鍵暗号方式の一つであるRSA(Rivest Shamir Adleman)方式を利用した暗号化スイートTLS-RSA-WITH-AES-128-CBC-SHAを最低限サポートすることになっている。
As described above, RFC 3261 strongly recommends that the SIP terminal 102 be a TLS client. The reason will be described below.
That is, in RFC3261, a cipher suite TLS-RSA-WITH-AES-128-CBC-SHA using the RSA (Rivest Shamir Adleman) method, which is one of public key cryptosystems, is a minimum TLS cipher suite. Is supposed to support.

RSAを用いた暗号化スイートの場合、TCP(Transmission Control Protocol)と異なり、TLSサーバとして振る舞うにためには、公開鍵を含むサーバ証明書と秘密鍵とが必要になる。そのため、SIP端末102がTLSサーバとして振る舞うには、全SIP端末102にサーバ証明書と秘密鍵とを配置することが必要となるが、SIP端末102は、一般にIP電話端末として膨大な数になるため、全SIP端末102にサーバ証明書と秘密鍵を発行するのは現実的ではない。   In the case of an encryption suite using RSA, unlike TCP (Transmission Control Protocol), a server certificate including a public key and a private key are required to behave as a TLS server. Therefore, in order for the SIP terminal 102 to behave as a TLS server, it is necessary to place a server certificate and a private key in all the SIP terminals 102, but the SIP terminal 102 is generally an enormous number as an IP telephone terminal. Therefore, it is not realistic to issue a server certificate and a private key to all SIP terminals 102.

そのため、サーバ証明書と秘密鍵とは、SIPサーバ101等の数が限られるサーバにのみ配置するモデルがRFC3261に記述されている。
IETF draft−ietf−sip−sips−09に関しても、例えば、3.1項にSIPでTLSを利用するモデルが記述されている。draft−ietf−sip−sips−90の3.1.2項には、UA(=SIP端末102)がTLSサーバとなる場合、サーバ証明書をUAに配置することになり、非現実的である旨が記述されている。
For this reason, RFC 3261 describes a model in which the server certificate and the private key are arranged only in a server with a limited number of SIP servers 101 and the like.
As for IETF draft-ietf-sip-sips-09, for example, a model using TLS in SIP is described in section 3.1. In section 3.1.2 of draft-ietf-sip-sips-90, when the UA (= SIP terminal 102) is a TLS server, a server certificate is placed in the UA, which is unrealistic. The effect is described.

以上説明のように、サーバ証明書と秘密鍵は、装置数が限られるサーバにのみ配置するモデルが一般的である。
なお、SIP端末102がTLSサーバとして振る舞わず、TLSクライアントとしてのみ振る舞う場合、SIPサーバ101からSIP端末102へのTLS接続要求を行えない。例えば、SIP端末102AがSIP端末102Bと通信を行う場合、発側となるSIP端末102AからSIPサーバ101へINVITEメッセージが送信され、SIPサーバ101が着側となるSIP端末102BへINVITEメッセージを転送させる。
As described above, a model in which the server certificate and the private key are arranged only on a server with a limited number of devices is common.
Note that if the SIP terminal 102 does not act as a TLS server but only acts as a TLS client, a TLS connection request from the SIP server 101 to the SIP terminal 102 cannot be made. For example, when the SIP terminal 102A communicates with the SIP terminal 102B, an INVITE message is transmitted from the originating SIP terminal 102A to the SIP server 101, and the SIP server 101 transfers the INVITE message to the terminating SIP terminal 102B. .

このとき、SIPサーバ101が着側SIP端末102BへINVITEを転送させるためには、SIP端末102BからSIPサーバ101へTLSセッションをあらかじめ接続しておく必要がある。そのため、RFC3261 26.3.2.1項で、SIP端末102がSIPサーバ101へREGISTERを送信した後、図8のレジストレーション処理の動作シーケンス図に示されるように、SIP端末102と、SIPサーバ101との間でTLSセッションをオープンしたままとする仕様になっている。   At this time, in order for the SIP server 101 to transfer INVITE to the destination SIP terminal 102B, it is necessary to connect a TLS session from the SIP terminal 102B to the SIP server 101 in advance. Therefore, after the SIP terminal 102 transmits REGISTER to the SIP server 101 in RFC 3261 26.3.2.1, as shown in the operation sequence diagram of the registration process in FIG. 8, the SIP terminal 102 and the SIP server The specification is such that the TLS session is kept open with 101.

図8には、RFC3261に基づいた、SIPサーバ101と、着側のSIP端末102のレジストレーションからSIP端末間の通信確立に至るまでのSIP信号の流れが示されている。
以下、図8のRFC3261におけるSIPサーバ101のレジストレーション処理の流れについて簡単に説明する。
FIG. 8 shows the flow of a SIP signal from registration of the SIP server 101 and the called SIP terminal 102 to communication establishment between the SIP terminals based on RFC3261.
The flow of registration processing of the SIP server 101 in RFC 3261 in FIG. 8 will be briefly described below.

図8において、SIP端末102は、まず、SIPサーバ101に対してTCP接続を行う。処理(P81)は、TCP接続処理(スリーウェイハンドシェイク)である。TCP接続が完了すると、処理(P82)に示されように、TLSセッションを確立するため、SIP端末102は、SIPサーバ101へTLSハンドシェイクを実行する。
このTLSハンドシェイクは、処理(P81)で確立したTCPコネクション上で行う。TLSハンドシェイクが完了すると、処理(P83)に示されるように、SIP端末102は、RFC3261の10項に示すとおりSIPサーバ101へREGISTER信号を送信してレジストレーション処理を実行する。
In FIG. 8, the SIP terminal 102 first establishes a TCP connection with the SIP server 101. The process (P81) is a TCP connection process (three-way handshake). When the TCP connection is completed, the SIP terminal 102 performs a TLS handshake to the SIP server 101 in order to establish a TLS session as shown in the process (P82).
This TLS handshake is performed on the TCP connection established in the process (P81). When the TLS handshake is completed, as shown in the process (P83), the SIP terminal 102 transmits a REGISTER signal to the SIP server 101 as shown in item 10 of RFC3261, and executes the registration process.

RFC3261のモデルでは、レジストレーション完了後、SIPサーバ101とSIP端末102との間のTLSセッションは切断せず、保持する方式になっている。これにより、処理(P84)のように、SIPサーバ101側からSIP端末102側へSIPリクエストを送信する場合、処理(P82)で確立したTLSセッションを利用することで、SIPサーバ101からSIP端末102の方向へリクエストを送信可能にしている。   In the RFC3261 model, after registration is completed, the TLS session between the SIP server 101 and the SIP terminal 102 is not disconnected and held. Thus, when a SIP request is transmitted from the SIP server 101 side to the SIP terminal 102 side as in the process (P84), the SIP server 102 is connected to the SIP terminal 102 by using the TLS session established in the process (P82). Requests can be sent in the direction of.

IETF RFC3261 「IETFドラフト:draft−ietf−sip−sips−09」 <インターネットURL>http://www.ietf.org/ /internet−drafts/draft−ietf−sip−sips−09.txt (2009−2−22日閲覧)IETF RFC3261 "IETF draft: draft-ietf-sip-sip-09" <Internet URL> http: // www. ietf. org // internet-drafts / draft-ietf-sip-sips-09. txt (Browsing on 2009-2-22) IETF RFC2246 「The TLS Protocolv.1.0」 <インターネットURL>http://www.ietf.org/ric/ rfc2246.txt(2009−2−22日閲覧)IETF RFC2246 “The TLS Protocol.1.0” <Internet URL> http: // www. ietf. org / ric / rfc2246. txt (browsing on 2009-2-22)

前記したモデルの場合、RFC3261 26.4.3項で指摘されているように、SIPサーバ101が全SIP端末102とTLSセッションを確立し、保持することになり、SIPサーバ101のメモリ等のリソースを圧迫する問題がある。
一方、SIPサーバ101とSIP端末102との間でTLSセッションを保持せず、SIPリクエストを送信するときのみ動的にTLSセッションを確立させる場合、SIP端末102は、サーバ証明書を配置しないためTLSサーバにはなれず、SIPサーバ101からSIP端末102方向へのTLSセッション要求を送信できない問題がある。
In the case of the above-described model, as pointed out in RFC 3261 26.4.3, the SIP server 101 establishes and holds the TLS session with all the SIP terminals 102, and resources such as the memory of the SIP server 101 There is a problem of pressure.
On the other hand, when a TLS session is dynamically established only when a SIP request is transmitted without holding a TLS session between the SIP server 101 and the SIP terminal 102, the SIP terminal 102 does not place a server certificate. There is a problem that the TLS session request cannot be transmitted from the SIP server 101 toward the SIP terminal 102 without being a server.

本発明は前記した課題を解決するためになされたものであり、SIPサーバとSIP端末との間でTLSセッションを保持せず、SIPリクエストを送信するときのみ動的にTLSセッションを確立させることを実現し、このことにより、SIPサーバのリソース圧迫を回避し、かつ、SIPサーバからSIP端末へのTLSセッション要求を送信可能な、通信システム、SIPサーバ、SIP端末、及びセキュリティ通信方法を提供することを目的とする。   The present invention has been made to solve the above-described problem, and does not maintain a TLS session between a SIP server and a SIP terminal, and dynamically establishes a TLS session only when a SIP request is transmitted. To realize a communication system, a SIP server, a SIP terminal, and a security communication method that can realize a resource pressure of the SIP server and can transmit a TLS session request from the SIP server to the SIP terminal. With the goal.

前記目的を達成するために、本発明の通信システムは、SIPサーバと複数のSIP端末とがIPネットワーク経由で接続され、TLSを利用して通信を行う通信システムであって、前記SIPサーバが、あるSIP端末からのSIPリクエストを他のSIP端末へ送信する場合に、前記他のSIP端末にTCPコネクションを行い、前記他のSIP端末が前記SIPサーバとのTCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立するものである。 In order to achieve the above object, a communication system of the present invention is a communication system in which a SIP server and a plurality of SIP terminals are connected via an IP network and performs communication using TLS , wherein the SIP server includes: when sending a SIP request from one SIP terminal to other SIP terminals, it has rows TCP connection to the other SIP terminals, the other SIP terminals, TLS triggered by the establishment of a TCP connection with the SIP server by acting as a client, even the in which you dynamically establish a TLS session to the SIP server.

また、本発明のSIPサーバは、複数のSIP端末とはIPネットワーク経由で接続され、TLSを利用してあるSIP端末からのSIPリクエストを他のSIP端末へ送信するSIPサーバであって、前他のSIP端末にTCPコネクションを行い、前記他のSIP端末が、TCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立するものである。 Further, the SIP server of the present invention, the plurality of SIP terminals are connected via IP network, a SIP server sends a SIP request from the SIP terminal that is using TLS to other SIP terminals, before Symbol There rows TCP connections to other SIP terminals, the other SIP terminals, that operates as a TLS client in response to establishment of the TCP connection, in which dynamically establishes a TLS session to the SIP server.

また、本発明のSIP端末は、SIPサーバとはIPネットワーク経由で接続され、TLSを利用して通信を行うSIP端末であって、前記SIPサーバが、あるSIP端末からのSIPリクエストを他のSIP端末へ送信する場合に、前記他のSIP端末にTCPコネクションを行い、前記SIPサーバとの間のTCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立するものである。 The SIP terminal of the present invention is an SIP terminal that is connected to an SIP server via an IP network and performs communication using TLS, and the SIP server sends a SIP request from a certain SIP terminal to another SIP terminal. When transmitting to a terminal, a TCP connection is established with the other SIP terminal, and a TLS session is dynamically established with the SIP server by operating as a TLS client triggered by the establishment of a TCP connection with the SIP server. you establish is also of the.

また、本発明のセキュリティ通信方法は、SIPサーバと複数のSIP端末とが、IPネッワーク経由で接続され、TLSを利用して通信を行う通信システムにおけるセキュリティ通信方法であって、前記SIPサーバが、あるSIP端末からのSIPリクエストを他のSIP端末へ送信する場合に、前記他のSIP端末にTCPコネクションを行うステップと、前記他のSIP端末が前記SIPサーバとのTCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立するステップとを有するものである。 The security communication method of the present invention is a security communication method in a communication system in which a SIP server and a plurality of SIP terminals are connected via an IP network and perform communication using TLS , wherein the SIP server includes: when sending a SIP request from one SIP terminal to another SIP terminal, and performing a TCP connection to the other SIP terminals, the other SIP terminals, in response to establish a TCP connection with the SIP server by operating as TLS client, and has the steps of: establishing a dynamic TLS session to the SIP server.

本発明によれば、SIPサーバとSIP端末との間でTLSセッションを保持せず、SIPリクエストを送信するときのみ動的にTLSセッションを確立させることができる。これにより、SIPサーバのリソース圧迫を回避し、かつ、SIPサーバからSIP端末へのTLSセッション要求を送信することができる。   According to the present invention, a TLS session can be dynamically established only when a SIP request is transmitted without holding a TLS session between the SIP server and the SIP terminal. Thereby, resource pressure of the SIP server can be avoided and a TLS session request from the SIP server to the SIP terminal can be transmitted.

本発明の実施の形態に係る通信システムのシステム構成の一例を示す図である。It is a figure which shows an example of the system configuration | structure of the communication system which concerns on embodiment of this invention. 本発明の実施の形態に係る通信システムのレジストレーション処理の流れを示す動作シーケンス図である。It is an operation | movement sequence diagram which shows the flow of the registration process of the communication system which concerns on embodiment of this invention. 本発明の実施の形態に係る通信システムにおいて、SIPサーバからSIP端末へSIPリクエストを送信する場合の動作の流れを示す動作シーケンス図である。It is an operation | movement sequence diagram which shows the flow of operation | movement in the case of transmitting a SIP request from a SIP server to a SIP terminal in the communication system which concerns on embodiment of this invention. 本発明の実施の形態にSIPサーバとSIP端末の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a SIP server and a SIP terminal in embodiment of this invention. 本発明の実施の形態に係るSIPサーバ(SIPサーバ側コネクション管理部)の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the SIP server (SIP server side connection management part) which concerns on embodiment of this invention. 本発明の実施の形態に係るSIP端末(SIP端末側コネクション管理部)の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the SIP terminal (SIP terminal side connection management part) which concerns on embodiment of this invention. 従来の通信システムのシステム構成の一例を示す図である。It is a figure which shows an example of the system configuration | structure of the conventional communication system. 従来の通信システムにおけるIPサーバと着側のSIP端末との間のレジストレーションから通信確立に至るまでのSIP信号の流れを示す動作シーケンス図である。It is an operation | movement sequence diagram which shows the flow of the SIP signal from the registration between the IP server in the conventional communication system, and the SIP terminal of a callee side to communication establishment.

(通信システム1の構成)
図1は、本発明の実施の形態に係る通信システムのシステム構成の一例を示す図である。
図1に示されるように、本発明の実施の形態に係る通信システム1は、SIPサーバ11とSIP端末12A〜12NとがIPネッワーク13経由で接続される。
ここで、特徴的には、SIPサーバ11とSIP端末12A〜12Nとの間でTLSセッションを保持せず、SIPサーバ11がSIPリクエストを送信する場合にのみ動的にTLSセッションを確立させ、これにより、SIPサーバ11とSIP端末12A〜12Nとの間にTLS(証明書と秘密鍵の発行)の常駐を不要としたことにある。
(Configuration of communication system 1)
FIG. 1 is a diagram showing an example of a system configuration of a communication system according to an embodiment of the present invention.
As shown in FIG. 1, in a communication system 1 according to an embodiment of the present invention, a SIP server 11 and SIP terminals 12 </ b> A to 12 </ b> N are connected via an IP network 13.
Here, characteristically, the TLS session is not established between the SIP server 11 and the SIP terminals 12A to 12N, and the TLS session is dynamically established only when the SIP server 11 transmits the SIP request. Therefore, it is unnecessary to make TLS (issue of a certificate and a private key) resident between the SIP server 11 and the SIP terminals 12A to 12N.

このため、本発明の実施の形態に係る通信システム1によれば、SIPサーバ11からSIP端末12A〜12NへTCPで接続し、TCPの接続を検出したSIP端末12A〜12Nは、SIPサーバ11へTLS接続を行う。
なお、図1に示す本発明の実施の形態に係る通信システム1では、図7に示す従来の通信システム100との差異を明確にするため、SIPサーバ11とSIP端末12A〜12Nとの間にTLSが動的に保持される様子を動的TLS20として、また、従来の通信システム100では、SIPサーバ11とSIP端末12A〜12Nとの間にTLSが保持されている様子を常駐TLS30として、それぞれ模式的に示してある。
For this reason, according to the communication system 1 according to the embodiment of the present invention, the SIP terminals 12A to 12N that connect to the SIP terminals 12A to 12N from the SIP server 11 via TCP and detect the TCP connection are connected to the SIP server 11. Make a TLS connection.
In addition, in the communication system 1 according to the embodiment of the present invention shown in FIG. 1, in order to clarify the difference from the conventional communication system 100 shown in FIG. 7, between the SIP server 11 and the SIP terminals 12 </ b> A to 12 </ b> N. A state in which the TLS is dynamically held is referred to as a dynamic TLS 20, and in the conventional communication system 100, a state in which the TLS is held between the SIP server 11 and the SIP terminals 12A to 12N is referred to as a resident TLS 30. It is shown schematically.

(通信システム1の動作)
図2は、本発明の実施の形態に係る通信システム1の動作を示す動作シーケンス図であり、ここでは、SIPサーバ11とSIP端末12(12A〜12N)との間のRFC3261にしたがうレジストレーションの流れを示している。
(Operation of communication system 1)
FIG. 2 is an operation sequence diagram showing the operation of the communication system 1 according to the embodiment of the present invention. Here, the registration according to RFC 3261 between the SIP server 11 and the SIP terminals 12 (12A to 12N). The flow is shown.

図2において、SIP端末12は、まず、SIPサーバ11に対してTCPコネクションを行う(処理P21)。
TCP接続が完了すると、SIP端末12は、TLSセッションを確立するためにSIPサーバ11に対してTLSハンドシェイクを実行する(処理P22)。このTLSハンドシェイクは、処理P21で確立したTCPコネクション上で行う。TLSハンドシェイクが完了すると、SIP端末12は、RFC3261の10項に示すとおりSIPサーバ101へREGISTER信号を送信してレジストレーションを実行する(処理P23)。
In FIG. 2, the SIP terminal 12 first makes a TCP connection to the SIP server 11 (process P21).
When the TCP connection is completed, the SIP terminal 12 performs a TLS handshake with respect to the SIP server 11 in order to establish a TLS session (process P22). This TLS handshake is performed on the TCP connection established in process P21. When the TLS handshake is completed, the SIP terminal 12 transmits a REGISTER signal to the SIP server 101 as shown in item 10 of RFC3261, and executes registration (process P23).

処理P23でレジストレーションを実行するにあたり、SIP端末12は、REGISTERメッセージのContactヘッダにSIP端末12のIPアドレスと着信TLSポートのポート番号とを設定し、SIPサーバ11へ送信する。
SIPサーバは11、レジストレーションにおいて、200 OKを返却した直後、SIP端末情報管理部SIPサーバ11のTLSポート情報に、REGISTERメッセージのContactヘッダに設定されていた着信TLSポートのポート番号を登録する。レジストレーション完了後、SIPサーバ11とSIP端末12は、TLSセッションを切断し(P24)、さらにTCPコネクションも切断している(処理P25)。
In executing the registration in the process P23, the SIP terminal 12 sets the IP address of the SIP terminal 12 and the port number of the incoming TLS port in the Contact header of the REGISTER message, and transmits them to the SIP server 11.
The SIP server 11 registers the port number of the incoming TLS port set in the Contact header of the REGISTER message in the TLS port information of the SIP terminal information management unit SIP server 11 immediately after returning 200 OK in the registration. After the registration is completed, the SIP server 11 and the SIP terminal 12 disconnect the TLS session (P24) and further disconnect the TCP connection (process P25).

図3は、本発明の実施の形態に係る通信システムの動作を示す動作シーケンス図であり、SIPサーバ11からSIP端末12へSIPリクエストを送信する際の処理の流れが示されている。   FIG. 3 is an operation sequence diagram showing the operation of the communication system according to the embodiment of the present invention, and shows the flow of processing when a SIP request is transmitted from the SIP server 11 to the SIP terminal 12.

ここでは、SIPサーバ11とSIP端末12との間のTLSセッションが存在しないため、SIPサーバ11は、まずSIP端末12へTCP接続を要求してTCPコネクションを確立する(P31)。
SIPサーバ11はTCPコネクションが確立すると、SIP端末12からのTLS接続を待ち受け、SIPサーバ11からのTCPコネクションを検出したSIP端末12は、SIP端末12自身がTLSクライアントとして振る舞い、SIPサーバ11へTLS接続を行い、TLSセッションを確立する(P32)。SIPサーバはTLSセッション確立を検出すると、SIP端末に対してSIPリクエストを送信する(P33)。
Here, since there is no TLS session between the SIP server 11 and the SIP terminal 12, the SIP server 11 first requests the TCP connection to the SIP terminal 12 to establish a TCP connection (P31).
When the TCP connection is established, the SIP server 11 waits for a TLS connection from the SIP terminal 12, and the SIP terminal 12 that has detected the TCP connection from the SIP server 11 behaves as a TLS client, and sends a TLS to the SIP server 11. Connection is established and a TLS session is established (P32). When the SIP server detects the establishment of the TLS session, it transmits a SIP request to the SIP terminal (P33).

前記したように、本発明の実施の形態に係る通信システムによれば、SIP端末12は、TCPサーバとして振る舞い、SIPサーバ11からのTCPコネクションを検出すると、TLSクライアントとしてSIPサーバ11へアクセスする。一方、SIPサーバ11は、SIPリクエスト送信時TCPクライアントとして振る舞い、TCPコネクション確立後、SIP端末12からのTLS接続要求を待ち受けるTLSサーバとして振る舞う。
このことにより、SIPサーバ11とSIP端末12との間にTLSセッションを常駐させることなく、SIPサーバ11からSIP端末12へのリクエスト送信を実現することができる。
As described above, according to the communication system according to the embodiment of the present invention, the SIP terminal 12 behaves as a TCP server and, when detecting a TCP connection from the SIP server 11, accesses the SIP server 11 as a TLS client. On the other hand, the SIP server 11 behaves as a TCP client when a SIP request is transmitted, and behaves as a TLS server that waits for a TLS connection request from the SIP terminal 12 after the TCP connection is established.
As a result, it is possible to realize request transmission from the SIP server 11 to the SIP terminal 12 without making a TLS session resident between the SIP server 11 and the SIP terminal 12.

(SIPサーバ11の構成)
図4は、本発明の実施の形態に係る通信システム1を構成するSIPサーバ11とSIP端末12の内部構成を示すブロック図である。
図4に示すSIPサーバ11は、RFC3261のSIPレジストラとSIPプロキシを兼ねるものとする。SIPサーバ1は、サーバ側コネクション管理部110と、呼処理部111と、SIP端末情報管理部112と、を含む。
(Configuration of SIP server 11)
FIG. 4 is a block diagram showing an internal configuration of the SIP server 11 and the SIP terminal 12 constituting the communication system 1 according to the embodiment of the present invention.
It is assumed that the SIP server 11 shown in FIG. 4 also serves as an RFC 3261 SIP registrar and SIP proxy. The SIP server 1 includes a server-side connection management unit 110, a call processing unit 111, and a SIP terminal information management unit 112.

呼処理部111は、RFC3261に記述されるSIPレジストラ、SIPプロキシの機能を提供し、RFC3261のUAC(User Agent Client)、UAS(User Agent Server)として振る舞い、RFC3261 12項で定義されるSIPダイアログを管理する。呼処理部はまた、SIP端末12からのSIPメッセージを、サーバ側コネクション管理部110を経由して送受信する。
SIP端末情報管理部110は、SIP端末12へアクセスするために必要な情報として、端末URI(SIP端末12のSIP−URI)、着信TLSポート番号、TLS接続状態、SIPダイアログ状態を管理する。
The call processing unit 111 provides functions of a SIP registrar and a SIP proxy described in RFC3261, behaves as UAC (User Agent Client) and UAS (User Agent Server) of RFC3261, and performs SIP dialog defined in RFC3261 item 12. to manage. The call processing unit also transmits / receives the SIP message from the SIP terminal 12 via the server-side connection management unit 110.
The SIP terminal information management unit 110 manages a terminal URI (SIP-URI of the SIP terminal 12), an incoming TLS port number, a TLS connection state, and a SIP dialog state as information necessary for accessing the SIP terminal 12.

端末URI(Uniform Resource Identifier)とは、SIP端末12を識別するためのSIP−URIであり、SIP端末12のIPアドレスは、端末URIのホスト部(例えば、端末URIが、“sip:username@192.168.1.1”の場合、192.168.1.1がIPアドレス)に含まれるものとする。また、着信TLSポート番号は、SIPサーバ11がSIP端末12へTLS接続する場合に使用するポート番号である。
TLS接続状態は、SIPサーバ11−SIP端末12間でTLSセッションが確立されているか否かを示す状態であり、”接続中”もしくは”切断”状態がある。SIPダイアログ状態は、端末URIで識別されるSIP端末12と通信中のSIPダイアログが呼処理部111に存在するか否かを管理する。
The terminal URI (Uniform Resource Identifier) is a SIP-URI for identifying the SIP terminal 12, and the IP address of the SIP terminal 12 is the host part of the terminal URI (for example, the terminal URI is “sip: username @ 192”). .168.1.1 ", 192.168.1.1 is included in the IP address). The incoming TLS port number is a port number used when the SIP server 11 makes a TLS connection to the SIP terminal 12.
The TLS connection state is a state indicating whether a TLS session is established between the SIP server 11 and the SIP terminal 12, and includes a “connected” state and a “disconnected” state. The SIP dialog state manages whether or not a SIP dialog in communication with the SIP terminal 12 identified by the terminal URI exists in the call processing unit 111.

呼処理部111に端末URIで識別されるSIP端末12と通信中のSIPダイアログが存在すればSIPダイアログ状態は”通信中”、存在しなければSIPダイアログ状態は、”切断”となる。
サーバ側コネクション管理部110は、すべてのSIP端末12A〜12NとのTCPコネクション、TLSセッションの切断・接続を検出し、SIPメッセージをSIP端末12から受信すると、SIP端末情報管理部112の情報を更新するとともに、呼処理部111へSIPメッセージを転送し、SIPメッセージ送信要求を呼処理部111から受信すると、SIP端末情報管理部112の情報を更新するとともに、SIP端末12へメッセージを送信する機能を有する。
If there is a SIP dialog in communication with the SIP terminal 12 identified by the terminal URI in the call processing unit 111, the SIP dialog state is “in communication”, and if there is no SIP dialog state, the SIP dialog state is “disconnected”.
The server-side connection management unit 110 detects the disconnection / connection of the TCP connections and TLS sessions with all the SIP terminals 12A to 12N, and updates the information in the SIP terminal information management unit 112 when receiving the SIP message from the SIP terminal 12. In addition, when the SIP message is transferred to the call processing unit 111 and a SIP message transmission request is received from the call processing unit 111, the information of the SIP terminal information management unit 112 is updated and the message is transmitted to the SIP terminal 12. Have.

(SIP端末12の構成)
一方、SIP端末12は、端末側コネクション管理部120と、SIP処理部121と、自端末情報管理部122とを含む。
SIP処理部121は、RFC3261でのUAとしての機能を持ち、端末側コネクション管理部120を経由してSIPサーバ11とのSIPメッセージ送受信を行う。自端末情報管理部122は、TLS接続状態とSIPダイアログ状態とを保持する。TLSセッション状態は、SIPサーバ11と自SIP端末12のTLSセッションが確立されているか否かを示す状態であり、”接続中”もしくは”切断”状態がある。SIPダイアログ状態は、SIP処理部121にSIPサーバ11と通信中のダイアログが存在するか否かを示し、存在すれば”通信中”、存在しなければ”切断”となる。
(Configuration of SIP terminal 12)
On the other hand, the SIP terminal 12 includes a terminal-side connection management unit 120, a SIP processing unit 121, and a local terminal information management unit 122.
The SIP processing unit 121 has a function as UA in RFC3261, and performs SIP message transmission / reception with the SIP server 11 via the terminal-side connection management unit 120. The own terminal information management unit 122 holds the TLS connection state and the SIP dialog state. The TLS session state is a state indicating whether or not the TLS session between the SIP server 11 and the own SIP terminal 12 is established, and includes a “connected” or “disconnected” state. The SIP dialog state indicates whether or not there is a dialog in communication with the SIP server 11 in the SIP processing unit 121, and is “communication” if it exists, and “disconnected” if it does not exist.

端末側コネクション管理部120は、SIPサーバ11とのTCPコネクション、TLSセッションの切断・接続を検出し、SIPサーバからSIPメッセージを受信すると、自端末情報管理部122の情報を更新するとともに、SIP処理部121へSIPメッセージを転送し、SIPメッセージ送信要求をSIP処理部121から受信すると、自端末情報管理部122の情報を更新するとともに、SIPサーバ11へSIPメッセージを送信する機能を有する。   The terminal-side connection management unit 120 detects the disconnection / connection of the TCP connection with the SIP server 11 and the TLS session. When receiving the SIP message from the SIP server, the terminal-side connection management unit 120 updates the information of the terminal information management unit 122 and performs SIP processing. When the SIP message is transferred to the unit 121 and a SIP message transmission request is received from the SIP processing unit 121, the information of the local terminal information management unit 122 is updated and the SIP message is transmitted to the SIP server 11.

図5は、SIPサーバ11のサーバ側コネクション管理部110の動作、図6は、SIP端末12の端末側コネクション管理部120の動作を示すフローチャートである。
図5、図6に示すフローチャートでは、SIPサーバ11−SIP端末12間でTLSセッションが複数生成されることはなく一個のみ生成されるものとする。なお、同一のSIP端末12−SIPサーバ11間で複数のSIPダイアログが生成されることがあるが、TLSセッションは共有する。
FIG. 5 is a flowchart showing the operation of the server side connection management unit 110 of the SIP server 11, and FIG. 6 is a flowchart showing the operation of the terminal side connection management unit 120 of the SIP terminal 12.
In the flowcharts shown in FIGS. 5 and 6, it is assumed that a plurality of TLS sessions are not generated between the SIP server 11 and the SIP terminal 12, and only one is generated. A plurality of SIP dialogs may be generated between the same SIP terminal 12 and the SIP server 11, but the TLS session is shared.

(SIPサーバ11:サーバ側コネクション管理部110の動作)
図5において、まず、SIPサーバ11のサーバ側コネクション管理部110は、イベント待ちの状態になっている(ステップS501)。サーバ側コネクション管理部110は、IPネットワーク13経由でSIPメッセージが到着し、呼処理部111からSIPメッセージ送信要求を受信し、SIP端末12とのTCPコネクション確立、又は切断、SIP端末12とのTLSセッション確立、又は切断、のいずれかのイベントを検出すると、呼処理部111からSIPメッセージの送信要求があるか否かを判定する(ステップS502)。
(SIP server 11: operation of server-side connection management unit 110)
In FIG. 5, first, the server side connection management unit 110 of the SIP server 11 is in an event waiting state (step S501). The server-side connection management unit 110 receives a SIP message via the IP network 13, receives a SIP message transmission request from the call processing unit 111, establishes or disconnects a TCP connection with the SIP terminal 12, and establishes a TLS with the SIP terminal 12. When any event of session establishment or disconnection is detected, it is determined whether there is a SIP message transmission request from the call processing unit 111 (step S502).

送信要求があった場合(ステップS502“Yes”)、サーバ側コネクション管理部110は、呼処理部111からのSIPメッセージを送信するために、SIP端末12とのTLSセッションが確立済みか否かを判定する(ステップS503)。ここで、TLSセッションが確立済みであれば(ステップS503“Yes”)、後記するステップS506のSIPメッセージ送信処理を実行し、確立されていなければ、SIP端末12へTCP接続を要求する(ステップS504)。   When there is a transmission request (step S502 “Yes”), the server-side connection management unit 110 determines whether or not a TLS session with the SIP terminal 12 has been established in order to transmit the SIP message from the call processing unit 111. Determination is made (step S503). If a TLS session has been established (step S503 “Yes”), a SIP message transmission process in step S506, which will be described later, is executed. If not established, a TCP connection is requested to the SIP terminal 12 (step S504). ).

図3の動作シーケンス図を用いて説明したように、SIP端末12は、SIPサーバ11からのTCPコネクションが確立されると、SIP端末12からSIPサーバ11へTLS接続を要求する。このときサーバ側コネクション管理部110は、TCP接続要求後、SIP端末12とのTLSセッション確立が完了するのを待ち受ける(ステップS505)。
TLSセッションが確立すると、サーバ側コネクション管理部110は、SIP端末情報管理部112の情報のうち、TLSセッションが確立した対向SIP端末12を表す端末URIのTLS接続状態を”接続中”に更新し、SIP端末12と接続するTLSセッションへ、呼処理部から送信要求されたSIPメッセージを送信する(ステップS506)。
As described with reference to the operation sequence diagram of FIG. 3, when the TCP connection from the SIP server 11 is established, the SIP terminal 12 requests the TLS connection from the SIP terminal 12 to the SIP server 11. At this time, the server-side connection management unit 110 waits for completion of establishment of the TLS session with the SIP terminal 12 after the TCP connection request (step S505).
When the TLS session is established, the server-side connection management unit 110 updates the TLS connection state of the terminal URI representing the opposite SIP terminal 12 with which the TLS session has been established among the information in the SIP terminal information management unit 112 to “connected”. Then, the SIP message requested to be transmitted from the call processing unit is transmitted to the TLS session connected to the SIP terminal 12 (step S506).

メッセージ送信後、サーバ側コネクション管理部110は、呼処理部111のSIPダイアログを判定し、メッセージ送信先のSIP端末12とのSIPダイアログが呼処理部111に存在しなければ、SIPダイアログ状態を”切断”に設定し、SIPダイアログが呼処理部111に存在すれば、”通信中”に設定し、ステップS512の処理に移行する(RFC3261では、SIPダイアログは、INVITEやBYE、4XEレスポンス等のSIPメッセージの送受信を契機に生成され、削除される)。   After the message is transmitted, the server side connection management unit 110 determines the SIP dialog of the call processing unit 111, and if the SIP dialog with the SIP terminal 12 as the message transmission destination does not exist in the call processing unit 111, the SIP dialog state is changed. If it is set to “Disconnect” and the SIP dialog exists in the call processing unit 111, it is set to “Communicating”, and the process proceeds to Step S512. Generated and deleted when a message is sent or received).

一方、ステップS502のメッセージ送信要求有無判定処理において、メッセージ送信要求が無いと判定された場合(ステップS502“No”)、サーバ側コネクション管理部110は、TLSセッションが確立済みか否かを判定する(ステップS507)。
ここで、TLSセッションが確立されていなければ(ステップS507“No”)、サーバ側コネクション管理部110は、更に、SIP端末12からTCP接続要求が有るか否かを判定する(ステップS508)。TCPコネクションが確立していれば(ステップS508“Yes”)、サーバ側コネクション管理部110は、SIP端末12からのTLSセッション確立を待ち合わせる(ステップS509)。
On the other hand, in the message transmission request presence / absence determination processing in step S502, when it is determined that there is no message transmission request (step S502 “No”), the server-side connection management unit 110 determines whether or not a TLS session has been established. (Step S507).
If the TLS session is not established (step S507 “No”), the server-side connection management unit 110 further determines whether there is a TCP connection request from the SIP terminal 12 (step S508). If the TCP connection has been established (step S508 “Yes”), the server side connection management unit 110 waits for the establishment of a TLS session from the SIP terminal 12 (step S509).

ステップS507でTLSセッションが確立済みと判定されると(ステップS507“Yes”)、サーバ側コネクション管理部110は、SIP端末情報管理部112のうち、TLSセッションが確立した対向SIP端末12を示す端末URIのTLS接続状態を”接続中”に更新し、確立したTLSセッションでSIP端末12からのSIPメッセージ(到着メッセージ)が有るか否かを判定する(ステップS510)。
TLSセッションにSIPメッセージが到着していれば(ステップS510“Yes”)、TLSセッションからSIPメッセージを受信して呼処理部111へ転送する(ステップS511)。呼処理部111へSIPメッセージを転送後、SIPメッセージを送信したSIP端末12とのダイアログが呼処理部111に存在しなければ、SIP端末情報管理部112の当該SIP端末12のSIPダイアログ状態を”切断”に設定し、SIPダイアログが呼処理部111に存在すれば、”通信中”に設定し、SIP端末12との不要なTLSセッション、TCPコネクションを切断する(ステップS512)。
If it is determined in step S507 that the TLS session has been established (step S507 “Yes”), the server-side connection management unit 110 of the SIP terminal information management unit 112 indicates the opposite SIP terminal 12 that has established the TLS session. The TLS connection state of the URI is updated to “connected”, and it is determined whether or not there is a SIP message (arrival message) from the SIP terminal 12 in the established TLS session (step S510).
If the SIP message has arrived in the TLS session (step S510 “Yes”), the SIP message is received from the TLS session and transferred to the call processing unit 111 (step S511). If a dialog with the SIP terminal 12 that transmitted the SIP message does not exist in the call processing unit 111 after transferring the SIP message to the call processing unit 111, the SIP dialog state of the SIP terminal 12 of the SIP terminal information management unit 112 is changed to “ If it is set to “disconnect” and the SIP dialog exists in the call processing unit 111, it is set to “communication”, and unnecessary TLS session and TCP connection with the SIP terminal 12 are disconnected (step S512).

サーバ側コネクション管理部110は、SIP端末情報管理部112の情報で、SIPダイアログ情報が”切断”で、かつTLS接続状態が”接続中”のエントリがあるか否かを判定し、該当するエントリがあれば、そのエントリの端末URIに該当するSIP端末12とのTLSセッション、TCPコネクションの切断処理を行い、SIP端末情報管理部112のTLS接続状態を”切断”に設定する。   The server-side connection management unit 110 determines whether or not there is an entry whose SIP dialog information is “disconnected” and whose TLS connection status is “connected” in the information of the SIP terminal information management unit 112. If there is, the TLS session and TCP connection with the SIP terminal 12 corresponding to the terminal URI of the entry are disconnected, and the TLS connection state of the SIP terminal information management unit 112 is set to “disconnected”.

サーバ側コネクション管理部110は、次に、SIP端末情報管理部112のTLS接続状態が”接続中”であるSIP端末12とのTLSセッションが、切断されているか否かを判定する。
ここで、サーバ側コネクション管理部110は、SIP端末12からTLSセッションを切断された、又は、IPネットワーク13の障害によりSIP端末12と通信できず、TCPコネクションのkeep aliveがタイムアウトしていた場合、SIPサーバ11で管理しているTLSセッション、TCPコネクションの情報を更新し、リソースを解放する(TLSセッション用に確保しているメモリの解放やTCPコネクションに使用するソケットの解放など)。さらに、切断されたTLSセッションに関連するSIP端末情報管理部112のTLS接続状態を”切断”に設定する。これらの処理を完了すると、終了要求の有無を判定し(ステップS514)、終了されなければ(ステップS514“Yes”)、ステップS501のイベント待ちの処理に戻る。
Next, the server-side connection management unit 110 determines whether the TLS session with the SIP terminal 12 whose TLS connection state of the SIP terminal information management unit 112 is “connected” is disconnected.
Here, when the TLS session is disconnected from the SIP terminal 12 or the server side connection management unit 110 cannot communicate with the SIP terminal 12 due to a failure of the IP network 13, and the keep alive of the TCP connection has timed out, Information on the TLS session and TCP connection managed by the SIP server 11 is updated, and resources are released (such as releasing the memory reserved for the TLS session and releasing the socket used for the TCP connection). Further, the TLS connection state of the SIP terminal information management unit 112 related to the disconnected TLS session is set to “disconnected”. When these processes are completed, the presence / absence of an end request is determined (step S514). If not completed (step S514 "Yes"), the process returns to the event waiting process in step S501.

(SIP端末12:端末側コネクション管理部120の動作)
図6において、まず、SIP端末12の端末側コネクション管理部120は、イベント待ちの状態になっている(ステップS601)。端末側コネクション管理部120は、IPネットワーク13からのSIPメッセージ到着、SIP処理部121からのSIPメッセージ送信要求の受信、SIPサーバ11とのTCPコネクション確立、又は切断、SIP端末12とのTLSセッション確立、又は切断、のいずれか一つのイベントを検出すると、SIP処理部121からSIPメッセージの送信要求があるか否かを判定する(ステップS602)。
(SIP terminal 12: operation of terminal-side connection management unit 120)
In FIG. 6, first, the terminal side connection management unit 120 of the SIP terminal 12 is in an event waiting state (step S601). The terminal-side connection management unit 120 receives a SIP message from the IP network 13, receives a SIP message transmission request from the SIP processing unit 121, establishes or disconnects a TCP connection with the SIP server 11, and establishes a TLS session with the SIP terminal 12. When any one event of disconnection or disconnection is detected, it is determined whether or not there is a SIP message transmission request from the SIP processing unit 121 (step S602).

ここで、送信要求が無い場合(ステップS602“No”)、ステップS607のTLSセッション確立済み判定処理に移り、送信要求がある場合(ステップS602“Yes”)、端末側コネクション管理部120は、SIP処理部121からのSIPメッセージを送信するために、SIPサーバ11とのTLSセッションが確立済みか否かを判定する(ステップS603)。
TLSセッション確立済みであれば(ステップS603“Yes”)、ステップS606のSIPメッセージ送信処理へ、TLSセッション確立済みでなければ(ステップS603“No”)、SIPサーバ11へTCP接続を要求する(ステップS604)。
If there is no transmission request (step S602 “No”), the process proceeds to the TLS session establishment determination process in step S607. If there is a transmission request (step S602 “Yes”), the terminal-side connection management unit 120 In order to transmit the SIP message from the processing unit 121, it is determined whether or not a TLS session with the SIP server 11 has been established (step S603).
If the TLS session has already been established (step S603 “Yes”), the SIP message transmission processing in step S606 is requested. If the TLS session has not been established (step S603 “No”), a TCP connection is requested to the SIP server 11 (step S603). S604).

TCPコネクションが確立すると、端末側コネクション管理部120は、SIPサーバ11へTLS接続を要求する(ステップS605)。TLSセッションが確立すると、端末側コネクション管理部120は、自端末情報管理部122のTLS接続状態を”接続中”に設定し、TLSセッションへSIP処理部121から送信要求されたSIPメッセージを送信する(ステップS606)。メッセージ送信後、SIP処理部121のSIPダイアログを確認し、メッセージ送信先のSIP端末12とのSIPダイアログがSIP処理部121に存在しなければ、SIPダイアログ状態を”切断”に設定し、SIPダイアログがSIP処理部121に存在すれば、”通信中”に設定し、後記するステップS612のSIPダイアログ状態の確認処理に移行する。   When the TCP connection is established, the terminal side connection management unit 120 requests the SIP server 11 for a TLS connection (step S605). When the TLS session is established, the terminal side connection management unit 120 sets the TLS connection state of the local terminal information management unit 122 to “connected”, and transmits the SIP message requested to be transmitted from the SIP processing unit 121 to the TLS session. (Step S606). After the message is transmitted, the SIP dialog of the SIP processing unit 121 is confirmed, and if the SIP dialog with the SIP terminal 12 as the message transmission destination does not exist in the SIP processing unit 121, the SIP dialog state is set to “Disconnected”. Exists in the SIP processing unit 121, “in communication” is set, and the process proceeds to a SIP dialog state confirmation process in step S612 described later.

一方、ステップS602でSIP処理部121からメッセージ送信要求が無かった場合(ステップS602“No”)、端末側コネクション管理部120は、TLSセッションが確立済みか否かを判定する(ステップS607)。
ここで、TLSセッション確立済みならば(ステップS607“Yes”)、ステップS610の処理へ、TLSセッションが確立されてなければ(ステップS607“No”)、更に、SIPサーバ11からTCPコネクションが確立されたか否かを判定する(ステップS608)。
On the other hand, if there is no message transmission request from the SIP processing unit 121 in step S602 (step S602 “No”), the terminal-side connection management unit 120 determines whether a TLS session has been established (step S607).
If the TLS session has already been established (step S607 “Yes”), the process proceeds to step S610. If the TLS session has not been established (step S607 “No”), a TCP connection is further established from the SIP server 11. It is determined whether or not (step S608).

ここで、TCPコネクションが確立されていなければ(ステップS608“No”)、ステップS614の処理へ、確立していれば(ステップS608“Yes”)、SIPサーバ11からのTCPコネクションが確立したので、図3の動作シーケンス図で説明したように、SIP端末12からTLSセッションを確立させるため、端末側コネクション管理部120は、SIPサーバ11へTLSセッション確立を要求する(ステップS609)。
TLSセッションが確立すれば、自端末情報管理部122のTLS接続状態を、”接続中”に更新し、TLSセッションにSIPサーバ11からのSIPメッセージが到着しているか否かを判定する(ステップS610)。
Here, if the TCP connection is not established (step S608 “No”), the process proceeds to step S614. If the TCP connection is established (step S608 “Yes”), the TCP connection from the SIP server 11 is established. As described in the operation sequence diagram of FIG. 3, in order to establish a TLS session from the SIP terminal 12, the terminal-side connection management unit 120 requests the SIP server 11 to establish a TLS session (step S609).
If the TLS session is established, the TLS connection state of the local terminal information management unit 122 is updated to “connected”, and it is determined whether or not the SIP message from the SIP server 11 has arrived in the TLS session (step S610). ).

ここで、TLSセッションに到着メッセージがあれば(ステップS610“Yes”)、端末側コネクション管理部120は、TLSセッションからSIPメッセージを受信してSIP処理部121へ転送する(ステップS611)。
SIP処理部121へSIPメッセージを転送後、端末側コネクション管理部120は、SIPダイアログ状態を確認する(ステップS612)。具体的に、端末側コネクション管理部120は、SIPダイアログがSIP処理部121に存在しなければ、SIP端末情報管理部122の当該SIP端末12のSIPダイアログ状態を”切断”に設定し、SIPダイアログが存在すれば、SIPダイアログ状態を“通信中”に設定する。そして、自端末情報管理部122のSIPダイアログ状態が”切断”であり、かつTLS接続状態が”接続中”となっていれば、SIPサーバ11とのTLSセッション、TCPコネクションを切断する。TLSセッション・TCPコネクションを切断した場合、自端末情報管理部122のTLS接続状態を”切断”に設定する。
If there is an arrival message in the TLS session (step S610 “Yes”), the terminal-side connection management unit 120 receives the SIP message from the TLS session and transfers it to the SIP processing unit 121 (step S611).
After transferring the SIP message to the SIP processing unit 121, the terminal side connection management unit 120 confirms the SIP dialog state (step S612). Specifically, if the SIP dialog does not exist in the SIP processing unit 121, the terminal side connection management unit 120 sets the SIP dialog state of the SIP terminal 12 of the SIP terminal information management unit 122 to “disconnected”, and the SIP dialog Is present, the SIP dialog state is set to “in communication”. If the SIP dialog state of the terminal information management unit 122 is “disconnected” and the TLS connection state is “connected”, the TLS session and TCP connection with the SIP server 11 are disconnected. When the TLS session / TCP connection is disconnected, the TLS connection state of the local terminal information management unit 122 is set to “disconnected”.

この処理を経てTLSセッション状態の確認処理を実行する(ステップS613)。具体的に、端末側コネクション管理部120は、自端末情報管理部122のTLS接続状態が”接続中”である場合、SIP端末12とのTLSセッションが、切断されていないかを確認する。ここで、端末側コネクション管理部120は、SIPサーバ11からTLSセッションが切断され、もしくはIPネットワーク13の障害によりTCPコネクションのkeep aliveがタイムアウトした場合、TLSセッション、TCPコネクションを切断し、TLS接続状態を”切断”に設定する。これらの処理を完了すると、終了要求の有無を判定し(ステップS614)、終了されなければ(ステップS614“Yes”)、ステップS601のイベント待ちの処理に戻る。   Through this process, a TLS session state confirmation process is executed (step S613). Specifically, the terminal-side connection management unit 120 checks whether the TLS session with the SIP terminal 12 is disconnected when the TLS connection state of the self-terminal information management unit 122 is “connected”. Here, if the TLS session is disconnected from the SIP server 11 or the keep alive of the TCP connection times out due to the failure of the IP network 13, the terminal side connection management unit 120 disconnects the TLS session and the TCP connection, and the TLS connection state Set to “Disconnect”. When these processes are completed, it is determined whether or not there is an end request (step S614). If the process is not completed (step S614 "Yes"), the process returns to the event waiting process in step S601.

以上説明のように本発明の実施の形態に係る通信システム1によれば、SIPサーバ11からSIPメッセージ送信時、図5に示すステップS504〜S506、及び図6のステップS608〜S610に示されるように、SIPサーバ11がSIP端末12へTCP接続を要求し、SIP端末12がTCPコネクション確立を契機にSIPサーバ11へTLS接続を要求することにより、SIP端末12にTLSのサーバ証明書を配置せず、また、SIP端末12−SIPサーバ11間で常時TLSセッション、TCPコネクションを保持することなく、SIPサーバ11からSIP端末12へTLS上のSIPメッセージ送信することが可能になる。   As described above, according to the communication system 1 according to the embodiment of the present invention, when a SIP message is transmitted from the SIP server 11, steps S504 to S506 shown in FIG. 5 and steps S608 to S610 shown in FIG. In addition, the SIP server 11 requests TCP connection to the SIP terminal 12, and the SIP terminal 12 requests TLS connection to the SIP server 11 when the TCP connection is established, whereby the TLS server certificate is placed in the SIP terminal 12. In addition, it is possible to transmit the SIP message on the TLS from the SIP server 11 to the SIP terminal 12 without always maintaining the TLS session and the TCP connection between the SIP terminal 12 and the SIP server 11.

なお、前記した本発明の実施の形態に係る通信システム1によれば、SIPサーバ11を一個のみ例示したが、SIPサーバ11が複数存在する場合にも同様に適用できる。
また、SIPサーバ11は、RFC3261のSIPプロキシキとSIPレジストラの機能を有するものとして説明したが、SIPプロキシとSIPレジストラが物理的に別のサーバに機能分散される場合も同様に適用できる。この場合、SIP端末12の着信TLSポートをREGISTERのContactヘッダに設定してSIPレジストラに登録し、SIPプロキシからSIP端末12へのSIPメッセージ送信時、RFC3261のFigure2に示されるように、SIPプロキシがロケーションサーバを通して登録されたSIP端末12の着信TLSポートを取得し、着信TLSポートに対してSIPサーバ11からTCP接続を行う。このことにより、SIPプロキシとSIP端末12間の通信に本発明を適用することができる。
In addition, according to the communication system 1 according to the embodiment of the present invention described above, only one SIP server 11 is illustrated, but the present invention can be similarly applied to a case where there are a plurality of SIP servers 11.
Further, the SIP server 11 has been described as having the functions of an RFC 3261 SIP proxy and a SIP registrar, but the present invention can also be applied to cases where the SIP proxy and SIP registrar are physically distributed to different servers. In this case, the incoming TLS port of the SIP terminal 12 is set in the REGISTER Contact header and registered in the SIP registrar, and when the SIP message is transmitted from the SIP proxy to the SIP terminal 12, the SIP proxy is set as shown in FIG. 2 of RFC3261. The incoming TLS port of the SIP terminal 12 registered through the location server is acquired, and a TCP connection is made from the SIP server 11 to the incoming TLS port. Thus, the present invention can be applied to communication between the SIP proxy and the SIP terminal 12.

また、本発明の実施の形態に係る通信システム1によれば、RFC3261にしたがい着信TLSポートをSIPレジストラへ登録するためにREGISTERのContactヘッダを利用したが、例えば、SIPサーバ11にあらかじめSIP端末12の着信TLSポートをコンフィグで設定しておく等、SIP端末12の着信TLSポートをSIPサーバ11が認識する手段がREGISTERのContactヘッダでない場合にも適用が可能である。
また、本発明の実施の形態に係る通信システム1によれば、同一のSIP端末12−SIPサーバ11間に生成されるダイアログは、同じTLSセッションを共有する構成になっているが、ダイアログ毎にTLSセッションを生成することも可能である。
Further, according to the communication system 1 according to the embodiment of the present invention, the REGISTER Contact header is used to register the incoming TLS port with the SIP registrar according to RFC3261, but for example, the SIP terminal 12 is preliminarily set in the SIP server 12. The present invention can also be applied when the means for the SIP server 11 to recognize the incoming TLS port of the SIP terminal 12 is not a REGISTER Contact header.
Further, according to the communication system 1 according to the embodiment of the present invention, the dialog generated between the same SIP terminal 12 and the SIP server 11 is configured to share the same TLS session. It is also possible to create a TLS session.

以上、好ましい実施の形態を上げて本発明を説明したが、本発明は必ずしも上記実施の形態に限定されるものでなく、その技術的歯槽の範囲内において様々に変形して実施することができる。   Although the present invention has been described above with the preferred embodiment, the present invention is not necessarily limited to the above embodiment, and can be implemented with various modifications within the technical alveoli. .

1 通信システム
11,101 SIPサーバ
12,102 SIP端末
13 IPネットワーク
20 動的TLS
30 常駐TLS
110 サーバ側コネクション管理部
111 呼処理部
112 SIP端末情報管理部
120 端末側コネクション管理部
121 SIP処理部
122 自端末情報管理部
DESCRIPTION OF SYMBOLS 1 Communication system 11,101 SIP server 12,102 SIP terminal 13 IP network 20 Dynamic TLS
30 resident TLS
110 server side connection management unit 111 call processing unit 112 SIP terminal information management unit 120 terminal side connection management unit 121 SIP processing unit 122 own terminal information management unit

Claims (7)

SIPサーバと複数のSIP端末とがIPネットワーク経由で接続され、TLSを利用して通信を行う通信システムであって、
前記SIPサーバが、
あるSIP端末からのSIPリクエストを他のSIP端末へ送信する場合に、前記他のSIP端末にTCPコネクションを行い、
前記他のSIP端末が
前記SIPサーバとのTCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立する
ことを特徴とする通信システム。
A communication system in which a SIP server and a plurality of SIP terminals are connected via an IP network and perform communication using TLS ,
The SIP server is
When sending a SIP request from one SIP terminal to other SIP terminals, it has rows TCP connection to the other SIP terminals,
The other SIP terminals,
Dynamically establishing a TLS session to the SIP server by operating as a TLS client triggered by the establishment of a TCP connection with the SIP server .
A communication system characterized by the above.
前記SIPサーバは
前記SIPサーバと前記他のSIP端末との間のSIPダイアログが1以上未処理の場合、前記SIPサーバと前記他のSIP端末との間のすべてのダイアログが終了したときに、前記SIPサーバと前記他のSIP端末との間のTCPコネクションを切断し、
前記他のSIP端末は
前記SIPサーバと前記他のSIP端末との間のSIPダイアログが1以上未処理の場合、前記SIPサーバと前記他のSIP端末との間のすべてのダイアログが終了したときに、前記SIPサーバと前記他のSIP端末との間のTLSセッションを切断する、
ことを特徴とする請求項1に記載の通信システム。
The SIP server is,
For SIP dialog 1 or more unprocessed between the SIP server and the other SIP terminals, when all dialogs between the other SIP terminals and the SIP server is completed, the said SIP server Disconnect the TCP connection with other SIP terminals,
The other SIP terminals do,
For SIP dialog 1 or more unprocessed between the SIP server and the other SIP terminals, when all dialogs between the other SIP terminals and the SIP server is completed, the said SIP server Disconnect TLS sessions with other SIP terminals,
The communication system according to claim 1.
前記他のSIP端末は
前記TLSセッションを確立する際に生成されたTLSセッションが存在する場合、前記他のSIP端末から前記SIPサーバへのメッセージ送信に際し、前記存在するTLSセッションを再利用して同じTLSセッションの生成を禁止することを特徴とする請求項1又は請求項2に記載の通信システム。
The other SIP terminals do,
When there is a TLS session generated when establishing the TLS session, when the message is transmitted from the other SIP terminal to the SIP server, it is prohibited to generate the same TLS session by reusing the existing TLS session. The communication system according to claim 1 or 2, characterized in that:
前記TLSは、RFC2246で規定されることを特徴とする請求項1ないし請求項3の何れか1項に記載の通信システム。The communication system according to any one of claims 1 to 3, wherein the TLS is defined by RFC2246. 複数のSIP端末とはIPネットワーク経由で接続され、TLSを利用してあるSIP端末からのSIPリクエストを他のSIP端末へ送信するSIPサーバであって、
他のSIP端末にTCPコネクションを行い、前記他のSIP端末が、TCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立する、
ことを特徴とするSIPサーバ。
A plurality of SIP terminals are connected via an IP network, and are SIP servers that transmit SIP requests from a SIP terminal using TLS to other SIP terminals ,
There rows TCP connection before SL other SIP terminals, the other SIP terminals, that operates as a TLS client in response to establish a TCP connection, dynamically establish a TLS session to the SIP server,
SIP server characterized by the above.
SIPサーバとIPネットワーク経由で接続され、TLSを利用して通信を行うSIP端末であって、
前記SIPサーバが、あるSIP端末からのSIPリクエストを他のSIP端末へ送信する場合に、前記他のSIP端末にTCPコネクションを行い、前記SIPサーバとの間のTCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立する
ことを特徴とするSIP端末。
An SIP terminal connected to an SIP server via an IP network and performing communication using TLS ,
When the SIP server transmits a SIP request from a certain SIP terminal to another SIP terminal, a TCP connection is established with the other SIP terminal, and a TLS client is triggered by the establishment of a TCP connection with the SIP server. by operating as dynamically establishes a TLS session to the SIP server,
SIP terminal characterized by the above.
SIPサーバと複数のSIP端末とが、IPネットワーク経由で接続され、TLSを利用して通信を行う通信システムにおけるセキュリティ通信方法であって、
前記SIPサーバが、
あるSIP端末からのSIPリクエストを他のSIP端末へ送信する場合に、前記他のSIP端末にTCPコネクションを行うステップと、
前記他のSIP端末が
前記SIPサーバとのTCPコネクションの確立を契機にTLSクライアントとして動作することで、前記SIPサーバへ動的にTLSセッションを確立するステップと
を有することを特徴とするセキュリティ通信方法。
A security communication method in a communication system in which a SIP server and a plurality of SIP terminals are connected via an IP network and perform communication using TLS ,
The SIP server is
When a SIP request from a certain SIP terminal is transmitted to another SIP terminal, performing a TCP connection to the other SIP terminal;
The other SIP terminals,
Dynamically establishing a TLS session to the SIP server by operating as a TLS client triggered by the establishment of a TCP connection with the SIP server ;
A security communication method characterized by comprising:
JP2009054436A 2009-03-09 2009-03-09 Communication system, SIP server, SIP terminal, and security communication method Active JP5169921B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009054436A JP5169921B2 (en) 2009-03-09 2009-03-09 Communication system, SIP server, SIP terminal, and security communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009054436A JP5169921B2 (en) 2009-03-09 2009-03-09 Communication system, SIP server, SIP terminal, and security communication method

Publications (2)

Publication Number Publication Date
JP2010212825A JP2010212825A (en) 2010-09-24
JP5169921B2 true JP5169921B2 (en) 2013-03-27

Family

ID=42972585

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009054436A Active JP5169921B2 (en) 2009-03-09 2009-03-09 Communication system, SIP server, SIP terminal, and security communication method

Country Status (1)

Country Link
JP (1) JP5169921B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101654479B1 (en) * 2015-09-25 2016-09-05 라인 가부시키가이샤 Method and system for efficient call processing
CN107612931B (en) * 2017-10-20 2020-04-28 苏州科达科技股份有限公司 Multipoint conversation method and multipoint conversation system
JP7143609B2 (en) * 2018-03-28 2022-09-29 日本電気株式会社 COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3859667B2 (en) * 2004-10-26 2006-12-20 株式会社日立製作所 Data communication method and system
AU2007300707B2 (en) * 2006-09-27 2011-11-17 Multifactor Corporation System and method for facilitating secure online transactions
JP4703576B2 (en) * 2007-01-15 2011-06-15 株式会社東芝 Apparatus, method and program for maintaining connection
JP5070568B2 (en) * 2007-06-08 2012-11-14 ソフトバンクモバイル株式会社 COMMUNICATION MODULE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, COMMUNICATION TERMINAL, AND COMMUNICATION CONTROL DEVICE
JP2009021855A (en) * 2007-07-12 2009-01-29 Toshiba Corp Relay device, communicating method and communication program

Also Published As

Publication number Publication date
JP2010212825A (en) 2010-09-24

Similar Documents

Publication Publication Date Title
US10536490B2 (en) Apparatus and method for communications involving a legacy device
CN104429037B8 (en) Method, equipment and system for being connected to communication equipment
JP5209061B2 (en) Control of sending interface of SIP response message
KR101120695B1 (en) Efficient message routing when using server pools
US8767590B2 (en) Multimedia conference system and method which enables communication between private network and internet
US9497168B2 (en) Method and apparatus for supporting communications between a computing device within a network and an external computing device
JP4207078B2 (en) Relay server
US10116708B2 (en) SIP signalling
US20060187912A1 (en) Method and apparatus for server-side NAT detection
KR101981812B1 (en) Network communication systems and methods
JP4764368B2 (en) Apparatus for establishing communication and relaying message, method and program for establishing communication
JP2009021855A (en) Relay device, communicating method and communication program
JP2009296138A (en) Communication system
CN113632443A (en) Methods, systems, and computer readable media for establishing a communication session between a Public Switched Telephone Network (PSTN) endpoint and a WEB real-time communication (WEBRTC) endpoint
JP5169921B2 (en) Communication system, SIP server, SIP terminal, and security communication method
US20190141009A1 (en) Session moderator for turn-pattern tcp-packet relay with websocket instantiation
JP2006345231A (en) Sip-alg method
KR100814398B1 (en) Voip phone providing multi-call service and method thereof
JP2008306340A (en) Ip telephone system, ip telephone set, and communication method
JP4136798B2 (en) Relay device with voice guidance function
KR101344270B1 (en) Communication device in cloud environment and operating method for communication device
WO2008080334A1 (en) Back to back user agent and the method for transmitting information thereof
JP5022474B2 (en) Server apparatus, communication method and program
JP4381190B2 (en) Registration of terminal identification from external network to server on intranet via DMZ
Packet The WebSocket Protocol as a Transport for the Session Initiation Protocol (SIP) draft-ibc-sipcore-sip-websocket-00

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110217

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111027

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120809

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20120813

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120821

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121022

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121217

R150 Certificate of patent or registration of utility model

Ref document number: 5169921

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150