Patent Publication Number: US-2011069701-A1

Title: Gateway and method for processing packets utilized thereby

Description:
BACKGROUND 
     1. Technical Field 
     Embodiments of the present disclosure relate to network communications, and more particularly to a gateway and a method for processing packets utilized by the gateway. 
     2. Description of Related Art 
     Generally, a gateway is connected between a plurality of user terminals via a plurality of line cards, and a media gateway controller via a voice over Internet protocol (VoIP) network. The gateway provides VoIP service for the user terminals. Each line card requires an Internet protocol (IP) address to communicate with the media gateway controller. Therefore, the gateway requires many IP addresses, and thus has a small utilization ratio of the IP addresses. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The details of the disclosure, both as to its structure and operation, can best be understood by referring to the accompanying drawings, in which like reference numbers and designations refer to like elements. 
         FIG. 1  is a schematic diagram of an application environment of a gateway in accordance with one embodiment the present disclosure; 
         FIG. 2  is a schematic diagram of one embodiment of a port mapping table of the gateway of  FIG. 1 . 
         FIG. 3  is a schematic diagram of functional modules of one embodiment of a line card of the gateway of  FIG. 1 ; 
         FIG. 4  is a transport flow of one embodiment of a method for processing packets utilized in a gateway, such as, for example, that of  FIG. 1 ; and 
         FIG. 5  is a flowchart showing one embodiment of the method for processing packets of  FIG. 4 . 
     
    
    
     DETAILED DESCRIPTION 
       FIG. 1  is a schematic diagram of an application environment of a gateway  10  in accordance with one embodiment of the present disclosure. In this embodiment, the gateway  10  is connected between a plurality of user terminals  20 ,  21 ,  22 , and a media gateway controller  40  and a user terminal  23  via a voice over Internet protocol (VoIP) network  30 . To connect a caller user terminal connected to the gateway  10  to a callee user terminal (a telephone, for example), the gateway  10  establishes a signaling connection with the media gateway controller  40  when the caller user terminal is off-hook. The caller user terminal connected to the gateway  10  can dial the callee user terminal, that is, can transmit RTP packets to the callee user terminal. 
     In one embodiment, the gateway  10  includes a management board  110  and a plurality of line cards  120 . The management board  110  is connected to the VoIP network  30 , and includes an IP address and a media access control (MAC) address. 
     Each line card  120  includes a MAC address, a line card number, and a plurality of port numbers. The line card  120  is connected to the user terminals  20 ,  21  corresponding to the port numbers of the line card  120 . The management board  110  may be a processor such as an IP main processor unit (MPU). The user terminals  20 ,  21 ,  22 ,  23  may be telephones, for example. 
     The management board  110  establishes a port mapping table  130  according to the port numbers, the line card number, and the MAC address of each line card  120  when the gateway  10  boots up, and notifies each line card  120  of the port mapping table  130 .  FIG. 2  is a schematic diagram of one embodiment of the port mapping table  130 . The mapping table  130  includes a line card number field  131 , a port range field  132 , and a MAC address field  133 , respectively for recording the line card number, the port numbers, and the MAC address of each line card  120 . The port numbers of the same line card  120  belong to the same port range, and the port numbers of different line cards  120  do not belong to the same port range. 
     In one embodiment, the line card  120  that is connected to the user terminal  20  transmits an Internet control message (ICM) packet with off-hook information of the user terminal  20  to the management board  110  when the user terminal  20  is off-hook. The ICM packet with the off-hook information includes the line card number of the line card  120  and a port number corresponding to the user terminal  20 . The user terminal  20  may want to call the user terminal  21 ,  22 , or  23 . 
     The management board  110  is operable to receive the ICM packet with the off-hook information of the user terminal  20  from the line card  120 , and generate a user terminal identification number according to the line card number and the port number in the ICM packet with the off-hook information. In one embodiment, the management board  110  generates the user terminal identification number based on the following formula: (the line card number−1)*the number of the user terminals  20 ,  21  connected to the line card  120 +the index of a source port number of the ICM packet with the off-hook information. The source port number of the ICM packet with the off-hook information is the port number corresponding to the user terminal  20 . In one example, the gateway  10  includes 14 pieces of line cards  120 , each connected to 48 user terminals  20 ,  21 , and the index of the source port number of the ICM packet is 3. Then, the user terminal identification number of the user terminal  20  is calculated as: (2−1)*48+3=51. 
     The management board  110  is further operable to transmit a call request packet to the media gateway controller  40  over the VoIP network  30  according to the IP address of the management board  110  and the user terminal identification number. The call request packet includes the off-hook information of the user terminal  20 . Accordingly the media gateway controller  40  sends back a call response packet to the management board  110 . The call response packet includes a dial tone and the user terminal identification number. 
     The management board  110  receives the call response packet from the media gateway controller  40 , and retrieves the port number corresponding to the user terminal  20  from the user terminal identification number in the call response packet. The management board  110  then transmits an ICM packet with the dial tone to the line card  120 . The line card  120  receives the ICM packet with the dial tone from the management board  110 , and transmits the dial tone to the user terminal  20  according to the port number corresponding to the user terminal  20 . Then the user terminal  20  receives the dial tone and starts to dial telephone numbers to call another user terminal. Thus, the gateway  10  finishes establishing a signaling connection with the media gateway controller  40  using the IP address of the management board  110 . Accordingly, the line card  120  requires no IP address. 
       FIG. 3  is a schematic diagram of functional modules of one embodiment of the line card  120  of the gateway  10  of  FIG. 1 . In one embodiment, the line card  120  includes a communication module  1201 , a determining module  1202 , and a searching module  1203 . The gateway  10  provides VoIP service for the user terminal after the signaling connection between the gateway  10  and the media gateway controller  40  has been established. That is, the gateway  10  can transmit an RTP packet from a caller user terminal to a callee user terminal. The caller user terminal and the callee user terminal may be any two of user terminals  20 ,  21 ,  22 ,  23 . 
     The communication module  1201  is operable to receive the RTP packet from the caller user terminal. The RTP packet includes a source IP address, a destination IP address, a source port number, and a destination port number. In one embodiment, the communication module  1201  may directly receive the RTP packet from the user terminal  20  if the caller user terminal is the user terminal  20 . The communication module  1201  may receive the RTP packet from the user terminal  22  via one line card connected to the user terminal  22  if the caller user terminal is the user terminal  22 . The communication module  1201  may receive the RTP packet from the user terminal  23  over the VoIP network  30  if the caller user terminal is the user terminal  23 . 
     The determining module  1202  is operable to determine whether the destination IP address is the same as the source IP address of the RTP packet, and further determine whether the source port number and the destination port number of the RTP packet belong to the same port range. In one embodiment, the port numbers of one line card belong to the same port range, and the port numbers of different line cards do not belong to the same port range. 
     If the destination IP address is the same as the source IP address, and the source port number and the destination port number of the RTP packet belong to the same port range, the caller user terminal and the callee user terminal may be respectively the user terminal  20  and the user terminal  21 . Then, the communication module  1201  is further operable to directly transmit the RTP packet to the callee user terminal  21 . 
     The determining module  1202  is further operable to determine whether the destination IP address of the RTP packet is the same as the IP address of the management board  110 . In one embodiment, if the destination IP address of the RTP packet is not the same as the IP address of the management board  110 , the RTP packet is transmitted from the gateway  10  to the VoIP network  30 . In such a case, the caller user terminal and the callee user terminal may be the user terminal  20  and the user terminal  23 . The communication module  1201  further requests the management board  110  to acquire a MAC address of the callee user terminal  23 , and then transmits the RTP packet to the callee user terminal  23  according to the MAC address of the callee user terminal  23 . In one embodiment, the management board  110  transmits an address resolution protocol (ARP) packet to the callee user terminal  23  to acquire the MAC address of the callee user terminal  23 . 
     If the destination IP address is the same as the source IP address of the RTP packet, and the source port number and the destination port number of the RTP packet do not belong to the same port range, the caller user terminal and the callee user terminal are connected to the same gateway  10  and connected to different line cards. In such a case, the caller user terminal and the callee user terminal may be the user terminal  20  and the user terminal  22 , respectively. Then, the searching module  1203  searches for a MAC address of one line card connected to the callee user terminal  22  in the port mapping table  130  of  FIG. 1 . The communication module  1201  further transmits the RTP packet to the callee user terminal  22  according to the MAC address of the line card connected to the callee partner user terminal  22 . 
     If the destination IP address is the same as the IP address of the management board  110 , the RTP packet is transmitted from the VoIP network  30  to the gateway  10 . In such a case, the caller user terminal and the callee user terminal may be the user terminal  23  and the user terminal  20 , respectively. The communication module  1201  further transmits the RTP packet to the callee user terminal  20  according to the destination port number of the RTP packet. 
       FIG. 4  is a transport flow of one embodiment of a method for processing packets utilized in a gateway, such as, for example, that of  FIG. 1 . In one embodiment, the gateway  10  establishes a signaling connection with the media gateway controller  40 . 
     Initially, a user terminal  20  is off-hook and ready to establish a call with another user terminal. The line card  120  connected to the user terminal  20  transmits an ICM packet with the off-hook information of the user terminal  20  to the management board  110 . In one embodiment, the ICM packet with the off-hook information includes the line card number of the line card  120  and the port number corresponding to the user terminal  20 . The ICM packet with the off-hook information requires no IP address. 
     Then, the management board  110  receives the ICM packet with the off-hook information from the line card  120 , and generates a user terminal identification number according to the line card number of the line card  120  and the port number corresponding to the user terminal  20  in the ICM packet with the off-hook information. The management board  110  transmits a call request packet to the media gateway controller  40  over the VoIP network  30  according to the IP address of the management board  110  and the user terminal identification number. The call request packet includes the off-hook information of the user terminal  20 . 
     Afterwards, the media gateway controller  40  receives the call request packet, and sends back a call response packet to the management board  110 . The call response packet includes a dial tone and the user terminal identification number. 
     Then, the management board  110  receives the call response packet from the media gateway controller  40 , and retrieves the port number corresponding to the user terminal  20  from the user terminal identification number in the call response packet. The management board  110  transmits an ICM packet with the dial tone to the line card  120 . 
     The line card  120  receives the ICM packet with the dial tone, and transmits the dial tone to the user terminal  20  according to the port number corresponding to the user terminal  20 . 
     Finally, the user terminal  20  receives the dial tone from the line card  120 . Thus, the signaling connection between the gateway  10  and the media gateway controller  40  is successfully established. Accordingly, the user terminal  20  can start a call with another user terminal. 
       FIG. 5  is a flowchart of one embodiment of the method for processing packets of  FIG. 4 . Depending on the embodiment, additional blocks may be added, others may be deleted, and the ordering of the blocks may be changed. In one embodiment, the gateway  10  transmits an RTP packet from a caller user terminal to a callee user terminal. The caller user terminal and the callee user terminal may be any two of user terminals  20 ,  21 ,  22 ,  23 . 
     In block S 500 , the communication module  1201  receives an RTP packet from a caller user terminal. In one embodiment, the communication module  1201  may directly receive the RTP packet from the user terminal  20  if the caller user terminal is the user terminal  20 . The communication module  1201  may receive the RTP packet from the user terminal  22  via one line card connected to the user terminal  22  if the caller user terminal is the user terminal  22 . The communication module  1201  may receive the RTP packet from the user terminal  23  over the VoIP network  30  if the caller user terminal is the user terminal  23 . The RTP packet includes a source IP address, a destination IP address, a source port number, and a destination port number. 
     In block S 502 , the determining module  1202  determines whether the destination IP address is the same as the source IP address. In one embodiment, the caller user terminal and the callee user terminal are both connected to the gateway  10  if the source IP address is the same as the destination IP address. 
     If the destination IP address is the same as the source IP address, in block S 504 , the determining module  1202  further determines whether the destination port number and the source port number belong to the same port range according to the port mapping table  130 . 
     The caller user terminal and callee user terminal are connected to one same line card if the destination port number and the source port number belong to the same port range. In such a case, in block S 506 , the communication module  1201  directly transmits the RTP packet to the callee user terminal. 
     If the destination port number and the source port number do not belong to the same port range, the caller user terminal and the callee user terminal are connected to different line cards. In such a case, in block S 508 , the searching module  1203  searches for a MAC address of one line card connected to the callee user terminal in the port mapping table  130 . 
     In block S 510 , the communication module  1201  transmits the RTP packet to the callee user terminal according to the MAC address of the line card connected to the callee user terminal and the destination port number. 
     If the destination IP address is not the same as the source IP address, the user terminal and the partner are connected to different gateways. Thus, in block S 512 , the determining module  1202  further determines whether the destination IP address of the RTP packet is the same as the IP address of the management board  110 . 
     If the destination IP address is the same as the IP address of the management board  110 , the RTP packet is transmitted from the VoIP network  30  to the gateway  10 . That is, the caller user terminal may be the user terminal  23 . 
     If the destination IP address is not the same as the IP address of the management board  110 , the RTP packet will transmitted from the gateway  10  to the VoIP network  30 . That is, the callee user terminal may be the user terminal  23 . 
     If the destination IP address is not the same as the IP address of the management board  110 , in block S 514 , the communication module  1201  requests the management board  110  to acquire a MAC address of the callee user terminal. In one embodiment, the communication module  1201  transmits a request ICM packet to the management board  110 . The management board  110  receives the request ICM packet, transmits an ARP packet to the callee user terminal to acquire the MAC address of the callee user terminal according to the request ICM packet, and then transmits a response ICM packet with the MAC address of the callee user terminal to the communication module  1201 . 
     In block S 516 , the communication module  1201  transmits the RTP packet to the callee user terminal over the VoIP network  30  according to the MAC address of the callee user terminal. 
     If the destination IP address is the same as the IP address of the management board  110 , in block S 518 , the communication module  1201  transmits the RTP packet to the callee user terminal according to the destination port number of the RTP packet. 
     Thus, the gateway  10  requires only one IP address of the management board  110 , and does not need to prepare IP address for each line card  120 , which improves the utilization rate of IP addresses. 
     While various embodiments of the present disclosure have been described above, it should be understood that they have been presented using example only and not using limitation. Thus the breadth and scope of the present disclosure should not be limited by the above-described embodiments, but should be defined only in accordance with the following claims and their equivalents.