Method and mobile communications device for maintaining mobile communication continuity
A method for maintaining mobile communication continuity, executed by a mobile communications device. The method includes: starting a timer when the mobile communications device receives a service packet from or transmits a service packet to a network; and detecting whether the network is reachable and whether a network address translation (NAT) mapping has changed when the mobile communications device does not receive a specific packet and the timer expires.
1. A method for maintaining mobile communication continuity, executed by a mobile communications device, the method comprising:
starting a timer when the mobile communications device receives a service packet from or transmits a service packet to a network; and
detecting whether the network is reachable and whether a network address translation (NAT) mapping has changed when the mobile communications device does not receive a specific packet and the timer expires;
wherein the detecting whether the NAT mapping has changed comprises:
sending a request message to the network to request a current hash value;
comparing the current hash value with a previous hash value stored in the mobile communications device after receiving the current hash value; and
determining that the NAT mapping has changed when the current hash value is different from the previous hash value.
2. The method as claimed in claim 1 , wherein a period of the timer is less than a disconnection timeout period of a service corresponding to the specific packet.
3. The method as claimed in claim 2 , wherein the specific packet is a real-time transport protocol (RTP) packet, and the disconnection timeout period is a call drop time period based on the RTP.
4. The method as claimed in claim 2 , wherein the specific packet is a real-time transport control protocol (RTCP) packet, and the disconnection timeout period is a call drop time period based on the RTCP.
5. The method as claimed in claim 2 , wherein the specific packet is a transmission control protocol acknowledge (TCP ACK) packet, and the disconnection timeout period is a TCP timeout period of non-access stratum (NAS) signaling.
6. The method as claimed in claim 2 , wherein the disconnection timeout period of the service is preset by the mobile communications device or is obtained through communication with the network in advance.
7. The method of claim 1 , further comprising:
sending an update request message to the network to request an update of at least one of a public IP address and a user datagram protocol (UDP) port in response to the network being reachable and the NAT mapping having changed.
8. The method of claim 1 , wherein the current hash value and the previous hash value are NAT detection (NATD) hash values.
9. A mobile communications device for maintaining mobile communication continuity, comprising:
a wireless transceiver, configured to perform wireless transmission and reception to and from a network; and
a controller, coupled to the wireless transceiver, and configured to:
start a timer when the mobile communications device receives a service packet from or transmits a service packet to the network; and
detect whether the network is reachable and whether a network address translation (NAT) mapping has changed when the mobile communications device does not receive a specific packet and the timer expires;
wherein the detecting whether the NAT mapping has changed comprises:
sending a request message to the network to request a current hash value;
comparing the current hash value with a previous hash value stored in the mobile communications device after receiving the current hash value; and
determining that the NAT mapping has changed when the current hash value is different from the previous hash value.
10. The mobile communications device of claim 9 , wherein a period of the timer is less than a disconnection timeout period of a service corresponding to the specific packet.
11. The mobile communications device of claim 10 , wherein the specific packet is a real-time transport protocol (RTP) packet, and the disconnection timeout period is a call drop time period based on the RTP.
12. The mobile communications device of claim 10 , wherein the specific packet is a real-time transport control protocol (RTCP) packet, and the disconnection timeout period is a call drop time period based on the RTCP.
13. The mobile communications device as claimed in claim 10 , wherein the specific packet is a transmission control protocol acknowledge (TCP ACK) packet, and the disconnection timeout period is a TCP timeout period of non-access stratum (NAS) signaling.
14. The mobile communications device as claimed in claim 10 , wherein the disconnection timeout period of the service is preset by the mobile communications device or is obtained through communication with the network in advance.
15. The mobile communications device as claimed in claim 9 , wherein the controller is further configured to:
send an update request message to the network to request an update of at least one of a public IP address and a user datagram protocol (UDP) port in response to the network being reachable and the NAT mapping having changed.
16. The mobile communications device of claim 9 , wherein the current hash value and the previous hash value are NATD hash values.