The Twilio Mobile Core (TMC) makes use of inactivity timers when devices establish Internet connections through it. These timers depend on the communications protocol in use — TCP or UDP — and are initiated when the device stops transmitting data via the specified protocol. If the device transmits more data before a timer fires, the TMC’s NAT (Network Address Translation) unit will continue to route relevant packets to the device’s network IP address. If the timer fires, the NAT can release the address translation resource.
These NAT timeouts are separate from any inactivity timeout a visited network may apply to the device’s PDP context — i.e., the data connection the device establishes via the local carrier network. Such timeouts are set by the carrier, not the TMC, and may depend on whether the network knows the device’s location. On some networks, known-location devices are allowed longer inactivity periods because there is less or no likelihood that the inactivity is the result of the device moving to another cell or network.
The current inactivity timeout values are as follows:
|NAT Timer||Default Value|
|TCP||6 hours (21600 seconds)|
|UDP (stream)||12 seconds|
The above values are subject to change.