SST (SIP session-timers, rfc4028) is an extension mechanism of the SIP protocol, which allows the terminal and agent to refresh the SIP session periodically. The re-invite or update request is periodically sent at the negotiated interval to ensure the kept alive of the session. If the session refresh fails, all entities that support SST must clear the internal session status. In addition, UA also needs to send a bye request so that the proxy and the peer ua can clear the state of the relevant session at the same time (this is beneficial for entities that do not support SST in the network path ).
The SST function can be configured globally in the system or based on each user or peer. The user or peer configuration overwrites the global configuration. Several configuration items are added to the sip. conf file:
|
Session-timers = ["accept", "originate", "refuse"]
Session-expires = [integer]
Session-minse = [integer]
Session-refresher = ["UAS", "UAC"] |
The SST parameter in SIP. conf defines the operation mode of the asterisk SST function:
1. Accept: In "accept" mode, asterisk processes SST as the terminal wishes. The terminal can carry a "supported: timer" header in the invite request, or the "session-Expires" header in the 200ok response to the asterisk to notify asterisk to enable the SST mechanism. In this mode, asterisk does not require the terminal to use the SST mechanism.
2. originate: In originate mode, asterisk will require the terminal to activate the SST mechanism in addition to terminal requests. To obtain as much protection as possible and prevent channel suspension due to network or terminal reasons, asterisk periodically sends re-INVITE messages even if the terminal does not support the SST mechanism.
3. Refuse: In "refuse" mode, asterisk does not support SST and does not support both inbound and outbound requests. Asterisk ignores SST-related content in the request. If the terminal forces SST to be activated (as required by the require header), it will directly respond to 420 bad extension.