Patent Description:
Relaying devices that relay voice communication made by a radio transceiver, a telephone, or the like over a network have been proposed (refer to Patent Literatures <NUM>, <NUM>, and <NUM>). As a result of connecting a plurality of relaying devices to a network, it is also possible that different types of communication apparatuses such as an IP telephone and a radio perform voice communication to each other. If a relaying device outputs a relaying voice signal to the outside, it is possible to record the voice signal.

<CIT> relates to streaming communications.

<CIT> relates to a call recording device.

However, in order for a relaying device configured as described above to output a voice signal to the outside of the relaying device, a device for external output needs to be participated in the communication, and new hardware is needed. Also, although it is possible to realize recording of the communication by software, it takes time and effort to add a new recording function to the relaying device, and a new burden is imposed on a control unit that performs relaying processing of voice communication. Also, it is further difficult to track and record the communication performed by a specific communication terminal.

Therefore, the present invention aims to provide a relaying device that can track and record the communicated voice of a specific communication terminal using a mixing function of the relaying device.

A relaying device of the present invention includes: a communication unit configured to communicate with a plurality of communication terminals that perform voice communication; a communication session processing unit configured to control a communication session in which two or more communication terminals communicate to each other, and include a session table in which the communication session is registered; and a communication monitoring unit configured to record a voice signal in the communication session. The communication session processing unit establishes, when one communication terminal made a call for calling at least one other communication terminal, a communication session that is identified by session information, and registers, in the session table, the one communication terminal that has made the call and the at least one other communication terminal that was called as participating terminals of the communication session. The communication session processing unit transmits, upon receiving a voice signal from one participating terminal of the established communication session, this voice signal to the at least one other participating terminal of the same communication session along with the session information. The communication session processing unit provides a virtual device for transmitting voice signals to the communication monitoring unit, and associates this virtual device with one communication terminal or a group constituted by a plurality of communication terminals. The communication session processing unit registers, if the communication terminal or group associated with the virtual device is registered as a participating terminal of the communication session, the virtual device further as a participating terminal of the communication session. The communication monitoring unit acquires and records voice signals transmitted from the communication session processing unit to the virtual device. The communication monitoring unit monitors the session information that is transmitted from the communication session processing unit along with the voice signals, and if the session information has changed, saves the voice signals recorded until this point in time in a nonvolatile storage device as a file.

In a recording method of voice communication of the present invention, a relaying device that relays voice communication between a plurality of communication terminals executes the following procedures. The relaying device establishes, when one communication terminal made a call for calling at least one other communication terminal, a communication session that is identified by session information, and registers the one communication terminal that has made the call and the at least one other communication terminal that was called as participating terminals of the communication session. The relaying device transmits, upon receiving a voice signal from one participating terminal of the established communication session, this voice signal to the at least one other participating terminal of the same communication session along with the session information. The relaying device associates a virtual device for acquiring voice signals in the communication session with one communication terminal or a group constituted by a plurality of communication terminals. The relaying device registers, if the communication terminal or group associated with the virtual device is registered as a participating terminal of the communication session, the virtual device as a participating terminal of the communication session. The relaying device records voice signals transmitted from the communication session to the virtual device, monitors the session information that is transmitted along with the voice signals, and if the session information has changed, saves the voice signals recorded until this point in time in a nonvolatile storage device as a file.

In the above-described invention, the voice signals may be buffered in a volatile memory, and upon the size of the buffered voice signals has reached a predetermined size, the buffered voice signals may be saved in the nonvolatile storage device as a file.

In the above-described invention, a plurality of the virtual devices may be provided, and voice signals transmitted to the respective plurality of virtual devices may be separately recorded in parallel.

In the above-described invention, the communication terminals include a terminal that performs telephone communication, a terminal that performs wireless communication, and a terminal that performs voice communication over a network.

According to the present invention, as a result of causing a virtual device to participate in a communication session in which a specific communication terminal is participating, communicated voices in the communication session in which the specific communication terminal is participating can be acquired using a mixing function of a relaying device, and the voices can be recorded or output.

A voice communication system of the present invention will be described with reference to the drawings. <FIG> is a diagram illustrating a configuration of a voice communication system <NUM>, which is an embodiment of the present invention. <FIG> is a diagram illustrating a configuration of a relaying device <NUM>.

The voice communication system <NUM> realizes voice communication between a plurality of communication terminals by the relaying device <NUM> relaying voice signals. A SIP phone <NUM>, an extension telephone <NUM>, a WLAN transceiver <NUM>, an LTE transceiver <NUM>, an analog transceiver <NUM>, a digital transceiver <NUM>, and the like, which will be described later, are prepared as the communication terminals. These communication terminals are devices that transmit and receive voice signals in forms that are different to each other, and the relaying device <NUM> relays voice communication between these different types of communication terminals.

The relaying device <NUM> can monitor voices in communication. When two or more communication terminals communicate to each other, the relaying device <NUM> establishes a communication session for this communication. The relaying device <NUM> can establish a plurality of communication sessions at the same time, but selects and monitors, from the established sessions, a communication session in which a specific communication terminal (or a group) participates. The monitoring means is one of or both of recording and audio output.

In <FIG>, the relaying device <NUM> relays voice communication between a plurality of communication systems including an IP telephone system <NUM>, a WLAN transceiver system <NUM>, an LTE transceiver system <NUM>, and a wireless communication system <NUM>. The relaying device <NUM> includes a telephone relaying unit <NUM>, a network communication relaying unit <NUM>, and a wireless communication relaying unit <NUM> in order to perform these relays.

The IP telephone system <NUM> is connected to the telephone relaying unit <NUM>. The IP telephone system <NUM> includes the SIP phone <NUM> and a VoIP gateway <NUM> that are connected to a network <NUM>, and the extension telephone <NUM> connected to the VoIP gateway <NUM>. The VoIP gateway <NUM> has a PBX function and is also connected to a telephone line (external line).

A network <NUM> including a wireless access point (not illustrated) and an LTE communication network <NUM> including a base station (not illustrated) are connected to the network communication relaying unit <NUM>. The WLAN transceiver system <NUM> is constructed on the network <NUM>, and the LTE transceiver system <NUM> is constructed on the LTE communication network <NUM>. The WLAN transceiver system <NUM> includes WLAN transceivers <NUM> that access the network <NUM> via the wireless access point. The LTE transceiver system <NUM> includes LTE transceivers <NUM> that access the LTE communication network <NUM> via the base station. The configuration and functions of the network communication relaying unit <NUM> are described in detail in <CIT>, which is a prior patent application of this applicant.

As shown in <FIG>, a plurality of external apparatus interfaces <NUM>, which are portions of a signal processing unit <NUM> are connected to the wireless communication relaying unit <NUM>. An analog-type radio transceiver (repeater) <NUM> and a digital-type radio transceiver (repeater) <NUM> are connected to the external apparatus interfaces <NUM>. The repeater <NUM> communicates with a handy radio transceiver (analog transceiver) <NUM> of the same analog type. The repeater <NUM> communicates with a handy radio transceiver (digital transceiver) <NUM> of the same digital type. The configuration and functions of the wireless communication relaying unit <NUM> are described in detail in <CIT> and <CIT>, which are prior patent applications of this applicant.

<FIG> is a block diagram of the relaying device <NUM>. The relaying device <NUM> includes the telephone relaying unit <NUM>, the network communication relaying unit <NUM>, the wireless communication relaying unit <NUM>, and a communication monitoring unit <NUM>. The functions of these units are mainly realized by software. The relaying device <NUM> includes a control unit <NUM>. The control unit <NUM> is constituted by a computer including a CPU, a ROM, a RAM, and the like. An external storage device <NUM>, a network connection unit <NUM>, an LTE connection unit <NUM>, and the signal processing unit <NUM> are connected to the control unit <NUM>. The external storage device <NUM> is a nonvolatile and large capacity storage device such as a USB hard disk, for example, and stores a voice file in which a communicated voice of a communication terminal is recorded. The network connection unit <NUM> is connected to the networks <NUM>. The LTE connection unit <NUM> is connected to the LTE communication network <NUM>. Although the networks <NUM> connected to the telephone relaying unit <NUM> and the network communication relaying unit <NUM> are separately described in <FIG>, these networks may be the same.

In the relaying device <NUM>, the functions of the telephone relaying unit <NUM>, the network communication relaying unit <NUM>, the wireless communication relaying unit <NUM>, and the communication monitoring unit <NUM> are realized by cooperation between hardware including the control unit <NUM> and software. The telephone relaying unit <NUM> includes an interface 3A for transmitting and receiving a voice signal and the like to and from the network communication relaying unit <NUM>. The network communication relaying unit <NUM> includes an interface 4A for transmitting and receiving a voice signal and the like to and from the wireless communication relaying unit <NUM>. Also, the wireless communication relaying unit <NUM> includes an interface 5A for transmitting and receiving a voice signal and the like to and from the signal processing unit <NUM>. The signal processing unit <NUM> extracts a voice signal from an RTP packet received from the control unit <NUM> (interface 5A), converts the voice signal to a digital or analog signal wave, and outputs the signal wave to the external apparatus interface <NUM>. Also, the signal processing unit <NUM> compresses and encodes a digital or analog voice signal received from the external apparatus interface <NUM>, and also packetizes the encoded data into an RTP packet, and inputs the RTP packet to the control unit <NUM> (interface 5A).

Three external apparatus interfaces <NUM> (<NUM>-<NUM> to <NUM>-<NUM>) are provided, namely an analog interface <NUM>-<NUM>, a digital interface <NUM>-<NUM>, and an analog (microphone at hand/speaker) interface <NUM>-<NUM>. A state in which repeaters <NUM> and <NUM> are respectively connected to the analog interface <NUM>-<NUM> and the digital interface <NUM>-<NUM> is shown in <FIG>.

The network communication relaying unit <NUM> relays communication between the WLAN transceivers <NUM>, communication between the LTE transceivers <NUM>, and communication between a WLAN transceiver <NUM> and an LTE transceiver <NUM>. Also, in response to a call from the telephone relaying unit <NUM>, the network communication relaying unit <NUM> relays communication between the telephone <NUM> or <NUM> (SIP phone <NUM>, extension telephone <NUM>) and a WLAN transceiver <NUM> or an LTE transceiver <NUM>, and the communication between the telephone <NUM> or <NUM> and the radio transceiver <NUM> or <NUM>. Also, the control of a communication session and the mixing of voice signals, which will be described later, are executed by the network communication relaying unit <NUM>. The network communication relaying unit <NUM> corresponds to a communication session processing unit of the present invention.

The telephone relaying unit <NUM>, upon receiving a call from the SIP phone <NUM> or the extension telephone <NUM>, determines the communication partner communication apparatus (destination radio), which is the call destination, and inputs the information regarding the destination radio and the voice signal received from the telephone <NUM> or <NUM> to the network communication relaying unit <NUM>. The entirety or some of the telephone relaying unit <NUM>, the network communication relaying unit <NUM>, and the wireless communication relaying unit <NUM> including the signal processing unit <NUM> corresponds to a communication unit of the present invention.

The communication monitoring unit <NUM> monitors voices in a communication session in which, out of the plurality of communication terminals, the communication terminal to be monitored participates. As described above, the monitoring refers to recording and/or outputting a communicated voice. In the following description, a case where recording is performed will be described. Recorded voices (voice files) are stored in the external storage device <NUM>.

Each communication terminal is registered in a terminal table (call destination table) <NUM> shown in <FIG>. A user who intends to start communication calls a communication terminal of the communication partner using a possessing communication terminal. As a result of this call operation, a call message is generated and transmitted to the relaying device <NUM>. Upon the relaying device <NUM> receiving the call message, the relaying device <NUM> registers the communication session to a mixing table <NUM> shown in <FIG> (establishes the communication session), and calls the communication terminal of the communication partner. With this, communication between the communication terminals is started.

The communication terminals excluding the telephones <NUM> and <NUM> start communication by transmitting an RTP packet in which a voice signal is stored as a data body. That is, communication is started in a form such as a radio transceiver with which communication is started by a PTT switch being pressed. The RTP packet that is first transmitted when starting communication is referred to as a call packet. This call packet functions as the call message. This RTP packet used in the voice communication system <NUM> is configured as shown in <FIG>. On the other hand, when the telephone <NUM> or <NUM> starts communication, first, the telephone transmits a SIP message (INVITE) to the relaying device <NUM>. The relaying device <NUM> establishes a communication session with another communication apparatus following a SIP procedure. In the following description, a case will be described where, as a result of a communication terminal such as the WLAN transceiver <NUM> transmitting a call packet, a communication session is established.

Various types of tables to be provided in the control unit <NUM> of the relaying device <NUM> will be described with reference to <FIG>. <FIG> is a diagram illustrating the terminal table (call destination table) <NUM>. Pieces of information regarding each communication terminal and each group that are registered in the voice communication system <NUM> are registered in the terminal table <NUM>. A plurality of communication terminals belong to each group, and when the group is called, the plurality of communication terminals that belong to the group are simultaneously called. In association with each communication terminal, an identification number (ID), address information for accessing the communication terminal, and a participating session number indicating the communication session in which the communication terminal is participating are stored in the terminal table <NUM>. With respect to each registered group, the identification numbers of communication terminals that belong to this group are stored. The identification number (ID) corresponds to identification information of the present invention. In this table, the group "plenary" to which all the communication terminals belong is treated similarly to other groups.

The call type is information indicating that, when this ID is called, what type of communication will be executed. "Individual" communication indicates one to one communication between individual communication terminals. "Group" communication is communication in which a plurality of communication terminals (three or more, in general) exchange voice signals to each other. "Plenary" communication is communication in which all the communicable communication terminals that are connected to the network <NUM>, the LTE communication network <NUM>, and the external apparatus interface <NUM> exchange voice signals to each other.

When a communication terminal calls another communication terminal, the communication terminal transmits an RTP packet (voice packet) in which the identification number (destination ID) of the communication terminal to be called is written, to the relaying device <NUM>. <FIG> is a diagram illustrating a configuration of the RTP packet to be used in this voice communication system. The RTP packet includes a header and a data body (payload), and a transmission destination address and a transmission source address are described in the header. The data body includes a voice signal and session information for voice communication. The session information is information regarding a communication session to be registered in the mixing table <NUM> in <FIG>, and with this, the communication session to which this RTP packet relates to can be identified. The session information includes a session number, a destination ID, and a calling ID. In the case of a call packet that is a voice packet to be transmitted first when communication is started, because the communication session for this voice packet is not yet established (communication session is not registered in the mixing table <NUM>), the session number field is empty.

<FIG> is a diagram illustrating the mixing table <NUM>. A communication session that has been established and is being executed is registered in the mixing table <NUM>. The relaying device <NUM> transfers a voice signal received from one communication terminal that is participating in a communication session to at least one other communication terminal that is participating in the communication session. If a plurality of voice signals are input at the same time, these voice signals are mixed and transmitted to communication terminals. Even in a case where voice signals are mixed and transmitted to each communication terminal, the relaying device <NUM> performs echo-canceling mixing for the communication terminal such that a voice signal transmitted from this communication terminal is not returned to the same communication terminal. The mixing table corresponds to a session table of the present invention.

The mixing table <NUM> is provided with a session number field, a calling ID field, a destination ID field, a participating terminal field, an excluded terminal field, and a retention time timer (TS) field for each communication session. The session number is a number for identifying the communication session, and is assigned a serial number that indicates the order of establishment (order of registration) of the communication session. The identification number of a communication terminal that has made a call (transmitted a call packet) is stored in the calling ID field. The identification number of a communication terminal or a group that has been called by the call packet is stored in the destination ID field.

The identification number of a communication terminal that is participating in the communication session is registered in the participating terminal field. Also, the identification number of a communication terminal that has been called in (belongs to) the communication session but is not participating in the communication session, because the communication terminal is participating in another communication session and performs communication, is registered in the excluded terminal field. When a voice signal is transmitted from one communication terminal (participating terminal) whose identification number is registered in the participating terminal field, the control unit <NUM> transfers this voice signal to the other participating terminal(s).

In the case of the group communication session, the identification number of a calling terminal and the identification numbers of communication terminals that belong to the group designated as the communication partner are registered in the participating terminal field. Note that a communication terminal that belongs to the group, but is participating in a different communication session is excluded from the participating terminal, because the communication terminal cannot participate in the group communication session, and the identification number thereof is registered in the excluded terminal field. Also, if the calling terminal is a communication terminal that does not belong to the group, which is a case where the calling terminal calls a group other than the group to which the calling terminal belongs, the identification number of the calling terminal is also registered in the participating terminal field. In the case of a plenary communication session, all of the communication terminals that can perform communication are registered as the participating terminals.

The retention time of each communication session is set to <NUM> seconds, for example. The retention time timer (TS) in the mixing table <NUM> is a timer that is counted down when a voice signal is transmitted from none of the participating terminals. The retention time timer TS is reset by communication session management processing (refer to <FIG>) (<NUM> seconds being set), and is also counted down. If a voice signal is transmitted from none of the participating terminals for <NUM> seconds, and the time counted down by the timer TS reaches "<NUM>", this communication session is canceled, and the information regarding this communication session is erased from the mixing table <NUM>.

<FIG> is a diagram illustrating a priority table <NUM>. The priority of each call type of communication is stored in the priority table <NUM>. The priority is represented by a numerical value, and the smaller the value is, the priority is higher. In the case where one communication terminal is called from a plurality of communication sessions in an overlapped manner, which of the communication sessions the communication terminal is to be participated in is determined based on the priorities in the priority table <NUM>. The case where one communication terminal is called from a plurality of communication sessions in an overlapped manner includes a case where the communication terminal is called from a plurality of communication sessions at the same time, and a case where, while the communication terminal is participating in one communication session, the communication terminal is called from another communication session, for example.

If the priority of the current communication session and the priority of a new communication session are the same, the communication terminal continues to participate in the current session, and will not move to the new communication session. The configuration may also be such that the communication terminal is moved to the new communication session even if the priorities are the same. Also, the contents of the priority table <NUM> are not limited thereto, and the individual communication session may be the first priority, for example.

<FIG> is a diagram illustrating a virtual device table <NUM>. In the virtual device table <NUM>, the identification code (such as VD1) of a virtual device and the identification number (ID) of a recording target (a communication terminal or a group that is to be monitored) are stored in an associated manner. When a communication session in which a communication terminal of an identification number in this table participates is established, the corresponding virtual device is caused to participate in this communication session. The mixing function of the communication session also transmits the voice signals that are transmitted and received in the communication session to the virtual device. The communication monitoring unit <NUM> acquires and records the voice signals. The virtual device is caused to participate in the communication session in order to acquire voice signals for recording, from a function unit (network communication relaying unit <NUM>) that performs mixing of voice signals. The communication monitoring unit <NUM> causes the virtual device to participate in the communication session in which the communication target participates. With this, the network communication relaying unit <NUM> outputs voice signals to the communication monitoring unit <NUM> as the voice signals to be transmitted to the virtual device when mixing is performed, and the communication monitoring unit <NUM> can acquire all of the voice signals of the communication session (in which the recording target is participating). When the recording target has left the communication session, the virtual device also leaves the session. The configuration may also be such that the communication monitoring unit <NUM> outputs voice signals to a speaker or the like for allowing the user to hear while recording (or without recording) the voice signals of the communication session that is the recording target.

While the details will be described later with reference to a flowchart, the communication monitoring unit <NUM> continuously buffers voices in the communication session that the recording target is participating, divides the voice data into data of a predetermined size (e.g. <NUM> MB), and makes a file of the data. Also, when the state of a communication session in which the recording target is participating is changed, e.g. when the communication session in which the recording target is participating is started/moved/ended, a file of the buffered voice signals is made at the timing of each change of the state.

The relaying device <NUM> transmits voice packets (voice signals) to another communication terminal. The voice packet is transmitted from a communication terminal, and is input to the relaying device <NUM> over the network <NUM>, or via the LTE communication network <NUM> or the external apparatus interface <NUM>. The relaying device <NUM> transmits a voice packet to another communication terminal over the network <NUM>, or via the LTE communication network <NUM> or the external apparatus interface <NUM>. In the case of the group communication, a voice signal is transmitted to a plurality of communication terminals that belong to the group. Also, in the case of the group communication, there are cases where the users of a plurality of communication terminals speak at the same time, and voice packets are transmitted from the plurality of communication terminals at the same time. In such a case, the relaying device <NUM> edits new voice packets by mixing these voice signals of the plurality of voice packets, and transmits these new voice packets to the respective communication terminals. A voice packet in which all of the voice signals are mixed is transmitted to a communication terminal that has not transmitted a voice signal, and with respect to a communication terminal that has transmitted a voice signal, a voice packet in which all of the voice signals excluding the voice signal that the communication terminal has transmitted are mixed is transmitted to the communication terminal. With this, an echo of a voice signal that a communication terminal has transmitted will not occur in the communication terminal. In the case of performing communication in a form of the plenary communication as well, mixing is performed in a manner similar to the group communication. Since a virtual device does not transmits a voice signal, all of the voice signals in the communication session is transmitted to the virtual device.

The operations of the relaying device <NUM> will be described with reference to the flowcharts in <FIG>. <FIG> illustrates the processing operations of the control unit <NUM> at the time of receiving a voice packet. Upon receiving a voice packet, the control unit <NUM> reads session information of this voice packet, and determines whether or not the communication session has already been registered in the mixing table <NUM> (step S10). If the communication session has already been registered in the mixing table <NUM> (YES in step S10), the control unit <NUM> transmits the voice signal of the received voice packet to at least one other communication terminal that is participating in the communication session by referring to the participating terminal field of the mixing table <NUM> (step S17). The control unit <NUM> resets the retention time timer TS in the mixing table <NUM> to <NUM> seconds (step S18).

If the communication session of the received voice packet is not registered in the mixing table <NUM> (NO in step S10), that is, if this voice packet is a call packet, which is a first voice packet, the control unit <NUM> performs registration processing for registering a new communication session due to this voice packet to the mixing table <NUM> (step S11). Hereinafter, this registration processing will be described using <FIG>.

<FIG> is a flowchart illustrating operations of the registration processing of the communication session that is executed in step S11 in <FIG>. The control unit <NUM> extracts participating terminal candidates constituted by the calling terminal and communication terminals to be called in the new communication session based on the destination ID and the calling ID included in the received call packet, and selects one of the participating terminal candidates (step S20). Next, the control unit <NUM> determines whether or not the communication terminal of this participating terminal candidate is engaged (participating in another communication session) (step S21). If it is determined, in step S21, that the communication terminal is not engaged (NO in step S21), the control unit <NUM> determines that this communication terminal is a participating terminal of the communication session to be established this time (step S22). The control unit <NUM> determines whether this communication terminal is a recording target communication terminal (step S23). If the communication terminal is a recording target (YES in step S23), a virtual device VDn associated with this communication terminal is also included in the participating terminals (step S24).

If it is determined, in step S21, that the communication terminal of this participating terminal candidate is engaged (YES in step S21), the control unit <NUM> compares the priority of the communication session in which this communication terminal is currently participating with the priority of this new communication session (step S25). If the priority of the new communication session is higher (YES in step S25), the control unit <NUM> executes leaving processing for causing this communication terminal to leave the currently participating communication session (step S26), and determines that this communication terminal as the participating terminal of the new communication session (step S22). If this communication terminal is a recording target (YES in step S23), the control unit <NUM> also includes a corresponding virtual device VDn in the participating terminals (step S24). In step S25, if the priority of the new communication session is the same as or lower than the priority of the communication session in which this communication terminal is currently participating (NO in step S25), the control unit <NUM> does not cause this communication terminal to participate in the new communication session, and determines to be an excluded terminal of the new communication session (step S27). The control unit <NUM> repeats the processing from step S20 to step S27 with respect to all of the participating terminal candidates (step S28).

If the processing described above has been executed with respect to all of the participating terminal candidates (YES in step S28), the control unit <NUM> determines the number of communication terminals that have been determined as the participating terminals (step S29). If the number of participating terminals excluding the virtual devices is two or more (YES in step S29), the control unit <NUM> registers this new communication session to the mixing table <NUM> (step S30), and ends this processing. Also, in step S29, if the number of participating terminals is less than two (NO in step S29), the control unit <NUM> determines that this new communication session cannot be established, and does not register the new communication session to the mixing table <NUM>, and ends this registration processing.

Returning to <FIG>, the control unit <NUM> determines, in step S12, whether or not a new communication session has been registered in the communication session registration processing (step S11 in <FIG>). If a new communication session has not been registered (NO in step S12), the control unit <NUM> ends the processing incurred by the reception of this voice packet. On the other hand, if a new communication session has been registered in step S12 (YES in step S12), the control unit <NUM> transfers the voice signal of the received voice packet to a communication terminal that is participating in the communication session by referring to the participating terminal field of the mixing table <NUM> (step S15).

Next, the session leaving processing to be executed in step S26 in <FIG> will be described with reference to <FIG>. This processing is processing for causing a communication terminal that is participating in a communication session to leave the communication session in order to move the communication terminal to another communication session whose priority is higher, as shown in <FIG>. The control unit <NUM> erases the participating session number in the terminal table <NUM> (step S40), and moves the identification number of this communication terminal from the participating terminal field, in the mixing table <NUM>, of the communication session that the communication terminal is currently participating to the excluded terminal field (step S41). The communication terminal <NUM> determines whether this communication terminal is a recording target (step S42). If the communication terminal is a recording target (YES in step S42), the control unit <NUM> erases the virtual device VDn from the participating terminal field (step S43), stops recording (buffering) of this communication session, and makes a file of the data of voice that has been buffered until this point in time (step S44). If, as a result of the communication terminal having left the communication session, the number of the participating terminals thereof has decreased to less than two (YES in step S45), the control unit <NUM> executes session ending processing for ending this communication session (step S46). If the recording target communication terminal has left the communication session, recording is immediately started in a communication session in which this communication terminal has newly participated (step S24 in <FIG>).

<FIG> is a flowchart illustrating the session ending processing. This processing is executed when, as a result of a participating terminal having left, the number of participating terminals has decreased to less than two, as described above, and when the voices in the communication session have stopped, and a predetermined time (<NUM> seconds) has elapsed in a soundless state. The control unit <NUM> selects one participating terminal in the communication session that is caused to be ended (step S50), erases the participating session number of this communication terminal in the terminal table <NUM> (step S51), and determines whether this communication terminal is a recording target (step S52). If it is determined to be a recording target (YES in step S52), the control unit <NUM> erases the virtual device VDn from the participating terminal field (step S53), stops recording (buffering) of this communication session, and makes a file of the data of voice that has been buffered until this point in time (step S54).

The control unit <NUM> searches whether the identification number of this communication terminal is registered in the excluded terminal fields of the other communication sessions registered in the mixing table <NUM> (step S55). If a communication session in which this communication terminal is registered as an excluded terminal is present (YES in step S56), the excluded communication terminal is caused to participate in this communication session in which the communication terminal has been excluded. In order to do this, the control unit <NUM> moves the identification number of this communication terminal from the excluded terminal field to the participating terminal field of this communication session (step S57), and writes the session number of this communication session to the participating session number field of this communication terminal in the terminal table <NUM> (step S58). The control unit <NUM> determines whether this communication terminal is a recording target (step S59). If it is determined to be a recording target (YES in step S59), the control unit <NUM> writes the virtual device VDn in the participating terminal field of the communication session (step S60), and starts recording (buffering) of this communication session (step S61). After having executed the processing from step S50 to step S61 with respect to all of the participating terminals (YES in step S62), the control unit <NUM> erases this communication session from the mixing table <NUM> (step S63), and ends the session ending processing.

<FIG> is a flowchart illustrating the communication session management processing. In the communication session management processing, the control unit <NUM> counts the soundless time of each communication session registered in the mixing table <NUM>, and when a predetermined time (<NUM> seconds) has elapsed, ends the communication session. This processing is regularly (e.g. every <NUM> milliseconds) executed repeatedly. The control unit <NUM>, first, designates the communication session in the first row of the mixing table <NUM> (step S80). The control unit <NUM> reduces the retention time timer TS of the designated communication session by one count (<NUM> milliseconds worth) (step S81), and determines whether or not the retention time timer TS reaches <NUM> due to this reduction (step S82). If the retention time timer TS reaches <NUM> (YES in step S82), the control unit <NUM> determines that this communication session has ended, and erases the session ending processing with respect to the communication session of this row (step S83, <FIG>). The control unit <NUM> manages the mixing table <NUM> by successively performing the processing described above until the last row of the mixing table <NUM> (steps S84 and S85).

<FIG>, <FIG> and <FIG> are flowcharts illustrating recording processing operations to be executed by the communication monitoring unit <NUM> of the control unit <NUM>. This processing is executed at fixed intervals (<NUM> milliseconds) with respect to each virtual device VDn (n=<NUM> to <NUM>). First, the communication monitoring unit <NUM> determines whether or not a voice signal (voice packet) addressed to the virtual device VDn has been received (step S90). If a voice packet has been received (YES in step S90), the communication monitoring unit <NUM> reads session information included in a data body of the voice packet. A session ID and the like are described in the session information. The communication monitoring unit <NUM> determines whether or not voice signals of this communication session are being recorded (step S92). If the voice signals are not being recorded (NO in step S92), the communication monitoring unit <NUM> determines that the first voice packet of this communication session has been received, and executes recording starting processing (step S93).

Here, the recording starting processing will be described with reference to the flowchart in <FIG>. In the recording starting processing, the communication monitoring unit <NUM> saves the session information included in the voice packet (step S110), and secures a storage region (storage capacity) for a voice file in the external storage device <NUM> (step Sill). If the free capacity of the external storage device <NUM> is not sufficient, the capacity may be secured by deleting an old recorded voice file. Thereafter, the communication monitoring unit <NUM> creates a date folder, which is a folder in which a voice file is to be saved, and the name of a saving file for saving voice signals to be buffered after this (step S112), and secures a buffer region, in the RAM of the control unit <NUM>, in which voice signals are to be buffered (step S113). The storage region to which the session information is saved in step S110 is also set in the RAM of the control unit <NUM>. The date folder is created for each date with respect to each virtual device VDn. Therefore, if the folder for the current day has already been created for this virtual device VDn, a file is not created in step S112. The folder name and the file name will be created in the following manner.

In the external storage device <NUM>, a saving directory "voice_data[n]" (n is the virtual device number) for saving recorded voices is created for each virtual device VDn (n=<NUM> to <NUM>). A folder for each date is created under each directory. "Date in which saving is started" is used as the folder name. For example, the folder for the virtual device VD1 for September 10th, <NUM> is "/voice_data1/<NUM>". Also, the file name of a voice file that is created every <NUM> MB is named such that a communication type is added to MM(month)DD(day)HH(hour)DD(minutes)SS(seconds) at which buffering has started. The communication type includes "_all" in the case of plenary communication, "_group100" (<NUM> is a group ID) in the case of group communication, "_uid10" (transceiver ID) or "_tel1234" (telephone number of IP telephone) in the case of individual communication, and the like. For example, the file name of a voice signal in a communication session having a group ID <NUM> whose buffering has started at <NUM>:<NUM> on September 10th is "0910180100_group100. Therefore, the voice signal of the communication session having the group ID <NUM> with respect to which the virtual device VD1 has started buffering at <NUM>:<NUM> on September 10th is saved as "/voice_data1/<NUM>/0910180100_group100. wav", for example.

Returning to <FIG>, upon the buffer region being secured in the recording starting processing (step S93), the communication monitoring unit <NUM> buffers the voice signal received this time (step S94).

If, at this moment, the voice signal of this virtual device VDn is currently being recorded (YES in step S92), the session information of the voice packet received this time is compared with the session information saved when the recording was started (step S95). If there is a change in the session information (YES in step S95), it is determined that the communication partner has changed, and the recording is ended once (step S97), and the recording for the new communication session received this time is started (step S98).

Here, the recording ending processing to be executed in step S97 will be described with reference to the flowchart in <FIG>. In the recording ending processing, first, the control unit <NUM> creates a recorded voice file by copying the voice data from the buffer to a predetermined directory of the external storage device <NUM> (step S115). The file name of this voice file is as described above. The communication monitoring unit <NUM> releases the buffer region in the RAM (step S116) and clears the session information (step S117).

Returning to <FIG>, even if there is no change in the session information (NO in step S95), if the size of the buffered voice signal reaches <NUM> MB (YES in step S96), the communication monitoring unit <NUM> makes a file of the voice signal once. The communication monitoring unit <NUM> executes the recording ending processing once (step S97), and executes the recording starting processing in order to continuously record the voice signal (step S98). After the recording starting processing (step S98), the communication monitoring unit <NUM> buffers the voice signal received this time (step S99). If there is no change in the session information (NO in step S95), and the buffered size has not reached <NUM> MB (NO in step S96), the communication monitoring unit <NUM> buffers the voice signal in the current buffer region (step S99).

In step S90, if a voice packet addressed to the virtual device VDn has not been received (NO in step S90), the communication monitoring unit <NUM> determines whether recording is currently performed and whether a predetermined standby time (e.g., five seconds) has elapsed (step S100, step S101). If recording is currently performed and the predetermined standby time (e.g., five seconds) has elapsed (YES in step S100 and step S101), the communication monitoring unit <NUM> determines that the communication has ended and executes the recording ending processing (step S102).

Even if a voice packet is being received, if the voice signal included in the voice packet has substantially no sound component, the communication monitoring unit <NUM> may determine that a voice signal is not present and continue to measure the soundless standby time. Also, if some message indicating the leaving from the session is transmitted from a mixing engine (network communication relaying unit <NUM>) to the communication monitoring unit <NUM>, which is incurred by erasure of a virtual device from the participating terminal field of the communication session (step S43 in <FIG>, step S53 in <FIG>), the recording ending processing may be executed in response to the message.

In the above-described embodiment, the recorded voice data is assumed to be in a WAV format, but the voice signal may be encoded in any format. The voice signal may be compression-encoded. For example, the voice may be encoded in an MP3 format.

Claim 1:
A relaying device (<NUM>) comprising:
a communication unit configured to communicate with a plurality of communication terminals that perform voice communication;
a communication session processing unit configured to control a communication session in which two or more communication terminals communicate to each other, and include a session table in which the communication session is registered; and
a communication monitoring unit (<NUM>) configured to record a voice signal in the communication session;
wherein the communication session processing unit is configured to:
establish, when one communication terminal made a call for calling at least one other communication terminal, a communication session that is identified by session information, and register, in the session table, the one communication terminal that has made the call and the at least one other communication terminal that was called as participating terminals of the communication session,
transmit, upon receiving a voice signal from one participating terminal of the established communication session, this voice signal to the at least one other participating terminal of the same communication session along with the session information,
provide a virtual device for transmitting voice signals of the communication session to the communication monitoring unit (<NUM>), and associate this virtual device with one communication terminal or a group constituted by a plurality of communication terminals, and
register, if the communication terminal or group associated with the virtual device is registered as a participating terminal of the communication session, the virtual device further as a participating terminal of the communication session, the virtual device being associated with the communication terminal or group registered as the participating terminal of the communication session, and
the communication monitoring unit (<NUM>) is configured to:
acquire and record voice signals transmitted from the communication session processing unit to the virtual device, and
monitor the session information that is transmitted from the communication session processing unit along with the voice signals, and if the communication session in which the virtual device participates is started, ended and moved, save the voice signals recorded until this point in time in a nonvolatile storage device as a file.