1. Technical Field
Embodiments of the present disclosure relate to voice over Internet protocol (VOIP) communication technologies, and particularly to a gateway and a method for establishing voice communication over a network using the gateway.
2. Description of Related Art
Voice over Internet protocol (VoIP) technologies are widely used for provision of communication services over the public Internet, rather than via the public switched telephone network (PSTN). In a traditional voice communication method based on the VoIP technologies, a voice communication server provides voice communication services between different communication devices but also processes voice data of different voice communications. However, work loads of the voice communication server may be heavy with an increasing number of networks users using the voice communication services, which is prone to decrease quality of the voice communications.
The disclosure, including the accompanying drawings, is illustrated by way of example and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In the embodiment, both the communication device 101 and each of the third-party terminals 102 may be various of communication device, such as a smart phone, a personal digital assistant, a fixed telephone, or other similar devices. The communication device 101 and the third-party terminals 102 can use the services provided by the voice communication server 400 to establish voice communications with each other. The voice communications are established based on voice over Internet protocol (VoIP) technologies. The network 300 may be, for example, a world interoperability for microwave access (WIMAX) network, a second generation (2G) network, or a third generation (3G) network. The gateway 200 is connected to the communication device 101 via a wired connection (e.g., a data line) or a wireless connection (e.g., BLUETOOTH® OR WIFI®). It should be understood that another gateway (not shown) can be used to connect between each third-party communication terminal 102 and the network 300.
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage devices. Some non-limiting examples of non-transitory computer-readable medium include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The communication request module 211 receives a request message sent from the communication device 101, the request message requesting to establish a voice communication with a third-party communication terminal 102. In the embodiment, the communication request module 211 may provide a user interface for the communication device 101 to login to the gateway 200. Thus, a user of the communication device 101 can send the request message to the gateway 200 via the user interface. In an example, the user interface is a webpage which includes a virtual dial keypad including a plurality of virtual buttons. A user of the communication device 1 can dial a phone number of the third-party communication terminal 102. Further, the webpage has a hypertext transfer protocol (http) address (e.g., 192.168.15.1). Thus, the user can use a browser of the communication device 101 to access to the webpage according to the http address of the webpage. The webpage may further have a software control (e.g., ActiveX) which is automatically installed in the communication device 101 at the first time when the communication device 101 logins the gateway 200. When the communication device 101 logins the gateway, the software control is activated to run by the communication request module 211, thus the communication request module 211 can receive the request message from the communication device 101 via the software control.
The bandwidth calculation module 212 extracts quality of service (QOS) parameters included in the request message, and calculates a network bandwidth (BW) sufficient to establish the voice communication between the communication device 101 and the third-party communication terminal 102 according to the extracted QOS parameters. In the embodiment, the request message includes an invite package of SIP. The invite package includes the QOS parameters, such as session description protocol (SDP) parameters and a voice codec algorithm. The SDP parameters include, for example, a regular time interval for transmission data packages (ptime) and a header length (header_len) of each data package. The voice codec algorithm may be, for example, a pulse code modulation a-law (PCMA) algorithm or a pulse code modulation u-law (PCMU) algorithm. Thus, the network bandwidth can be calculated according to the extracted parameters. For example, based on the PCMU voice codec algorithm, a formula for calculating the network bandwidth is: BW=8*(vif/8+header_len)*(1000/ptime), where vif is equal to ptime*64 bits.
The bandwidth request module 213 requests the voice communication server 400 to allocate the calculated network bandwidth for the communication device 101 to establish the voice communication with the third-party communication terminal 102. In the embodiment, the bandwidth request module 213 may send a request to the voice communication server 400 for requesting the network bandwidth at regular intervals until the network bandwidth has been allocated for the communication device 101.
When the voice communication between the communication device 101 and the third-party communication terminal 102 is established using the allocated network bandwidth, the data processing module 214 processes vocal data streaming sent from the communication device 101 to generate first real-time transport protocol (RTP) packages, and processes vocal data streaming sent from the third-party communication terminal 102 through the network 300 to generate second RTP packages, according to the voice codec algorithm included in the request message.
The package transmission module 215 transmits the first RTP packages to the third-party communication terminal 102 via the network 300, and transmits the second RTP packages to the communication device 101, thereby realizing the voice communication between the communication device 101 and the third-party communication terminal 102.
As described above, vocal data streaming of the voice communication is processed by the gateway 200 rather than by the voice communication server 400, therefore the work loads of the communication server 400 are greatly decreased, and the quality of the voice communication is improved.
In step S01, receive a request message sent from the communication device 101 using the communication request module 211, the request message requesting to establish a voice communication with a third-party communication terminal 102.
In step S02, the bandwidth calculation module 212 extracts QOS parameters included in the request message, and calculates a network bandwidth sufficient to establish the voice communication according to the extracted QOS parameters. Details of the QOS parameters and calculation of the network bandwidth are provided in paragraph [0012].
In step S03, the bandwidth request module 213 requests the voice communication server 400 to allocate the calculated network bandwidth for the communication device 101 to establish the voice communication with the third-party communication terminal 102.
In step S04, when the voice communication between the communication device 101 and the third-party communication terminal 102 is established, the data processing module 214 processes vocal data streaming sent from the communication device 101 to generate first real-time transport protocol (RTP) packages, and processes vocal data streaming sent from the third-party communication terminal 102 through the network 300 to generate second RTP packages, according to a voice codec algorithm included in the QOS parameters of the request message.
In step S05, the package transmission module 215 transmits the first RTP packages to the third-party communication terminal 102 via the network 300, and transmits the second RTP packages to the communication device 101, thereby realizing the voice communication between the communication device 101 and the third-party communication terminal 102.
In other embodiments, the third-party communication terminal 102 can also send a voice communication request to the gateway 200 via the network 300 requesting to establish the voice communication. When the voice communication request sent from the third-party communication terminal 102 is received by the gateway 200, the SIP module 106 sends a notification to the communication device 101 to notify the user of the communication device 101 that an incoming call is received, and then processes the incoming call according to an operation of the user, such as reject or accept the incoming call. Further, if the communication device 101 has been powered off when the incoming call is received, the SIP module 106 outputs indication signals (e.g., flash light or voice message) to notify the user. Then, the SIP module 106 records reference information of the incoming call, such as a phone number or an IP address of the third-party communication terminal 102 in the storage unit 201, and sends the recorded reference information to the communication device 101 when the communication device 101 is powered on.
Although certain embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
101129858 | Aug 2012 | TW | national |