Registration Duration

From Bizfon Wiki

Jump to: navigation, search

The registration duration tells a SIP phone, for how long it is registered with the PBX. When a phone is on an IP address that can be routed directly from the PBX, that registration interval can be long. However, we recommend making it not too long, so that rebooting the device will drop the old registration quickly or problems in the network can be found quickly.

The PBX uses the registration duration also to make devices available even if they are behind a firewall (NAT). By making the registration interval short, the NAT router keeps the port association alive.

These rules do not only apply for registrations, they also apply for subscriptions.

When the SBC thinks a device if behind NAT

When the PBX receives a registration, it has to make a decision if the device is behind NAT or it is on a routable address. This decision is made by looking at incoming SIP request:

  • First, the PBX checks if the device supports "outbound". If this is the case, the SBC follows the guidelines described in the IETF document for outbound.
  • Otherwise, the PBX checks the number of "Via" headers in the request. If the number if more than one, then there is obviously a SIP proxy involved which has to take care about SBC-related functions. In this case, the PBX disables the SBC functionality for the device. This behavior can be turned off by changing the setting "register_via_count" in the Global Configuration File to "false"; this setting was only introduced to be compatible with some bad SIP implementations that did not fully understand the SIP proxy role.
  • Otherwise, the further processing depends on the transport layer. If the transport layer is UDP, then the PBX checks if there was a "received" parameters set earlier by the PBX or the "rport" parameter is present.
  • If the transport layer was TCP or TLS, the PBX examines the setting "nat_tcp" in the Global Configuration File. If it is set, then the SBC will take care about the device.

Expiry Duration

If the SBC is managing the device, the duration which is proposed by the phone is ignored and replaced with the value of the global setting "nat_udp" (for UDP) and "nat_tcp" (for TCP). This step is skipped if the respective setting is empty.

No matter if the SBC is managing the device or not, the expiration duration is checked against the settings "min_expires" and "max_expires" and corrected if it is too short or to long.

Recommended Settings

Obviously, the settings "nat_udp" and "nat_tcp" need to be in the range of "min_expires" and "max_expires".

We have had the experience that most NAT routers keep the ports alive for at least 30 seconds. Therefore, we think that a value of 30 seconds for "nat_udp" and 180 seconds (3 minutes) for "nat_tcp" work in most cases. Accordingly the "min_expires" and "max_expires" should be set to 30 and at least 180, respectively. For the "max_expires" the PBX uses the value of 360 (6 minutes) by default.

Personal tools
Getting Help