Busy Asterisk systems can be affected by the SIP timers T1 and B timeout values configured. Consideration of their values impacts how quickly a transaction can recover from a lost packet and the amount of memory used. It is in your best interest to make these values as small as possible for your installation.
The T1 timer sets the timeout after which SIP gives up on waiting for a response from the remote party. The general rule is to set this to slightly higher than the round-trip time (RTT) to the furthest remote party. Although the default of 500 ms is safe, this timer controls other timing aspects of the of the SIP stack so reducing it is in your best interest. Unless you have a provider or remote phones with more than a 100 ms RTT, setting this to 100 ms (the minimum) is probably safe. If you have outlier phones such as cell phones with VoIP clients, setting it to 250 ms is probably safe.
The B timer is technically the INVITE transaction timeout but it also controls other aspects of SIP stack timing. It’s default is 32 seconds but its minimum is (64 * T1) which would also be 32 seconds if T1 were left at its default of 500 ms. Unfortunately, this timer has the side effect of controlling how long completed transactions are kept in memory so on a busy PBX, a setting of 32 seconds will probably result in higher than necessary memory utilization. For most installations, 6400 ms is fine.
The PJSIP stack used in Asterisk has the timer_t1 and timer_b configuration options to control the two timers described above in the pjsip.conf configuration file. The older chan_sip channel driver also has equivalent options for these timers but you should be migrating toward the new PJSIP channel driver chan_pjsip.
More performance tuning ideas can be found at https://wiki.asterisk.org/wiki/display/AST/Performance+Tuning
There Are 2 Comments
The Digium Blog
- No items